From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751683AbWGZQZa (ORCPT ); Wed, 26 Jul 2006 12:25:30 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751701AbWGZQZa (ORCPT ); Wed, 26 Jul 2006 12:25:30 -0400 Received: from omx1-ext.sgi.com ([192.48.179.11]:35530 "EHLO omx1.americas.sgi.com") by vger.kernel.org with ESMTP id S1751683AbWGZQZ2 (ORCPT ); Wed, 26 Jul 2006 12:25:28 -0400 Date: Wed, 26 Jul 2006 09:25:08 -0700 (PDT) From: Christoph Lameter To: Pekka Enberg cc: Heiko Carstens , Andrew Morton , linux-kernel@vger.kernel.org, Manfred Spraul Subject: Re: Re: [patch] slab: always follow arch requested alignments In-Reply-To: <84144f020607260843i15247ddai7f447f0d9422fec5@mail.gmail.com> Message-ID: References: <20060722110601.GA9572@osiris.boeblingen.de.ibm.com> <84144f020607260505s17daa5c8j6e5095eb956828ee@mail.gmail.com> <84144f020607260843i15247ddai7f447f0d9422fec5@mail.gmail.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 26 Jul 2006, Pekka Enberg wrote: > On 7/26/06, Christoph Lameter wrote: > > We intentionally discard the caller mandated alignment for debugging > > purposes. > > Disagreed. The caller mandated alignment is not a hint. It is the > required minimum alignment for objects. This has been with the slab for a long time. Lots of alignments are now ignored for the debugging case without a problem. Manfred intentionally put that in. Alignments passed to kmem_cache_create are there for performance reasons and not because unaligned object break the arch code. > On 7/26/06, Christoph Lameter wrote: > > And it changes the basic way that slab debugging works. > > Look at kmem_cache_create, we turn off debugging for both caller and > architecture mandated alignments already and the only reason we are > not doing it for Heiko is because the architecture recommended default > alignment is so large. We discard alignment for FORCED_DEBUG unless 1. object size > 4096 2. If the object size would increase unreasonably. I simply added another case. That preseves the discarding of alignment for the FORCED_DEBUG case but allows an override if operations would be impossible for not correctly aligned objects for certain caches (like in the S/390 case).