Thread (7 messages) 7 messages, 2 authors, 2022-05-19

Re: [PATCH] mm/ksm: introduce ksm_enabled for each process

flat view

From: CGEL <hidden>
Date: 2022-05-19 08:02:45
Also in: linux-mm, lkml

On Thu, May 19, 2022 at 09:35:30AM +0200, Michal Hocko wrote:
On Thu 19-05-22 06:23:30, CGEL wrote:
quoted
On Wed, May 18, 2022 at 02:12:26PM +0200, Michal Hocko wrote:
quoted
On Wed 18-05-22 02:47:06, CGEL wrote:
quoted
On Tue, May 17, 2022 at 04:04:38PM +0200, Michal Hocko wrote:
quoted
[CCing Hugh and linux-api]

On Tue 17-05-22 09:27:01, cgel.zte@gmail.com wrote:
per mm but the actual implementation currently relies on the per-vma
flags. That means that one can explicitly disallow merging by madvise
for a range. Is it wise to override that by a per-process knob? I mean
there might be a very good reason why a particular memory ranges should
never be merged but a per-process knob could easily ignore that hint
from the application. Or am I just confuse?
For now, there is no any hints for letting KSM never merge some memory
ranges.
I am not sure I understand. Could you be more specific?
Not like THP, KSM doesn't have anything like VM_NOHUGEPAGE, so apps
cann't explicitly disallow merging by madvise. If it is really necessary for
a particular meory ranges of a process to be never merged, we have to submit
one more patch to achieve that.
What about MADV_UNMERGEABLE?
MADV_UNMERGEABLE and MADV_MERGEABLE usually appear in pairs, MADV_UNMERGEABLE cannot
appear alone. I mean MADV_UNMERGEABLE is used to unmerges whatever it merged in the
specifed range, not to disallow merging.
-- 
Michal Hocko
SUSE Labs
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help