From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S266712AbUGLEOw (ORCPT ); Mon, 12 Jul 2004 00:14:52 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S266713AbUGLEOw (ORCPT ); Mon, 12 Jul 2004 00:14:52 -0400 Received: from ozlabs.org ([203.10.76.45]:32183 "EHLO ozlabs.org") by vger.kernel.org with ESMTP id S266712AbUGLEOv (ORCPT ); Mon, 12 Jul 2004 00:14:51 -0400 Date: Mon, 12 Jul 2004 10:02:19 +1000 From: Anton Blanchard To: Shai Fultheim Cc: "'Andrew Morton'" , "'Linux Kernel ML'" , "'Jes Sorensen'" , mort@wildopensource.com Subject: Re: [PATCH] PER_CPU [4/4] - PER_CPU-irq_stat Message-ID: <20040712000218.GC30109@krispykreme> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.6+20040523i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Hi, > Please find below one out of collection of patched that move NR_CPU array > variables to the per-cpu area. Please consider applying, any comment will > highly appreciated. ... > diff -Nru a/kernel/softirq.c b/kernel/softirq.c > --- a/kernel/softirq.c 2004-07-09 01:34:13 -07:00 > +++ b/kernel/softirq.c 2004-07-09 01:34:13 -07:00 > @@ -36,8 +36,8 @@ > */ > > #ifndef __ARCH_IRQ_STAT > -irq_cpustat_t irq_stat[NR_CPUS] ____cacheline_aligned; > -EXPORT_SYMBOL(irq_stat); > +DEFINE_PER_CPU(irq_cpustat_t, irq_stat) ____cacheline_maxaligned_in_smp; > +EXPORT_PER_CPU_SYMBOL(irq_stat); > #endif Is there a need for the cacheline alignment? We want to keep that per cpu data area as packed as possible, we only want to explicitly pad if we need to (eg other cpus are accessing that variable a lot). Also it looks like we will have to push the above change into the other architectures. Anton