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] [day] [month] [year] [list]
Message-ID: <20100810232344.GA7001@localhost>
Date:	Wed, 11 Aug 2010 07:23:45 +0800
From:	Wu Fengguang <fengguang.wu@...el.com>
To:	Mel Gorman <mel@....ul.ie>
Cc:	Naoya Horiguchi <n-horiguchi@...jp.nec.com>, linux-mm@...ck.org,
	linux-kernel@...r.kernel.org, Andi Kleen <andi@...stfloor.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Andrea Arcangeli <aarcange@...hat.com>,
	Larry Woodman <lwoodman@...hat.com>,
	Lee Schermerhorn <Lee.Schermerhorn@...com>
Subject: Re: [PATCH 2/8] hugetlb, rmap: add reverse mapping for hugepage

On Fri, May 28, 2010 at 03:48:24PM +0100, Mel Gorman wrote:
> On Fri, May 28, 2010 at 09:29:16AM +0900, Naoya Horiguchi wrote:
> > This patch adds reverse mapping feature for hugepage by introducing
> > mapcount for shared/private-mapped hugepage and anon_vma for
> > private-mapped hugepage.
> > 
> > While hugepage is not currently swappable, reverse mapping can be useful
> > for memory error handler.
> > 
> > Without this patch, memory error handler cannot identify processes
> > using the bad hugepage nor unmap it from them. That is:
> > - for shared hugepage:
> >   we can collect processes using a hugepage through pagecache,
> >   but can not unmap the hugepage because of the lack of mapcount.
> > - for privately mapped hugepage:
> >   we can neither collect processes nor unmap the hugepage.
> > This patch solves these problems.
> > 
> > This patch include the bug fix given by commit 23be7468e8, so reverts it.
> > 
> > Dependency:
> >   "hugetlb: move definition of is_vm_hugetlb_page() to hugepage_inline.h"
> > 
> > ChangeLog since May 24.
> > - create hugetlb_inline.h and move is_vm_hugetlb_index() in it.
> > - move functions setting up anon_vma for hugepage into mm/rmap.c.
> > 
> > ChangeLog since May 13.
> > - rebased to 2.6.34
> > - fix logic error (in case that private mapping and shared mapping coexist)
> > - move is_vm_hugetlb_page() into include/linux/mm.h to use this function
> >   from linear_page_index()
> > - define and use linear_hugepage_index() instead of compound_order()
> > - use page_move_anon_rmap() in hugetlb_cow()
> > - copy exclusive switch of __set_page_anon_rmap() into hugepage counterpart.
> > - revert commit 24be7468 completely
> > 
> > Signed-off-by: Naoya Horiguchi <n-horiguchi@...jp.nec.com>
> > Cc: Andi Kleen <andi@...stfloor.org>
> > Cc: Andrew Morton <akpm@...ux-foundation.org>
> > Cc: Wu Fengguang <fengguang.wu@...el.com>
> > Cc: Mel Gorman <mel@....ul.ie>
> > Cc: Andrea Arcangeli <aarcange@...hat.com>
> > Cc: Larry Woodman <lwoodman@...hat.com>
> > Cc: Lee Schermerhorn <Lee.Schermerhorn@...com>
> 
> Ok, I could find no other problems with the hugetlb side of things in the
> first two patches. I haven't looked at the hwpoison parts but I'm assuming
> Andi has looked at those already. Thanks
> 
> Acked-by: Mel Gorman <mel@....ul.ie>

The hwpoison part looks good. We actually start by adding ugly code in
memory-failure.c to special handle huge pages, then decided that
hugetlb rmap is the way to go :)

Acked-by: Wu Fengguang <fengguang.wu@...el.com>
--
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