Linux Kernel Samepage Merging Ksm Overview Devkernel Io
Linux Kernel Samepage Merging Ksm Overview Devkernel Io Kernel samepage merging (ksm) is a memory saving de duplication feature for anonymous memory. ksm was originally developed for kvm (kernel based virtual machine). Ksm was originally developed for use with kvm (where it was known as kernel shared memory), to fit more virtual machines into physical memory, by sharing the data common between them. but it can be useful to any application which generates many instances of the same data.
Linux Kernel Samepage Merging Ksm Overview Devkernel Io In the kernel summit track at the 2023 linux plumbers conference (lpc), stefan roesch led a session on kernel samepage merging (ksm). he gave an overview of the feature and described some recent changes to ksm. This article describes how linux kernel samepage merging (ksm) has changed. kernel samepage merging has changed over the last couple of versions. this document provides an overview of the changes by version. the document will be updated as new kernel versions become available. optimization for fast changing pages. In order to reduce excessive scanning, ksm sorts the memory pages by their contents into a data structure that holds pointers to the pages’ locations. since the contents of the pages may change at any moment, ksm cannot just insert the pages into a normal sorted tree and expect it to find anything. Therefore ksm uses two data structures the stable and the unstable tree. the stable tree holds pointers to all the merged pages (ksm pages), sorted by their contents.
Breakdown Of Changes To Kernel Samepage Merging Ksm By Kernel Version In order to reduce excessive scanning, ksm sorts the memory pages by their contents into a data structure that holds pointers to the pages’ locations. since the contents of the pages may change at any moment, ksm cannot just insert the pages into a normal sorted tree and expect it to find anything. Therefore ksm uses two data structures the stable and the unstable tree. the stable tree holds pointers to all the merged pages (ksm pages), sorted by their contents. Kernel same page merging (ksm), used by the kvm hypervisor, allows kvm guests to share identical memory pages. these shared pages are usually common libraries or other identical, high use data. Ksm 2024 breakdown of changes to kernel samepage merging (ksm) by kernel version 12 14 kernel samepage merging smart scan feature 09 13. I gave a presentation about kernel samepage merging at the linux plumbers conference. the slides are available here. the video of the presentation can be watched here. the presentation has also been discussed on lwn.
Comments are closed.