From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752619AbZBBPFP (ORCPT ); Mon, 2 Feb 2009 10:05:15 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752350AbZBBPFA (ORCPT ); Mon, 2 Feb 2009 10:05:00 -0500 Received: from smtp3.ultrahosting.com ([74.213.175.254]:57287 "EHLO smtp.ultrahosting.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752142AbZBBPE7 (ORCPT ); Mon, 2 Feb 2009 10:04:59 -0500 Date: Mon, 2 Feb 2009 10:00:04 -0500 (EST) From: Christoph Lameter X-X-Sender: cl@qirst.com To: Pekka Enberg cc: "Zhang, Yanmin" , Hugh Dickins , Nick Piggin , Linux Memory Management List , Linux Kernel Mailing List , Andrew Morton , Lin Ming Subject: Re: [patch] SLQB slab allocator In-Reply-To: <1233565214.17835.13.camel@penberg-laptop> Message-ID: References: <20090121143008.GV24891@wotan.suse.de> <84144f020901220201g6bdc2d5maf3395fc8b21fe67@mail.gmail.com> <1233545923.2604.60.camel@ymzhang> <1233565214.17835.13.camel@penberg-laptop> User-Agent: Alpine 1.10 (DEB 962 2008-03-14) 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 On Mon, 2 Feb 2009, Pekka Enberg wrote: > Hi Yanmin, > > On Mon, 2009-02-02 at 11:38 +0800, Zhang, Yanmin wrote: > > Can we add a checking about free memory page number/percentage in function > > allocate_slab that we can bypass the first try of alloc_pages when memory > > is hungry? > > If the check isn't too expensive, I don't any reason not to. How would > you go about checking how much free pages there are, though? Is there > something in the page allocator that we can use for this? If the free memory is low then reclaim needs to be run to increase the free memory. Falling back immediately incurs the overhead of going through the order 0 queues.