lkml.org 
[lkml]   [2010]   [Nov]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC 2/2] Prevent promotion of page in madvise_dontneed
On Mon, Nov 22, 2010 at 02:21:09PM -0800, Andrew Morton wrote:
> On Sun, 21 Nov 2010 23:30:24 +0900
> Minchan Kim <minchan.kim@gmail.com> wrote:
>
> > Now zap_pte_range alwayas promotes pages which are pte_young &&
> > !VM_SequentialReadHint(vma). But in case of calling MADV_DONTNEED,
> > it's unnecessary since the page wouldn't use any more.
> >
> > If the page is sharred by other processes and it's real working set
>
> This patch doesn't actually do anything. It passes variable `promote'
> all the way down to unmap_vmas(), but unmap_vmas() doesn't use that new
> variable.
>
> Have a comment fixlet:
>
> --- a/mm/memory.c~mm-prevent-promotion-of-page-in-madvise_dontneed-fix
> +++ a/mm/memory.c
> @@ -1075,7 +1075,7 @@ static unsigned long unmap_page_range(st
> * @end_addr: virtual address at which to end unmapping
> * @nr_accounted: Place number of unmapped pages in vm-accountable vma's here
> * @details: details of nonlinear truncation or shared cache invalidation
> - * @promote: whether pages inclued vma would be promoted or not
> + * @promote: whether pages included in the vma should be promoted or not
> *
> * Returns the end address of the unmapping (restart addr if interrupted).
> *
> _
>
> Also, I'd suggest that we avoid introducing the term "promote".

Promote also has special meaning for huge pages. Demoting or promoting a
page refers to changing its size. The same applies to the other patch -
s/demote/deactive/ s/promote/activate/ . Currently this is no confusion
within the VM but when Andrea's THP patches are merged, it'll become an
issue.

--
Mel Gorman
Part-time Phd Student Linux Technology Center
University of Limerick IBM Dublin Software Lab


\
 
 \ /
  Last update: 2010-11-23 10:53    [W:0.305 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site