lkml.org 
[lkml]   [2013]   [Apr]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 6/6] add documentation on proc.txt
Hello Dave,

On Mon, Apr 22, 2013 at 09:17:10AM -0700, Dave Hansen wrote:
> On 04/22/2013 01:45 AM, Minchan Kim wrote:
> > +The /proc/PID/reclaim is used to reclaim pages in this process.
> > +To reclaim file-backed pages,
> > + > echo 1 > /proc/PID/reclaim
> > +
> > +To reclaim anonymous pages,
> > + > echo 2 > /proc/PID/reclaim
> > +
> > +To reclaim both pages,
> > + > echo 3 > /proc/PID/reclaim
>
> This seems to be in the same spirit as /proc/sys/vm/drop_caches. That's
> not a sin in and of itself. But, why use numbers here?
>
> Any chance I could talk you in to using some strings, say like:
>
> echo 'anonymous' > /proc/PID/reclaim
> echo 'anonymous|file' > /proc/PID/reclaim

I discussed with Namhyung about interface.
His suggestion looks sane to me.

echo 'file' > /proc/PID/reclaim
echo 'anon' > /proc/PID/reclaim
echo 'both' > /proc/PID/reclaim

For range reclaim,

echo $((1<<20)) 8192 > /proc/PID/reclaim.

IOW, we don't need any type for range reclaim because only thing
user takes care is address range which has mapped page regardless
of that it's anon or file.

Does it make sense to you?

--
Kind regards,
Minchan Kim


\
 
 \ /
  Last update: 2013-04-23 04:21    [W:0.061 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site