Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp889547pxj; Fri, 21 May 2021 01:17:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwgEbApVcipGZbKshd+WMELv2bczzmth3/6LAXVIIUWHphimNv9Rm74S7PGi9uJPBHYkzkg X-Received: by 2002:a92:c00b:: with SMTP id q11mr9907727ild.192.1621585033661; Fri, 21 May 2021 01:17:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621585033; cv=none; d=google.com; s=arc-20160816; b=z+cA62+GKLArgeNzM/0D9ixOtrVsQij1TcsdfS28uOW4ZVl0bu3b7LsCqP6NClGjaA QZhn/P+PSgm/5bLWIG6cJ+fyrMFt0c1nlaFSiZFw37xVS8eL/Af9IhZmEHlCCsfMO9NM OyDrgH4MYsf0TugDovOmdmLj6ud8sese2hSSvRSPNEheCZWJCmTs/MoJmPO8lKxQuJix W9Ov/QtCDuEMEVGKdYyK48DqS80jRHNiIsESPDK5ihp61T/6p6tgFgdfxR1zZ3HPmU3j NPr99pWpENsnMLoKIGctFKChR6tEChlYH8Ob+JA71hwgzVqpor5miqZbs1FCCclTmjmy 2Itw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=GkTVO6S3XAPMr10XOopEA4GoA4JfOcUYU8NEFBnvEmw=; b=Fm547j9Q1VqcymALjC6vvAPqvnGN99wpdmMvn6+ciMqZOUWTvzB5VeqTOctqWNrKtO tHg6/yRctN332um1n7F17i8W3M7qDjm6bFH0/GISZUD8qBCFa0lFafZDkZGqXSgb9NZZ Bbh9K8pjxtpFj3S1/iY1Zq5Z4SidG5m5y3j/zgsAaXXIwBh+H2y3kk4Aq0mizdRnnx8Z H0GUAe0QI25sfXMefRQko3jXJThSM2yfB+2LBQN3iSZhyleeAYwZXcRemymuBdzFPTBv fryF3M9S5SD/mQawEieoo8rWTuP7gdjmPkV80qeU01l/Jp7eAAErdQgMIzLLcgQTElr8 YVJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=EwhDTqqA; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g16si4994428jat.43.2021.05.21.01.17.01; Fri, 21 May 2021 01:17:13 -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=pass header.i=@redhat.com header.s=mimecast20190719 header.b=EwhDTqqA; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231131AbhETV7Z (ORCPT + 99 others); Thu, 20 May 2021 17:59:25 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:44871 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230382AbhETV7Z (ORCPT ); Thu, 20 May 2021 17:59:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1621547882; 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: in-reply-to:in-reply-to:references:references; bh=GkTVO6S3XAPMr10XOopEA4GoA4JfOcUYU8NEFBnvEmw=; b=EwhDTqqAs7+utTxkJs684STWDNHvS1MAkGiZ+x+ORB3iqrXkayO4UDVPRlgrHnx5cRbPTA /wkEHbmAIqeNrAQ+FvB7maSr0qLgN0sxlbxRZidwq10SmZNZLQ3BNx9mSyBJFTCTp5Vk9N OI1N+Whoj/dYr8D+PZRMrvaf/2UL5cE= Received: from mail-lf1-f72.google.com (mail-lf1-f72.google.com [209.85.167.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-155--LqHsrqFPU66PZS8VrCMjg-1; Thu, 20 May 2021 17:58:01 -0400 X-MC-Unique: -LqHsrqFPU66PZS8VrCMjg-1 Received: by mail-lf1-f72.google.com with SMTP id y13-20020a19640d0000b02901ca10a3cf33so4405574lfb.21 for ; Thu, 20 May 2021 14:58:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=GkTVO6S3XAPMr10XOopEA4GoA4JfOcUYU8NEFBnvEmw=; b=rWPM+YRUqCgr8+26Dl1R6MhZLBWCf8bmpwBMLUvaTdH8MvzLTwXtrT3D4r/cRe8Q3E 0oGcAF7YPEd1hzjSKu1YgV+pYLoJWc5PERL5vPbDg7gO7HrYduO8yhMsJo6cS4SHL6CG hiEfbiKdm5YGFw3rDIiGJ4ljf3tWtM+i9aPVR2oPY6KR1fy/iI3hBFrEyVtsW6XA8pPE yl4BkYSF2XLumVxwkuD77/Db5BoNFITlueXDkO6RzMyWBikfbARl34+Dhtdr/vkb94kp x+CEGjt/bFIFFPOqQ0NqLReo5cU2P979kiAPLRTjX2giJrm2vIR5FbsM+81Rf4a7Iauy 6kRw== X-Gm-Message-State: AOAM530qKrL42cGp+8vxKqvJpnfrqyPb6e15CtVzXXRTq/R53jw3dQOf 67KjExbjjz5BZF2bp2p43FWzq+OJ3C2KGc6X29Jy7a5squ9VhGitVtkI1T1SLfLDnM+/q/PXgj9 eZjGoBcHIDEa6zVH9HtPx2U8YxeD60nIMEFkvYIJt X-Received: by 2002:a05:6512:3b93:: with SMTP id g19mr4668365lfv.548.1621547879543; Thu, 20 May 2021 14:57:59 -0700 (PDT) X-Received: by 2002:a05:6512:3b93:: with SMTP id g19mr4668344lfv.548.1621547879329; Thu, 20 May 2021 14:57:59 -0700 (PDT) MIME-Version: 1.0 References: <20210504092340.00006c61@intel.com> <87pmxpdr32.ffs@nanos.tec.linutronix.de> <87im3gewlu.ffs@nanos.tec.linutronix.de> In-Reply-To: From: Nitesh Lal Date: Thu, 20 May 2021 17:57:47 -0400 Message-ID: Subject: Re: [PATCH tip:irq/core v1] genirq: remove auto-set of the mask when setting the hint To: Thomas Gleixner , Jesse Brandeburg , Robin Murphy , Marcelo Tosatti Cc: Ingo Molnar , linux-kernel@vger.kernel.org, intel-wired-lan@lists.osuosl.org, jbrandeb@kernel.org, "frederic@kernel.org" , "juri.lelli@redhat.com" , Alex Belits , "linux-api@vger.kernel.org" , "bhelgaas@google.com" , "linux-pci@vger.kernel.org" , "rostedt@goodmis.org" , "peterz@infradead.org" , "davem@davemloft.net" , "akpm@linux-foundation.org" , "sfr@canb.auug.org.au" , "stephen@networkplumber.org" , "rppt@linux.vnet.ibm.com" , "jinyuqi@huawei.com" , "zhangshaokun@hisilicon.com" , netdev@vger.kernel.org, chris.friesen@windriver.com, Marc Zyngier , Neil Horman , pjwaskiewicz@gmail.com Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 17, 2021 at 8:23 PM Nitesh Lal wrote: > > On Mon, May 17, 2021 at 8:04 PM Thomas Gleixner wrote: > > > > On Mon, May 17 2021 at 18:44, Nitesh Lal wrote: > > > On Mon, May 17, 2021 at 4:48 PM Thomas Gleixner wrote: > > >> The hint was added so that userspace has a better understanding where it > > >> should place the interrupt. So if irqbalanced ignores it anyway, then > > >> what's the point of the hint? IOW, why is it still used drivers? > > >> > > > Took a quick look at the irqbalance repo and saw the following commit: > > > > > > dcc411e7bf remove affinity_hint infrastructure > > > > > > The commit message mentions that "PJ is redesiging how affinity hinting > > > works in the kernel, the future model will just tell us to ignore an IRQ, > > > and the kernel will handle placement for us. As such we can remove the > > > affinity_hint recognition entirely". > > > > No idea who PJ is. I really love useful commit messages. Maybe Neil can > > shed some light on that. > > > > > This does indicate that apparently, irqbalance moved away from the usage of > > > affinity_hint. However, the next question is what was this future > > > model? > > > > I might have missed something in the last 5 years, but that's the first > > time I hear about someone trying to cleanup that thing. > > > > > I don't know but I can surely look into it if that helps or maybe someone > > > here already knows about it? > > > > I CC'ed Neil :) > > Thanks, I have added PJ Waskiewicz as well who I think was referred in > that commit message as PJ. > > > > > >> Now there is another aspect to that. What happens if irqbalanced does > > >> not run at all and a driver relies on the side effect of the hint > > >> setting the initial affinity. Bah... > > >> > > > > > > Right, but if they only rely on this API so that the IRQs are spread across > > > all the CPUs then that issue is already resolved and these other drivers > > > should not regress because of changing this behavior. Isn't it? > > > > Is that true for all architectures? > > Unfortunately, I don't know and that's probably why we have to be careful. I think here to ensure that we are not breaking any of the drivers we have to first analyze all the existing drivers and understand how they are using this API. AFAIK there are three possible scenarios: - A driver use this API to spread the IRQs + For this case we should be safe considering the spreading is naturally done from the IRQ subsystem itself. - A driver use this API to actually set the hint + These drivers should have no functional impact because of this revert - Driver use this API to force a certain affinity mask + In this case we have to replace the API with the irq_force_affinity() I can start looking into the individual drivers, however, testing them will be a challenge. Any thoughts? -- Thanks Nitesh