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]
Date:	Thu, 22 Aug 2013 09:20:41 +0200
From:	Johannes Weiner <hannes@...xchg.org>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	Andi Kleen <andi@...stfloor.org>,
	Andrea Arcangeli <aarcange@...hat.com>,
	Greg Thelen <gthelen@...gle.com>,
	Christoph Hellwig <hch@...radead.org>,
	Hugh Dickins <hughd@...gle.com>, Jan Kara <jack@...e.cz>,
	KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
	Mel Gorman <mgorman@...e.de>,
	Minchan Kim <minchan.kim@...il.com>,
	Peter Zijlstra <peterz@...radead.org>,
	Rik van Riel <riel@...hat.com>,
	Michel Lespinasse <walken@...gle.com>,
	Seth Jennings <sjenning@...ux.vnet.ibm.com>,
	Roman Gushchin <klamm@...dex-team.ru>,
	Ozgun Erdogan <ozgun@...usdata.com>,
	Metin Doslu <metin@...usdata.com>,
	Vlastimil Babka <vbabka@...e.cz>, linux-mm@...ck.org,
	linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [patch 4/9] mm + fs: prepare for non-page entries in page cache
 radix trees

On Tue, Aug 20, 2013 at 01:59:10PM -0700, Andrew Morton wrote:
> On Sat, 17 Aug 2013 15:31:18 -0400 Johannes Weiner <hannes@...xchg.org> wrote:
> 
> > shmem mappings already contain exceptional entries where swap slot
> > information is remembered.
> > 
> > To be able to store eviction information for regular page cache,
> > prepare every site dealing with the radix trees directly to handle
> > entries other than pages.
> > 
> > The common lookup functions will filter out non-page entries and
> > return NULL for page cache holes, just as before.  But provide a raw
> > version of the API which returns non-page entries as well, and switch
> > shmem over to use it.
> > 
> >
> > ...
> >
> > -/**
> > - * find_get_page - find and get a page reference
> > - * @mapping: the address_space to search
> > - * @offset: the page index
> > - *
> > - * Is there a pagecache struct page at the given (mapping, offset) tuple?
> > - * If yes, increment its refcount and return it; if no, return NULL.
> > - */
> > -struct page *find_get_page(struct address_space *mapping, pgoff_t offset)
> > +struct page *__find_get_page(struct address_space *mapping, pgoff_t offset)
> >  {
> >  	void **pagep;
> >  	struct page *page;
> > @@ -812,24 +828,31 @@ out:
> >  
> >  	return page;
> >  }
> > -EXPORT_SYMBOL(find_get_page);
> > +EXPORT_SYMBOL(__find_get_page);
> 
> Deleting the interface documentation for a global, exported-to-modules
> function was a bit rude.
> 
> And it does need documentation, to tell people that it can return the
> non-pages.

I didn't really delete documentation as much as moving it to the new
find_get_page() definition (the above is a rename).  But yeah, I
should probably add some documentation to the new function as well.

> Does it have the same handling of non-pages as __find_get_pages()?  It
> had better, given the naming!

Yes, the only difference is single vs. multi lookup.  The underscore
versions may return non-pages, the traditional interface filters them.
--
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