From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail172.messagelabs.com (mail172.messagelabs.com [216.82.254.3]) by kanga.kvack.org (Postfix) with SMTP id 37D0D6B00D1 for ; Mon, 23 Mar 2009 05:50:20 -0400 (EDT) From: David Howells In-Reply-To: <1237752784-1989-3-git-send-email-hannes@cmpxchg.org> References: <1237752784-1989-3-git-send-email-hannes@cmpxchg.org> <20090321102044.GA3427@cmpxchg.org> Subject: Re: [patch 3/3] mm: keep pages from unevictable mappings off the LRU lists Date: Mon, 23 Mar 2009 10:53:27 +0000 Message-ID: <12135.1237805607@redhat.com> Sender: owner-linux-mm@kvack.org To: Johannes Weiner Cc: dhowells@redhat.com, Andrew Morton , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Nick Piggin , KOSAKI Motohiro , Rik van Riel , Peter Zijlstra , MinChan Kim , Lee Schermerhorn List-ID: Johannes Weiner wrote: > - if (page_is_file_cache(page)) > + if (mapping_unevictable(mapping)) > + add_page_to_unevictable_list(page); > + else if (page_is_file_cache(page)) It would be nice to avoid adding an extra test and branch in here. This function is used a lot, and quite often we know the answer to the first test before we even get here. David -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org