From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail144.messagelabs.com (mail144.messagelabs.com [216.82.254.51]) by kanga.kvack.org (Postfix) with SMTP id 8FA946B0044 for ; Thu, 22 Jan 2009 04:30:46 -0500 (EST) Subject: Re: [patch] SLQB slab allocator From: "Zhang, Yanmin" In-Reply-To: <1232616430.14549.11.camel@penberg-laptop> References: <84144f020901140645o68328e01ne0e10ace47555e19@mail.gmail.com> <20090114150900.GC25401@wotan.suse.de> <20090114152207.GD25401@wotan.suse.de> <84144f020901140730l747b4e06j41fb8a35daeaf6c8@mail.gmail.com> <20090114155923.GC1616@wotan.suse.de> <20090115061931.GC17810@wotan.suse.de> <20090116034356.GM17810@wotan.suse.de> <20090119061856.GB22584@wotan.suse.de> <1232616430.14549.11.camel@penberg-laptop> Content-Type: text/plain Date: Thu, 22 Jan 2009 17:30:38 +0800 Message-Id: <1232616638.11429.131.camel@ymzhang> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org To: Pekka Enberg Cc: Christoph Lameter , Nick Piggin , Lin Ming , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrew Morton , Linus Torvalds List-ID: On Thu, 2009-01-22 at 11:27 +0200, Pekka Enberg wrote: > Hi Christoph, > > On Mon, 19 Jan 2009, Nick Piggin wrote: > > > > > You only go to the allocator when the percpu queue goes empty though, so > > > > > if memory policy changes (eg context switch or something), then subsequent > > > > > allocations will be of the wrong policy. > > > > > > > > The per cpu queue size in SLUB is limited by the queues only containing > > > > objects from the same page. If you have large queues like SLAB/SLQB(?) > > > > then this could be an issue. > > > > > > And it could be a problem in SLUB too. Chances are that several allocations > > > will be wrong after every policy switch. I could describe situations in which > > > SLUB will allocate with the _wrong_ policy literally 100% of the time. > > On Wed, 2009-01-21 at 19:13 -0500, Christoph Lameter wrote: > > No it cannot because in SLUB objects must come from the same page. > > Multiple objects in a queue will only ever require a single page and not > > multiple like in SLAB. > > There's one potential problem with "per-page queues", though. The bigger > the object, the smaller the "queue" (i.e. less objects per page). Also, > partial lists are less likely to help for big objects because they get > emptied so quickly and returned to the page allocator. Perhaps we should > do a small "full list" for caches with large objects? That helps definitely. We could use a batch to control the list size. -- 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