Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp913592pxa; Sat, 22 Aug 2020 04:38:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxiVLo2IzIzT9j9s1RYsceuTbGDtqR0q4pROnFKQTZdOrKOR2rQAYyPoDs9FkmhQTMRL599 X-Received: by 2002:a17:906:401b:: with SMTP id v27mr6997516ejj.300.1598096303308; Sat, 22 Aug 2020 04:38:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598096303; cv=none; d=google.com; s=arc-20160816; b=0lLApC2CixTj3CtGs2gbHANT8WlUgxdECtGq0SkJU+VV2+x/g10fpWCphFH4LosbUV XPgHzsqjcXdtoAPw/2K2dOI+5j0R9+KMhGSNzcuSDsMnHJEQFl4G2T7zMbkxyPlM/0sZ tis3IAAWWkVfrFKDGB8zU1IMn3mmkdpPThVyEB0dA+cgj+Hfm2LKk8ruJnB0hafShpla I74OrQc36VLXIws2YXCetY14keXInnqoFwMOmtncfG33yZEUj2gla0R/4ws0SBHZDkv+ oKBAhEtPDSM5QbifF2aaIgqtOo3w99cmwLqUgrzB/d7PbH6CDJ75YwnvUlWOGQo6kVm2 Bk1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:in-reply-to:subject:cc:to:dkim-signature :dkim-signature:from; bh=VrTlXfTQ0mr2r4PG9tHDj5g5/zcZ7e5Apyec8R4JO80=; b=AhhWyGBWDy8pm4tbTkUzaSpOmLoyg9Drau2mqskrQcdxBZCfKF7R8LtoH32DnVINMx QSH2I8P0PcFFywJXWYypfEUfix9CsrG/xy3NTkJClcqMf0Hl+lVusQVb+iARQGGCO0l3 4XC68dQGB2+bWXVBunfKTvd+KQ1pcDSMpCA/SATRX2NFS+DlgbFETqUMCGt68W4hiiD9 EUsDf+K+jvyURUO9pvnszTm53XhBP1L/chKt7tbiIBFoXSsPa+hg+EEYix2oJnI/MF03 bmAblAjfQFVhGnD1SrbPLq2uirZWkCMjbvujy9m8CZe+LYhVP4VsosQpkVKisOLInJJa fFpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linutronix.de header.s=2020 header.b=QPH6iu1f; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=TnP9JVmR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t2si3185529eji.602.2020.08.22.04.37.59; Sat, 22 Aug 2020 04:38:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@linutronix.de header.s=2020 header.b=QPH6iu1f; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=TnP9JVmR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728005AbgHVLfi (ORCPT + 99 others); Sat, 22 Aug 2020 07:35:38 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:33434 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727113AbgHVLfN (ORCPT ); Sat, 22 Aug 2020 07:35:13 -0400 From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1598096111; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to; bh=VrTlXfTQ0mr2r4PG9tHDj5g5/zcZ7e5Apyec8R4JO80=; b=QPH6iu1f2Q5BcdlrzLVmIwbKY+XxWNDtVWxVQQhfdCPvKNJpjUqVVBU3R7Ug0j43YfWjlW G1YHJ0uMze7bIVDoVAKvGpAzH5QhcC/0jTEfVYDa99032n/tyPUdLLpvteJImeYKTL2dS9 OtkkGU+gKHeCDf86yY6D8B3UAePYSJIgEp3/12u5Td/LJg4+ivzZ65KWFsDmEKKVtlzSVT 6P06fovRtEVhB/u0eT6qSlv8vRNVwjCjlOhP6GXM5CT7yRmobl1hYvZkPIZ0+T/DsQdpey k13Mzq0lI1cx/eym0XEAS0ScTmL9grRKngwWaEyteyskV8FPr4brgjBObiD+KA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1598096111; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to; bh=VrTlXfTQ0mr2r4PG9tHDj5g5/zcZ7e5Apyec8R4JO80=; b=TnP9JVmRGc0tq/EbKUL718L8usNdSBujbufvse1Z4S/5Tk/xcMFzpptVbjoIYFZW5ZRYPD DeaOeD/dXFJQoQBQ== To: Yunfeng Ye Cc: linux-kernel@vger.kernel.org, Shiyuan Hu , Hewenliang , Marc Zyngier Subject: Re: [PATCH] genirq/proc: Show percpu irq affinity In-Reply-To: Date: Sat, 22 Aug 2020 13:35:10 +0200 Message-ID: <87mu2moqvl.fsf@nanos.tec.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Aug 22 2020 at 17:33, Yunfeng Ye wrote: > On 2020/8/13 16:27, Thomas Gleixner wrote: > For example, the cmdline "irqaffinity=3D0,1,126,127" on the 128 cores sys= tem=EF=BC=9A > > [root@localhost ~]# cat /proc/irq/4/smp_affinity_list > 0-1,126-127 > > The irq 4 is "arch_timer" interrupt, which is a percpu interrupt. > > So is it necessary to show the percpu irq affinity correct? Yes, it makes sense to do so, but you used the wrong check. The correct one is: irq_settings_is_per_cpu_devid() which will not wreckage the output for other per cpu marked interrupts which never set the percpu_affinity pointer with the obvious consequences... The pointer would need a NULL check in any case, but it might be more straight forward to update affinity when percpu_affinity is initialized. Haven't looked in detail though. Thanks, tglx