Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1360571pxb; Thu, 4 Feb 2021 10:53:54 -0800 (PST) X-Google-Smtp-Source: ABdhPJxbEPn/IKpGIGO/hJTPsQOdveFUH7smztBDQpVVawQllx1SBFWX0x26L3zf4G0CF2g0h0bl X-Received: by 2002:a05:6402:1484:: with SMTP id e4mr37279edv.104.1612464834380; Thu, 04 Feb 2021 10:53:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612464834; cv=none; d=google.com; s=arc-20160816; b=LZ6iM03Y9W5f/P+udztLggWytYF/R+7cjkLH4rF4MIeg+RYJWH0B3rdDa/JUguoZGz e1Yz7WkJnfZIHxFvoft63QfPCZXt3+incB5J9KUBCzm6OQOQVfdeehc5a9Jjc9sJuMPa ZbwJdIvnoGQJQk/QJvammklewu9nzAY8cwipWwLidUklP8o6V25/UenkKgKf3ilQ1XOb oscEeOqWYNHFPDHGJjsDwd3Az2/2t92dUhK7+8bPogocWTVLKGL2O8IQTZP19eFhysJe FCetEnQVtVx8pT7E8r6WkxUbVZM9xJqbWddNjjlzaEgV0zb/keiOpbkx+HkZfCEXYgQP PKAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:organization :from:references:cc:to:subject:dkim-signature; bh=lsNoUMCO1nEXOP2imOs5qf2e3v8YT9CdaCiUbwmZSYQ=; b=uOqlxCOFEuhbAUQPYTX3Gu9JRmcLVThi62eC1gBpOz1lpeLorJotEHhLxos6RVivba zUUXaymkNyOtFpUX3dPUwyHsiUwrbR3qHr+vzo/l2C58e/q6DBmj/HSZwssglI89DFxZ DJjYKZC8+Ln52gFjZR0xzEy8oZRiHsNrVxQqVxgmdCgDjw+i6+T6W3ukwL6c0sqJe5T5 gSax6ZhUZlO8OeujB5ZHWKWfQSifncgAz681x+srDNvhCpER+djzM1r+OWcdVICeoZGV eQskG9wXyCovl7dBQf/EcGTTQ2BFMPEWqNa9JL6UMLPLRwNu/j+RWSBRBFkRZHDhBX1t l9JQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=aKj4qeT+; 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 s7si3774279ejz.5.2021.02.04.10.53.29; Thu, 04 Feb 2021 10:53:54 -0800 (PST) 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=aKj4qeT+; 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 S239392AbhBDSuc (ORCPT + 99 others); Thu, 4 Feb 2021 13:50:32 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:31274 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239248AbhBDStd (ORCPT ); Thu, 4 Feb 2021 13:49:33 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612464478; 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:references:references; bh=lsNoUMCO1nEXOP2imOs5qf2e3v8YT9CdaCiUbwmZSYQ=; b=aKj4qeT+8BUUY1Nml9dmC/661a9Cqn0J+a4eIWOBkCXV3ZOi5Vfs+9JLuE/HLWBjc5iqro DqCuXHNhVOxP1lVES2uSG5Vf4t811c6cBaOL/uv8V4BR25YfmE5DwIe/AiGT9RD/efWwLD IXo6OCJU7d1KGifXdvvycqoMnwjLLQ8= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-229-4YY6d1skPqyXhYA2hOoK-w-1; Thu, 04 Feb 2021 13:47:50 -0500 X-MC-Unique: 4YY6d1skPqyXhYA2hOoK-w-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id BDA26801968; Thu, 4 Feb 2021 18:47:47 +0000 (UTC) Received: from [10.10.116.135] (ovpn-116-135.rdu2.redhat.com [10.10.116.135]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 87DF960CCF; Thu, 4 Feb 2021 18:47:40 +0000 (UTC) Subject: Re: [Patch v4 1/3] lib: Restrict cpumask_local_spread to houskeeping CPUs To: Marcelo Tosatti , Thomas Gleixner Cc: Robin Murphy , linux-kernel@vger.kernel.org, linux-api@vger.kernel.org, frederic@kernel.org, juri.lelli@redhat.com, abelits@marvell.com, bhelgaas@google.com, linux-pci@vger.kernel.org, rostedt@goodmis.org, mingo@kernel.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 References: <20200625223443.2684-1-nitesh@redhat.com> <20200625223443.2684-2-nitesh@redhat.com> <3e9ce666-c9cd-391b-52b6-3471fe2be2e6@arm.com> <20210127121939.GA54725@fuller.cnet> <87r1m5can2.fsf@nanos.tec.linutronix.de> <20210128165903.GB38339@fuller.cnet> <87h7n0de5a.fsf@nanos.tec.linutronix.de> <20210204181546.GA30113@fuller.cnet> From: Nitesh Narayan Lal Organization: Red Hat Inc, Message-ID: Date: Thu, 4 Feb 2021 13:47:38 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0 MIME-Version: 1.0 In-Reply-To: <20210204181546.GA30113@fuller.cnet> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-US X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2/4/21 1:15 PM, Marcelo Tosatti wrote: > On Thu, Jan 28, 2021 at 09:01:37PM +0100, Thomas Gleixner wrote: >> On Thu, Jan 28 2021 at 13:59, Marcelo Tosatti wrote: >>>> The whole pile wants to be reverted. It's simply broken in several ways. >>> I was asking for your comments on interaction with CPU hotplug :-) >> Which I answered in an seperate mail :) >> >>> So housekeeping_cpumask has multiple meanings. In this case: >> ... >> >>> So as long as the meaning of the flags are respected, seems >>> alright. >> Yes. Stuff like the managed interrupts preference for housekeeping CPUs >> when a affinity mask spawns housekeeping and isolated is perfectly >> fine. It's well thought out and has no limitations. >> >>> Nitesh, is there anything preventing this from being fixed >>> in userspace ? (as Thomas suggested previously). >> Everything with is not managed can be steered by user space. > Yes, but it seems to be racy (that is, there is a window where the > interrupt can be delivered to an isolated CPU). > > ethtool -> > xgbe_set_channels -> > xgbe_full_restart_dev -> > xgbe_alloc_memory -> > xgbe_alloc_channels -> > cpumask_local_spread > > Also ifconfig eth0 down / ifconfig eth0 up leads > to cpumask_spread_local. There's always that possibility. We have to ensure that we move the IRQs by a tuned daemon or some other userspace script every time there is a net-dev change (eg. device comes up, creates VFs, etc). > How about adding a new flag for isolcpus instead? > Do you mean a flag based on which we can switch the affinity mask to housekeeping for all the devices at the time of IRQ distribution? -- Thanks Nitesh