From mboxrd@z Thu Jan 1 00:00:00 1970 Subject: Re: [patch 5/9] slub: Fallback to minimal order during slab page allocation From: "Zhang, Yanmin" In-Reply-To: References: <20080317230516.078358225@sgi.com> <20080317230528.939792410@sgi.com> <1205989839.14496.32.camel@ymzhang> Content-Type: text/plain; charset=utf-8 Date: Fri, 21 Mar 2008 08:52:18 +0800 Message-Id: <1206060738.14496.66.camel@ymzhang> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org Return-Path: To: Christoph Lameter Cc: Pekka Enberg , Mel Gorman , Matt Mackall , linux-mm@kvack.org List-ID: On Thu, 2008-03-20 at 11:29 -0700, Christoph Lameter wrote: > On Thu, 20 Mar 2008, Zhang, Yanmin wrote: > > > page->objects = (PAGE_SIZE << get_order(s->size)) / s->size; > > > > > > It'll look more readable and be simplified. > > The earlier version of the fallback had that. > > However, its a division in a potentially hot codepath. No as long as there is no allocation failure because of fragmentation. > And some architectures have slow division logic. That's ok. I just want it to be more readable for others. -- 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