Received: by 10.213.65.68 with SMTP id h4csp1058428imn; Wed, 28 Mar 2018 19:30:29 -0700 (PDT) X-Google-Smtp-Source: AIpwx48bwLYzBJIOgR4awah3DpqNY+lKmZv1Ee6vKoH9sGBDfxKYoa6RrtaA6XkovyDdiHTCnTBx X-Received: by 2002:a17:902:1744:: with SMTP id i62-v6mr6374966pli.62.1522290629094; Wed, 28 Mar 2018 19:30:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522290629; cv=none; d=google.com; s=arc-20160816; b=WozVnNOnZAFHU+NeuSbFutY9y6/pCc5HFZXmmKK6/Iwc+6HKxeCug82mt7LfHotFqK U5uxLcWOJEfWUni1Z6AD9hdzRMzA5WmbkDTtb9JdKm6dR63t/H+KXTun3Jv7ed/4Onqd 7pNLRt+l3s5d6HnPHUoBqAXQxYDVcKfm1UqRXtboU6i6W0hgBSjyL6AO1juy/P51crTh fbRzByvAOuF9Z/YCkCDC5IRh93J6jjZNSNE/IbBXJjHKzp/xFU85tG3Evsi5/fUIgY2E 6+fe1TyAVuw3Tf1HAMaDhCZyVFH17SQPbv0HpiLsuzkmqrykWX0O1SXfaRKZwkgE+p+R we6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dmarc-filter:arc-authentication-results; bh=3nGicCcALmL31L8C/dI8Q85tmQu2c4mE9sTYPIfODG0=; b=LGpBaFBN6DPau3tqeQsUpCN5gs62q2AHUrk84tAAqpyr552okXGu8Ali5WX9GC1Wac 2+0+5qMpRLZM9yd0D+0Jod8sVJQsxldy2ZILJTDSxvWeBORueHtGyCsLoHYZq3dISAJZ Gef8MZkGHyh8m4IEsMuWFtv/YMQsyNkz/l31hGBt3XsnncUoG+pCpfRtBVra+OOszV1V NXChsYghzY1LLhk9TLxkihsY4rMNy5fOCK25SvkcomGji2xUco8nmq5eQ0InMLTQdhTF uHpCzXNvCAgfBKvGIfRa0FoQDsoWQTv0CvDNC/WAVqiTV5o90cUbaXE7+hjCjtPYqUP9 q0Gw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d9-v6si4996823plj.551.2018.03.28.19.30.15; Wed, 28 Mar 2018 19:30:29 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751980AbeC2C13 (ORCPT + 99 others); Wed, 28 Mar 2018 22:27:29 -0400 Received: from mail.kernel.org ([198.145.29.99]:42214 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751147AbeC2C10 (ORCPT ); Wed, 28 Mar 2018 22:27:26 -0400 Received: from lerouge.home (LFbn-1-18526-44.w90-101.abo.wanadoo.fr [90.101.68.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B7F8A21834; Thu, 29 Mar 2018 02:27:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B7F8A21834 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=frederic@kernel.org From: Frederic Weisbecker To: LKML Cc: Frederic Weisbecker , Sebastian Andrzej Siewior , Tony Luck , Peter Zijlstra , "David S . Miller" , Michael Ellerman , Helge Deller , Benjamin Herrenschmidt , Paul Mackerras , Thomas Gleixner , Ingo Molnar , Fenghua Yu , "James E . J . Bottomley" Subject: [PATCH 03/10] softirq: Turn default irq_cpustat_t to standard per-cpu Date: Thu, 29 Mar 2018 04:26:58 +0200 Message-Id: <1522290425-22844-4-git-send-email-frederic@kernel.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1522290425-22844-1-git-send-email-frederic@kernel.org> References: <1522290425-22844-1-git-send-email-frederic@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In order to optimize and consolidate softirq mask accesses, let's convert the default irq_cpustat_t implementation to per-CPU standard API. Signed-off-by: Frederic Weisbecker Cc: Thomas Gleixner Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Sebastian Andrzej Siewior Cc: David S. Miller Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: James E.J. Bottomley Cc: Helge Deller Cc: Tony Luck Cc: Fenghua Yu --- include/linux/irq_cpustat.h | 4 ++-- kernel/softirq.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/linux/irq_cpustat.h b/include/linux/irq_cpustat.h index 4954948..ddea03c 100644 --- a/include/linux/irq_cpustat.h +++ b/include/linux/irq_cpustat.h @@ -18,8 +18,8 @@ */ #ifndef __ARCH_IRQ_STAT -extern irq_cpustat_t irq_stat[]; /* defined in asm/hardirq.h */ -#define __IRQ_STAT(cpu, member) (irq_stat[cpu].member) +DECLARE_PER_CPU_ALIGNED(irq_cpustat_t, irq_stat); /* defined in asm/hardirq.h */ +#define __IRQ_STAT(cpu, member) (per_cpu(irq_stat.member, cpu)) #endif /* arch independent irq_stat fields */ diff --git a/kernel/softirq.c b/kernel/softirq.c index 24d243e..fdbb171 100644 --- a/kernel/softirq.c +++ b/kernel/softirq.c @@ -49,8 +49,8 @@ */ #ifndef __ARCH_IRQ_STAT -irq_cpustat_t irq_stat[NR_CPUS] ____cacheline_aligned; -EXPORT_SYMBOL(irq_stat); +DEFINE_PER_CPU_ALIGNED(irq_cpustat_t, irq_stat); +EXPORT_PER_CPU_SYMBOL(irq_stat); #endif static struct softirq_action softirq_vec[NR_SOFTIRQS] __cacheline_aligned_in_smp; -- 2.7.4