[LSF/MM/BPF TOPIC] Improve KSM for code patching use-cases

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I submit this topic proposal for your consideration:

We are implementing a code patching library which essentially
reimplements static keys for userspace. (work in progress,
not released yet)

One of the problems we face when patching code from libraries
and executables from nops to jumps is Copy-on-Write (CoW), which
increases memory use and prevents sharing code pages across
processes.

I suspect we can improve Kernel Samepage Merging (KSM) to
better handle scenarios where pages which are the result of
a CoW from a given file/offset are modified shortly after
their CoW, and then are stable for most of their lifetime.

This would allow merging CoW pages when the resulting
modification makes them identical again. This could be
achieved by tracking possible duplicates on a per
file/offset basis, which should be more efficient than
a global scan.

I would like to discuss this topic with Filesystem and MM
experts to get their input.

Thanks,

Mathieu

--
Mathieu Desnoyers
EfficiOS Inc.
https://www.efficios.com




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux