lkml.org 
[lkml]   [2022]   [May]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] mm/ksm: introduce ksm_enabled for each processg
On Thu 19-05-22 06:35:03, CGEL wrote:
> On Wed, May 18, 2022 at 02:14:28PM +0200, Michal Hocko wrote:
> > On Wed 18-05-22 07:40:30, CGEL wrote:
> > [...]
> > > 2. process_madvise is still a kind of madvise. processs_madvise from
> > > another process overrides the intention of origin app code ifself that
> > > also calls madvise, which is unrecoverable. For example, if a process "A"
> > > which madvises just one part of VMAs (not all) as MERGEABLE run on the OS
> > > already, meanwhile, if another process which doesn't know the information
> > > of "A" 's MERGEABLE areas, then call process_madvise to advise all VMAs of
> > > "A" as MERGEABLE, the original MERGEABLE information of "A" calling madivse
> > > is erasured permanently.
> >
> > I do not really follow. How is this any different from an external
> > process modifying the process wide policy via the proc or any other
> > interface?
>
> In this patch, you can see that we didn't modify the flag of any VMA of
> the target process, which is different from process_madvise. So it is
> easy to keep the original MERGEABLE information of the target process
> when we turn back to the default state from the state "always".

This means that /proc/<pid>/smaps doesn't show the real state, right?

--
Michal Hocko
SUSE Labs

\
 
 \ /
  Last update: 2022-05-19 09:41    [W:0.105 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site