From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757371AbYJVSq2 (ORCPT ); Wed, 22 Oct 2008 14:46:28 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753714AbYJVSqV (ORCPT ); Wed, 22 Oct 2008 14:46:21 -0400 Received: from nlpi025.sbcis.sbc.com ([207.115.36.54]:39620 "EHLO nlpi025.prodigy.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752918AbYJVSqU (ORCPT ); Wed, 22 Oct 2008 14:46:20 -0400 Date: Wed, 22 Oct 2008 11:45:55 -0700 (PDT) From: Christoph Lameter X-X-Sender: cl@quilx.com To: Cyrill Gorcunov cc: Pekka Enberg , LKML Subject: Re: [RFC] SLUB - define OO_ macro instead of hardcoded numbers In-Reply-To: <20081022183055.GN9639@localhost> Message-ID: References: <20081022163530.GH9639@localhost> <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; format=flowed X-Spam-Score: -2.4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.