On Fri, Feb 10, 2023 at 01:50:04PM -0800, Stefan Roesch wrote:
So far KSM can only be enabled by calling madvise for memory regions. What is required to enable KSM for more workloads is to enable / disable it at the process / cgroup level.
Use case: The madvise call is not available in the programming language. An example for this are programs with forked workloads using a garbage collected language without pointers. In such a language madvise cannot be made available.
In addition the addresses of objects get moved around as they are garbage collected. KSM sharing needs to be enabled "from the outside" for these type of workloads.
Don't you have source code to the interpreter for this mysterious language? Usually that would be where we put calls to madvise()