Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754065AbYHHIvz (ORCPT ); Fri, 8 Aug 2008 04:51:55 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751659AbYHHIvq (ORCPT ); Fri, 8 Aug 2008 04:51:46 -0400 Received: from extu-mxob-2.symantec.com ([216.10.194.135]:56980 "EHLO extu-mxob-2.symantec.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751308AbYHHIvp (ORCPT ); Fri, 8 Aug 2008 04:51:45 -0400 Date: Fri, 8 Aug 2008 09:51:36 +0100 (BST) From: Hugh Dickins X-X-Sender: hugh@blonde.site To: Francis Moreau cc: Rik van Riel , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: question about do_anonymous_page() In-Reply-To: <38b2ab8a0808080123t5083dc17qa250bd02c753f80d@mail.gmail.com> Message-ID: References: <38b2ab8a0808080101v795327f0n9da5adb33a3c1a9@mail.gmail.com> <38b2ab8a0808080123t5083dc17qa250bd02c753f80d@mail.gmail.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1099 Lines: 26 On Fri, 8 Aug 2008, Francis Moreau wrote: > On Fri, Aug 8, 2008 at 10:01 AM, Francis Moreau wrote: > > > > I'm wondering why do_anonymous_page() calls lru_cache_add_active(page) > > where page does not belong to the page cache ? > > > > Is it simply because lru_add_active() doesn't exist ? Yes. It just happens that whoever (Rik?) originally named that function was primarily thinking of the page cache at the time; or perhaps wasn't thinking of the file page cache at all, just regarding all the pages we put on that list as cached in some sense. You're right that it's a little anomalous, but nothing to worry about. I get more bothered by page_cache_get(), which is and always(?) has been the same thing as get_page(): sometimes we use one, sometimes the other, and often we use page_cache_get() on anonymous pages. Hugh -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/