Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp937587pxp; Wed, 16 Mar 2022 21:57:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzx052sKOVmvR60Hj+l6LhNoXgTTQs3S0Ir38MXPZGtSfwdPgGKJbEgm2Q2Wqt6JaJMxtTg X-Received: by 2002:a17:902:ecc7:b0:151:eb7e:4662 with SMTP id a7-20020a170902ecc700b00151eb7e4662mr2879661plh.132.1647493071575; Wed, 16 Mar 2022 21:57:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647493071; cv=none; d=google.com; s=arc-20160816; b=02wK7zV6DqvlhYJFHSTsl1318pXRac7DkDbpHG8jJxbUy27zagt3w+NQPjXl26tq+K Z1N5hqg/1eQwiuE0smci0x6yDf5Fr//jTc0ct5AwmiTlY30tmyV9Yb3M0w6WXRaytjxR t8bIlbRcmvSlOOA1Y9wgKpq8xW3hN86t6/GG2pMYz1L/dLSjcisTj29kHBM7cT2EmyG7 1s7FkuNNu6tdBY/W/Dnu5l/WQ1BYDgG04nfnEZffTpOiBhkQC9sD+668SrpFGJy2cP0c oZCSY4kRXnUB5SR58s631+rFFHXidtOpwD+o6wuPYq/vKeI+T6XPCUgsy5PMXFzXMJtn Dslg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=bP10MpKxp2H+M/GICvTgdjWhCdPc/61K93sUgprsw14=; b=0fmrzo+RHVwEFVuPELdAwDLMgsB0vbUU/PdlGxEFmsxdFAi6fT3hvEtCRCY/hHsfqX hcy34fvY+UKp5aDYKB/rUjKH2AXO+FtnJj8d7+Sc53VSHOoZflfiXkoEa2BUBjQcgE/j JBBxIVQdCyinauXhFUD/JMhb5V2YXoBPe+g1OLpTawOR4xJZ/5Zn5fO5I5syf12GLL/9 pQhNto5qAwRJdmMqELUGUDYnTe7rnYKzyMiheCvm9+ZU8T/EMNTeDWQ0e6i6YbnbhZER RkI2KXYgGq10o6ky+kAVABf8i8nR9UfaEVp9qa/r0HhjIo8zq905s6ncGOh+1SGbqVwU JOMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=R9dSK34+; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=sgaCCUxI; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id s7-20020a17090302c700b0014f883280acsi3530323plk.351.2022.03.16.21.57.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Mar 2022 21:57:51 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=R9dSK34+; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=sgaCCUxI; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id F3310181B33; Wed, 16 Mar 2022 21:13:37 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347966AbiCOO1G (ORCPT + 99 others); Tue, 15 Mar 2022 10:27:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58478 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233291AbiCOO1F (ORCPT ); Tue, 15 Mar 2022 10:27:05 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4B7D854BF0; Tue, 15 Mar 2022 07:25:50 -0700 (PDT) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1647354348; 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=bP10MpKxp2H+M/GICvTgdjWhCdPc/61K93sUgprsw14=; b=R9dSK34+A6a4Ngrt975mHLqphrmRbJYGz1P//s/pJjXsXkKVfxFykpUze3PlZaYkUDPA8J 3jSsx9qfMD1DVdv9rDajElQieQq/TOBBgwPOKK4trrYleKQw7/YDNaBDi2HRBPU0q8emiK fjtH5yTzNinXRgl/rPjKi3roPp166Rw9j9Z1CiN8Rm6b0tJlwhN6bYpQdjgxRcr0OKZYpx HyPrIGxxgznRVeAkqQ05qJ22+wNrUCfYgcKT02TXYwnpGftrBXzgUziCaLWyxTPZKBDaij 6Pj59kG1tq2C5B28N/wdmQ2vRnyFXmM9vFOyk3tm+ZRdmkeLM6/Qk3L2mAhBVg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1647354348; 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=bP10MpKxp2H+M/GICvTgdjWhCdPc/61K93sUgprsw14=; b=sgaCCUxImjUe2XSPk4Jm5E49wfVVvvbrFICQNNpmvNTk7jPlK8mm3ZROom0zll17aPyCsk C5Auf9mvdXKfIrCA== To: John Garry , Marc Zyngier Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org, Greg Kroah-Hartman , Marcin Wojtas , Russell King , "David S. Miller" , Jakub Kicinski , kernel-team@android.com Subject: Re: [PATCH 1/2] genirq: Extract irq_set_affinity_masks() from devm_platform_get_irqs_affinity() In-Reply-To: References: <20220216090845.1278114-1-maz@kernel.org> <20220216090845.1278114-2-maz@kernel.org> Date: Tue, 15 Mar 2022 15:25:48 +0100 Message-ID: <871qz370nn.ffs@tglx> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 18 2022 at 08:41, John Garry wrote: > On 17/02/2022 17:17, Marc Zyngier wrote: >>> I know you mentioned it in 2/2, but it would be interesting to see how >>> network controller drivers can handle the problem of missing in-flight >>> IO completions for managed irq shutdown. For storage controllers this >>> is all now safely handled in the block layer. >> >> Do you have a pointer to this? It'd be interesting to see if there is >> a common pattern. > > Check blk_mq_hctx_notify_offline() and other hotplug handler friends in > block/blk-mq.c and also blk_mq_get_ctx()/blk_mq_map_queue() > > So the key steps in CPU offlining are: > - when the last CPU in HW queue context cpumask is going offline we mark > the HW queue as inactive and no longer queue requests there > - drain all in-flight requests before we allow that last CPU to go > offline, meaning that we always have a CPU online to service any > completion interrupts > > This scheme relies on symmetrical HW submission and completion queues > and also that the blk-mq HW queue context cpumask is same as the HW > queue's IRQ affinity mask (see blk_mq_pci_map_queues()). > > I am not sure how much this would fit with the networking stack or that > marvell driver. The problem with networking is RX flow steering. The driver in question initializes the RX flows in mvpp22_port_rss_init() by default so the packets are evenly distributed accross the RX queues. So without actually steering the RX flow away from the RX queue which is associated to the to be unplugged CPU, this does not really work well. Thanks, tglx