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: <20150330152321.GB5849@node.dhcp.inet.fi>
Date:	Mon, 30 Mar 2015 18:23:21 +0300
From:	"Kirill A. Shutemov" <kirill@...temov.name>
To:	"Aneesh Kumar K.V" <aneesh.kumar@...ux.vnet.ibm.com>
Cc:	"Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Andrea Arcangeli <aarcange@...hat.com>,
	Dave Hansen <dave.hansen@...el.com>,
	Hugh Dickins <hughd@...gle.com>, Mel Gorman <mgorman@...e.de>,
	Rik van Riel <riel@...hat.com>,
	Vlastimil Babka <vbabka@...e.cz>,
	Christoph Lameter <cl@...two.org>,
	Naoya Horiguchi <n-horiguchi@...jp.nec.com>,
	Steve Capper <steve.capper@...aro.org>,
	Johannes Weiner <hannes@...xchg.org>,
	Michal Hocko <mhocko@...e.cz>,
	Jerome Marchand <jmarchan@...hat.com>,
	linux-kernel@...r.kernel.org, linux-mm@...ck.org
Subject: Re: [PATCHv4 19/24] thp, mm: use migration entries to freeze page
 counts on split

On Mon, Mar 30, 2015 at 07:49:43PM +0530, Aneesh Kumar K.V wrote:
> "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com> writes:
> 
> > Currently, we rely on compound_lock() to get page counts stable on
> > splitting page refcounting. To get it work we also take the lock on
> > get_page() and put_page() which is hot path.
> >
> > This patch rework splitting code to setup migration entries to stabilaze
> > page count/mapcount before distribute refcounts. It means we don't need
> > to compound lock in get_page()/put_page().
> >
> > Signed-off-by: Kirill A. Shutemov <kirill.shutemov@...ux.intel.com>
> > ---
> >  include/linux/migrate.h |   3 +
> >  include/linux/mm.h      |   1 +
> >  include/linux/pagemap.h |   9 ++-
> >  mm/huge_memory.c        | 188 +++++++++++++++++++++++++++++++++++-------------
> >  mm/internal.h           |  26 +++++--
> >  mm/migrate.c            |  79 +++++++++++---------
> >  mm/rmap.c               |  21 ------
> >  7 files changed, 218 insertions(+), 109 deletions(-)
> >
> > diff --git a/include/linux/migrate.h b/include/linux/migrate.h
> > index 78baed5f2952..b9bc86c24829 100644
> > --- a/include/linux/migrate.h
> > +++ b/include/linux/migrate.h
> > @@ -43,6 +43,9 @@ extern int migrate_page_move_mapping(struct address_space *mapping,
> >  		struct page *newpage, struct page *page,
> >  		struct buffer_head *head, enum migrate_mode mode,
> >  		int extra_count);
> > +extern int __remove_migration_pte(struct page *new, struct vm_area_struct *vma,
> > +		unsigned long addr, pte_t *ptep, struct page *old);
> > +
> >  #else
> >
> >  static inline void putback_movable_pages(struct list_head *l) {}
> > diff --git a/include/linux/mm.h b/include/linux/mm.h
> > index 28aeae6e553b..43a9993f1333 100644
> > --- a/include/linux/mm.h
> > +++ b/include/linux/mm.h
> > @@ -981,6 +981,7 @@ extern struct address_space *page_mapping(struct page *page);
> >  /* Neutral page->mapping pointer to address_space or anon_vma or other */
> >  static inline void *page_rmapping(struct page *page)
> >  {
> > +	page = compound_head(page);
> >  	return (void *)((unsigned long)page->mapping & ~PAGE_MAPPING_FLAGS);
> >  }
> >
> 
> The above hunk is related to this patch ?. Are we calling page_rmapping
> on tail pages now ? If so it needs additonal comment why we handle them
> differently now. Or split it to a seperate patch ?

This change is already in -mm via my patchset on tail pages vs. ->mapping
and page falgs.

-- 
 Kirill A. Shutemov
--
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