Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755578AbZCWKys (ORCPT ); Mon, 23 Mar 2009 06:54:48 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754477AbZCWKyh (ORCPT ); Mon, 23 Mar 2009 06:54:37 -0400 Received: from mx2.redhat.com ([66.187.237.31]:54718 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754123AbZCWKyg (ORCPT ); Mon, 23 Mar 2009 06:54:36 -0400 Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 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> 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 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: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 629 Lines: 17 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 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/