All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/1] pagemap clear_refs: modify to specify anon or mapped vma clearing
@ 2009-07-24  3:56 Moussa A. Ba
  2009-07-24  4:30 ` Matt Mackall
  0 siblings, 1 reply; 3+ messages in thread
From: Moussa A. Ba @ 2009-07-24  3:56 UTC (permalink / raw)
  To: linux-kernel
  Cc: akpm, adobriyan, mpm, mel, yinghan, npiggin, jaredeh, moussa.a.ba

This patch makes the clear_refs proc interface a bit more versatile. It 
adds support for clearing either anonymous, file mapped pages or both.

echo 1 > /proc/pid/clear_refs clears ANON pages
echo 2 > /proc/pid/clear_refs clears file mapped pages
echo 3 > /proc/pid/clear_refs clears all pages

Selectively clearing pages has a measurable impact on performance as it 
decreases the number of page walks.  We have been using this interface 
and this adds flexibility to the user space application implementing the 
reference clearing.

Moussa.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 0/1] pagemap clear_refs: modify to specify anon or mapped vma clearing
  2009-07-24  3:56 [PATCH 0/1] pagemap clear_refs: modify to specify anon or mapped vma clearing Moussa A. Ba
@ 2009-07-24  4:30 ` Matt Mackall
  2009-07-24  5:46   ` Moussa A. Ba
  0 siblings, 1 reply; 3+ messages in thread
From: Matt Mackall @ 2009-07-24  4:30 UTC (permalink / raw)
  To: Moussa A. Ba
  Cc: linux-kernel, David Rientjes, akpm, adobriyan, mel, yinghan,
	npiggin, jaredeh

On Thu, 2009-07-23 at 20:56 -0700, Moussa A. Ba wrote:
> This patch makes the clear_refs proc interface a bit more versatile. It 
> adds support for clearing either anonymous, file mapped pages or both.
> 
> echo 1 > /proc/pid/clear_refs clears ANON pages
> echo 2 > /proc/pid/clear_refs clears file mapped pages
> echo 3 > /proc/pid/clear_refs clears all pages
> 
> Selectively clearing pages has a measurable impact on performance as it 
> decreases the number of page walks.  We have been using this interface 
> and this adds flexibility to the user space application implementing the 
> reference clearing.

[adding David, the original instigator of clear_refs)

First, don't send 0 of 1 messages, especially for a single patch. It
makes Andrew curse and makes him more likely to consider other
employment possibilities. Instead incorporate highly useful info like
the above into your patch instead, preferably as docs and commit
descriptions.

Second, depending on how we've documented the behavior of this file,
this looks like it might break existing tools that are currently writing
'1' but expecting the behavior of '3'?

-- 
http://selenic.com : development and support for Mercurial and Linux



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 0/1] pagemap clear_refs: modify to specify anon or mapped vma clearing
  2009-07-24  4:30 ` Matt Mackall
@ 2009-07-24  5:46   ` Moussa A. Ba
  0 siblings, 0 replies; 3+ messages in thread
From: Moussa A. Ba @ 2009-07-24  5:46 UTC (permalink / raw)
  To: Matt Mackall
  Cc: linux-kernel, David Rientjes, akpm, adobriyan, mel, yinghan,
	npiggin, jaredeh

Matt Mackall wrote:
> On Thu, 2009-07-23 at 20:56 -0700, Moussa A. Ba wrote:
>> This patch makes the clear_refs proc interface a bit more versatile. It 
>> adds support for clearing either anonymous, file mapped pages or both.
>>
>> echo 1 > /proc/pid/clear_refs clears ANON pages
>> echo 2 > /proc/pid/clear_refs clears file mapped pages
>> echo 3 > /proc/pid/clear_refs clears all pages
>>
>> Selectively clearing pages has a measurable impact on performance as it 
>> decreases the number of page walks.  We have been using this interface 
>> and this adds flexibility to the user space application implementing the 
>> reference clearing.
> 
> [adding David, the original instigator of clear_refs)
> 
> First, don't send 0 of 1 messages, especially for a single patch. It
> makes Andrew curse and makes him more likely to consider other
> employment possibilities. Instead incorporate highly useful info like
> the above into your patch instead, preferably as docs and commit
> descriptions.
> 
> Second, depending on how we've documented the behavior of this file,
> this looks like it might break existing tools that are currently writing
> '1' but expecting the behavior of '3'?
> 

Thank you for the kind advice, I was afraid of that...  In regards to 
the behavior of 1 vs 3, this had indeed occurred to us, and it was a 
tossup.  I was hoping to get feedback first before deciding which way to 
go.  However, it does seem like a better idea to go with the default 
behavior when writing '1' and the special behaviors for 2 and 3.



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-07-24  5:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-24  3:56 [PATCH 0/1] pagemap clear_refs: modify to specify anon or mapped vma clearing Moussa A. Ba
2009-07-24  4:30 ` Matt Mackall
2009-07-24  5:46   ` Moussa A. Ba

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.