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: <20130326104810.C7F3AE0085@blue.fi.intel.com>
Date:	Tue, 26 Mar 2013 12:48:10 +0200 (EET)
From:	"Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>
To:	Dave Hansen <dave@...1.net>
Cc:	"Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
	Andrea Arcangeli <aarcange@...hat.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Al Viro <viro@...iv.linux.org.uk>,
	Hugh Dickins <hughd@...gle.com>,
	Wu Fengguang <fengguang.wu@...el.com>, Jan Kara <jack@...e.cz>,
	Mel Gorman <mgorman@...e.de>, linux-mm@...ck.org,
	Andi Kleen <ak@...ux.intel.com>,
	Matthew Wilcox <matthew.r.wilcox@...el.com>,
	"Kirill A. Shutemov" <kirill@...temov.name>,
	Hillf Danton <dhillf@...il.com>, linux-fsdevel@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCHv2, RFC 13/30] thp, mm: implement
 grab_cache_huge_page_write_begin()

Dave Hansen wrote:
> > +repeat:
> > +	page = find_lock_page(mapping, index);
> > +	if (page) {
> > +		if (!PageTransHuge(page)) {
> > +			unlock_page(page);
> > +			page_cache_release(page);
> > +			return NULL;
> > +		}
> > +		goto found;
> > +	}
> > +
> > +	page = alloc_pages(gfp_mask & ~gfp_notmask, HPAGE_PMD_ORDER);
> 
> I alluded to this a second ago, but what's wrong with alloc_hugepage()?

It's defined only for !CONFIG_NUMA and only inside mm/huge_memory.c.

> > +found:
> > +	wait_on_page_writeback(page);
> > +	return page;
> > +}
> > +#endif
> 
> So, I diffed :
> 
> -struct page *grab_cache_page_write_begin(struct address_space
> vs.
> +struct page *grab_cache_huge_page_write_begin(struct address_space
> 
> They're just to similar to ignore.  Please consolidate them somehow.

Will do.

> > +found:
> > +	wait_on_page_writeback(page);
> > +	return page;
> > +}
> > +#endif
> 
> In grab_cache_page_write_begin(), this "wait" is:
> 
>         wait_for_stable_page(page);
> 
> Why is it different here?

It was wait_on_page_writeback() in grab_cache_page_write_begin() when I forked
it :(

See 1d1d1a7 mm: only enforce stable page writes if the backing device requires it

Consolidation will fix this.

-- 
 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