Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Kernel same-page merging

From Wikipedia, the free encyclopedia
Kernel feature to share memory pages between multiple processes or virtualised guests

Not to be confused withKernel Mode Setting, abbreviated KMS.

Incomputing,kernel same-page merging (KSM), also known askernel shared memory,memory merging,memory deduplication, andpage deduplication is akernel feature that makes it possible for ahypervisor system to sharememory pages that have identical contents between multipleprocesses orvirtualized guests. While not directly linked,Kernel-based Virtual Machine (KVM) can use KSM to merge memory pages occupied byvirtual machines.

Deduplication

[edit]

KSM performs memory deduplication by scanning throughmain memory for physical pages that have identical content, and identifies the virtual pages that are mapped to those physical pages. It leaves one page unchanged, and re-maps each duplicate page to point to the same physical page, after which it releases the extra physical pages for re-use. It also marks both virtual pages as "copy-on-write" (COW), so that kernel will automatically remap a virtual page back to having its own separate physical page as soon as any process begins to write to it.[1]

KSM was originally intended to run more virtual machines on one host bysharing memory between processes as well as virtual machines. An experimental implementation of KSM by Red Hat found that 52 virtual instances of Windows XP with 1 GB of memory, could run on a host computer that had only 16 GB of RAM.[2] Upon itsimplementation, users found KSM to also be useful for non-virtualized environments in which memory is at a premium.[3][4]

KSM was merged into theLinux kernel mainline in version 2.6.32, which was released on December 3, 2009.[3][2] To be effective, the operating system kernel must find identical memory pages held by different processes. The kernel also needs to predict whether the pages are likely to update infrequently enough that the merging would be an efficient use of processor resources.[4] A concern is that although memory usage is reduced, CPU usage is increased, thus negating potential increases in performance.[1]

Security risks

[edit]

Security is also a concern:

See also

[edit]

References

[edit]
  1. ^ab"KSM tries again".lwn.net. kernel.org. RetrievedAugust 21, 2010.
  2. ^ab"Linux kernel 2.6.32, Section 1.3. Kernel Samepage Merging (memory deduplication)".KernelNewbies.org. December 3, 2009. RetrievedAugust 12, 2015.
  3. ^ab"Anatomy of Linux Kernel Shared Memory".IBM Developer. IBM. Archived from the original on July 9, 2016. RetrievedAugust 21, 2010.
  4. ^ab"Increasing memory density by using KSM"(PDF).Kernel.org. RetrievedAugust 21, 2010.
  5. ^Kuniyasu Suzaki; Kengo Iijima; Toshiki Yagi; Cyrille Artho."Memory Deduplication as a Threat to the Guest OS"(PDF). Archived fromthe original(PDF) on January 5, 2013. RetrievedSeptember 16, 2013.
  6. ^Barresi, Antonio; Razavi, Kaveh;Payer, Mathias; Gross, Thomas R. (August 2015)."CAIN: Silently Breaking ASLR in the Cloud"(PDF).USENIX. RetrievedAugust 12, 2015.
  7. ^Red Hat; Polyakov, Andy."It's all a question of time - AES timing attacks on OpenSSL".access.redhat.com. Red Hat. RetrievedAugust 4, 2016.
  8. ^Schwarzl, Martin; Kraft, Erik; Lipp, Moritz; Gruss, Daniel (2021)."Remote Memory-Deduplication Attacks". Network and Distributed System Security Symposium. RetrievedApril 2, 2022.
  9. ^"New FFS Rowhammer Attack Hijacks Linux VMs". August 14, 2016. RetrievedAugust 17, 2016.

External links

[edit]
Organization
Kernel
Support
People
Technical
Debugging
Startup
ABIs
APIs
Kernel
System Call
Interface
In-kernel
Userspace
Daemons,
File systems
Wrapper
libraries
Components
Variants
Virtualization
Adoption
Range
of use
Adopters
Linux kernel
Controversies
Distributions
Organizations
Adoption
Media
Security
certifications
Retrieved from "https://en.wikipedia.org/w/index.php?title=Kernel_same-page_merging&oldid=1224011516"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2026 Movatter.jp