From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752055Ab3HTU7P (ORCPT ); Tue, 20 Aug 2013 16:59:15 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:37467 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751142Ab3HTU7M (ORCPT ); Tue, 20 Aug 2013 16:59:12 -0400 Date: Tue, 20 Aug 2013 13:59:10 -0700 From: Andrew Morton To: Johannes Weiner Cc: Andi Kleen , Andrea Arcangeli , Greg Thelen , Christoph Hellwig , Hugh Dickins , Jan Kara , KOSAKI Motohiro , Mel Gorman , Minchan Kim , Peter Zijlstra , Rik van Riel , Michel Lespinasse , Seth Jennings , Roman Gushchin , Ozgun Erdogan , Metin Doslu , Vlastimil Babka , linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [patch 4/9] mm + fs: prepare for non-page entries in page cache radix trees Message-Id: <20130820135910.6e6da048131bc841404906be@linux-foundation.org> In-Reply-To: <1376767883-4411-5-git-send-email-hannes@cmpxchg.org> References: <1376767883-4411-1-git-send-email-hannes@cmpxchg.org> <1376767883-4411-5-git-send-email-hannes@cmpxchg.org> X-Mailer: Sylpheed 3.2.0beta5 (GTK+ 2.24.10; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 17 Aug 2013 15:31:18 -0400 Johannes Weiner 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. Does it have the same handling of non-pages as __find_get_pages()? It had better, given the naming! > > ... >