From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758689AbYJVS4i (ORCPT ); Wed, 22 Oct 2008 14:56:38 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1757133AbYJVSwo (ORCPT ); Wed, 22 Oct 2008 14:52:44 -0400 Received: from mail-gx0-f29.google.com ([209.85.217.29]:62284 "EHLO mail-gx0-f29.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758627AbYJVSwn (ORCPT ); Wed, 22 Oct 2008 14:52:43 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=ZKXLJLoN1WoWz/hhsiCT2GSYN7eDg0P2GjBPzSAb41DZX9MZRlmpGOCL9RuHN+uO+g Zhs3JMWtF9p+wGw8gEvGkz9zOpEiofRi6T6aA+JUGffVkJivRAbZz5qzb6PliHjN2YWE Y+k0YDLeLz/Uz8Zu0CRT6SKHAtsboDEKg93pQ= Date: Wed, 22 Oct 2008 22:52:37 +0400 From: Cyrill Gorcunov To: Christoph Lameter Cc: Pekka Enberg , LKML Subject: Re: [RFC] SLUB - define OO_ macro instead of hardcoded numbers Message-ID: <20081022185237.GB4218@localhost> References: <20081022165354.GI9639@localhost> <20081022172103.GJ9639@localhost> <48FF6800.20705@cs.helsinki.fi> <20081022175827.GL9639@localhost> <20081022181556.GM9639@localhost> <20081022183055.GN9639@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17+20080114 (2008-01-14) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [Christoph Lameter - Wed, Oct 22, 2008 at 11:45:55AM -0700] > On Wed, 22 Oct 2008, Cyrill Gorcunov wrote: > >> Looks really good for me (if it worth anything). But Christoph >> doesn't OO_SHIT inspired by u16 too which means we could use >> MAX_OBJ_PER_PAGE in form you mentoined but maybe we should define >> >> #define OO_SHIFT bits_in(page.objects) to point out why we use >> 16 not 14, not 18 or whatever? How do you think? > > > The choice of the bit size in page.objects is determined by the available > bytes there. The choice of the OO_SHIFT (nice typo there) is determined > by the use of a 32bit int that we want to cut into two halves. > Ah... I see. So wouldn't you mind to just mentoin page.objects in comment like 'since page.objects is u16' instead of bits_in magic? Anyone who will (if any) changing page structure is to grep the sources and find this comment and will fix MAX_OBJS_PER_PAGE definition. - Cyrill -