lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20101122142109.2f3e168c.akpm@linux-foundation.org>
Date:	Mon, 22 Nov 2010 14:21:09 -0800
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Minchan Kim <minchan.kim@...il.com>
Cc:	linux-mm <linux-mm@...ck.org>, LKML <linux-kernel@...r.kernel.org>,
	Rik van Riel <riel@...hat.com>,
	KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
	Johannes Weiner <hannes@...xchg.org>,
	Nick Piggin <npiggin@...nel.dk>
Subject: Re: [RFC 2/2] Prevent promotion of page in madvise_dontneed

On Sun, 21 Nov 2010 23:30:24 +0900
Minchan Kim <minchan.kim@...il.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".  It
isn't a term which is presently used in Linux MM.  Probably "activate"
has a better-known meaning.

And `activate' could be a bool if one is in the mood for that.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ