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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LSU.2.00.1210031418410.14458@eggly.anvils>
Date:	Wed, 3 Oct 2012 14:29:14 -0700 (PDT)
From:	Hugh Dickins <hughd@...gle.com>
To:	David Rientjes <rientjes@...gle.com>
cc:	Andrew Morton <akpm@...ux-foundation.org>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Andrea Arcangeli <aarcange@...hat.com>,
	Naoya Horiguchi <n-horiguchi@...jp.nec.com>,
	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>,
	Johannes Weiner <hannes@...xchg.org>,
	Michel Lespinasse <walken@...gle.com>,
	linux-kernel@...r.kernel.org, linux-mm@...ck.org
Subject: Re: [patch -mm] mm, thp: fix mlock statistics fix

On Wed, 3 Oct 2012, David Rientjes wrote:
> On Wed, 3 Oct 2012, Andrew Morton wrote:
> 
> > The free_page_mlock() hunk gets dropped because free_page_mlock() is
> > removed.  And clear_page_mlock() doesn't need this treatment.  But
> > please check my handiwork.
> > 
> 
> I reviewed what was merged into -mm and clear_page_mlock() does need this 
> fix as well.  It's an easy fix, there's no need to pass "anon" into 
> clear_page_mlock() since PageHuge() is already checked in its only caller.
> 
> 
> mm, thp: fix mlock statistics fix
> 
> Signed-off-by: David Rientjes <rientjes@...gle.com>

Acked-by: Hugh Dickins <hughd@...gle.com>

Thanks for providing that, David, I was just on the point of building
and working out a test, suspecting that what you've added is necessary.

Probably some equivalent always was missing, but between the THP Mlock
counting issue that you're fixing, and the Mlock counting issue that
I'm fixing by moving the clear_page_mlock, it's hard to say just where.

While clear_page_mlock was being called from truncate.c, we knew that
it couldn't happen on a THP.  But now that it's from page_remove_rmap,
yes, we do want to add in this additional fix.

Hugh

> ---
>  mm/mlock.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/mm/mlock.c b/mm/mlock.c
> --- a/mm/mlock.c
> +++ b/mm/mlock.c
> @@ -56,7 +56,8 @@ void clear_page_mlock(struct page *page)
>  	if (!TestClearPageMlocked(page))
>  		return;
>  
> -	dec_zone_page_state(page, NR_MLOCK);
> +	mod_zone_page_state(page_zone(page), NR_MLOCK,
> +			    -hpage_nr_pages(page));
>  	count_vm_event(UNEVICTABLE_PGCLEARED);
>  	if (!isolate_lru_page(page)) {
>  		putback_lru_page(page);
--
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