From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rusty Russell Subject: Re: [patch 02/41] cpu alloc: The allocator Date: Fri, 6 Jun 2008 10:32:47 +1000 Message-ID: <200806061032.47598.rusty@rustcorp.com.au> References: <20080530035620.587204923@sgi.com> <4846AD84.2090800@sgi.com> <4846B084.6000607@cosmosbay.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: In-Reply-To: <4846B084.6000607@cosmosbay.com> Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org To: Eric Dumazet Cc: Mike Travis , Christoph Lameter , akpm@linux-foundation.org, linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, David Miller , Peter Zijlstra List-Id: linux-arch.vger.kernel.org On Thursday 05 June 2008 01:11:00 Eric Dumazet wrote: > Mike Travis a =E9crit : > > I'm a bit confused. Why is DEFINE_PER_CPU_SHARED_ALIGNED() conditi= oned > > on ifdef MODULE? > Because we had crashes when loading oprofile module, when a previous > version of oprofile used to use DEFINE_PER_CPU_SHARED_ALIGNED variabl= e > > module loader only takes into account the special section ".data.perc= pu" > and ignores ".data.percpu.shared_aligned" > > I therefore submitted two patches : Put one way, putting page-aligned per-cpu data in a separate section is= a=20 space-saving hack: one which is not really required for modules because= of=20 the low frequency of such variables. Put another way, not respecting=20 the .data.percpu.shared_aligned section in modules is a bug. But a comment would probably be nice! Cheers, Rusty. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ozlabs.org ([203.10.76.45]:43106 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753129AbYFFAdD convert rfc822-to-8bit (ORCPT ); Thu, 5 Jun 2008 20:33:03 -0400 From: Rusty Russell Subject: Re: [patch 02/41] cpu alloc: The allocator Date: Fri, 6 Jun 2008 10:32:47 +1000 References: <20080530035620.587204923@sgi.com> <4846AD84.2090800@sgi.com> <4846B084.6000607@cosmosbay.com> In-Reply-To: <4846B084.6000607@cosmosbay.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8BIT Content-Disposition: inline Message-ID: <200806061032.47598.rusty@rustcorp.com.au> Sender: linux-arch-owner@vger.kernel.org List-ID: To: Eric Dumazet Cc: Mike Travis , Christoph Lameter , akpm@linux-foundation.org, linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, David Miller , Peter Zijlstra Message-ID: <20080606003247.OrTC10OMPh4aQVt-191LnaUM2I_tAodz35JfkpS5z1Y@z> On Thursday 05 June 2008 01:11:00 Eric Dumazet wrote: > Mike Travis a écrit : > > I'm a bit confused. Why is DEFINE_PER_CPU_SHARED_ALIGNED() conditioned > > on ifdef MODULE? > Because we had crashes when loading oprofile module, when a previous > version of oprofile used to use DEFINE_PER_CPU_SHARED_ALIGNED variable > > module loader only takes into account the special section ".data.percpu" > and ignores ".data.percpu.shared_aligned" > > I therefore submitted two patches : Put one way, putting page-aligned per-cpu data in a separate section is a space-saving hack: one which is not really required for modules because of the low frequency of such variables. Put another way, not respecting the .data.percpu.shared_aligned section in modules is a bug. But a comment would probably be nice! Cheers, Rusty.