Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp1176493pxb; Fri, 18 Feb 2022 02:13:05 -0800 (PST) X-Google-Smtp-Source: ABdhPJxXEJQYQpAQ6RUl+YoNimfwc6RrNQJC5VroIz73B0CBM3xHEzNmxZEW2I2x+Z/F7VBlj5oD X-Received: by 2002:a05:6402:5ca:b0:410:a59d:69e7 with SMTP id n10-20020a05640205ca00b00410a59d69e7mr7459200edx.337.1645179185438; Fri, 18 Feb 2022 02:13:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645179185; cv=none; d=google.com; s=arc-20160816; b=w5/LE2ARs89um09wS6PeOfTffL9WFhMsJVMWfZ6f1q1y1yJ3uQJ4RHFo7o3SEwDtvz dIKht62XGqHQ+PBfD7h+Wvk2/8lrel6LgwTCzFYU9PlfJDXwwqauCywRVJYByyd2pAtu DyrSFvIWvKvrh/I/sA6LPQW/Q9e1Ag+y7+jMEuHFxd/WtPI6YdLu2oFjTayrKS8gtdov F3UV6rg/aOzSj6XzDVsAnVgNNLAp13uE0SH8Q06uhdIjQN7trvw7bkGri/m2Mu7qyo1+ 1kjsKmzH45WjQ4FiZoPg7epkhXFPh4zCOBGNv8R92lXuWg3qbHmWcyNVcy7arY5dE67i IOFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:subject:user-agent:mime-version:date:message-id; bh=u/c+uDDBiix6BAVxYYWz9W6JVwaO/ylNtAShuumoS4M=; b=UaCspyofZcpIPFolsuV0r3X/gtpB1M6uRqIY8jlTQ/B/aJAOwSurX0V6gKBJ9oQezC yq6Mn33PT4t+tbdjqMBX7RwgreKfCkIivYMlcb1RiK4SBRj+5QJaKfaj7g5xZmTGwArF uNz01wqucv+yfQ9aDn5IW5RXDFJeJZi6ObMxad2F8cBU5fD0TbXxQUjZ6tetDWsAmhVE rRPmtBvdDI8hyF0hG0ea1ZMDYt3HqDoHhHvZlEWCXdboBGcXGdvfwi4CLdfeil7ztFmq Li/71H5LoBTdJCaCzzg/7Zj6T/0OHGaKt6Ep66XLaQdD03ZJVqlxXtvxcUXWJg6mhleG IBlA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p1si2765913ejn.483.2022.02.18.02.12.38; Fri, 18 Feb 2022 02:13:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232717AbiBRIli (ORCPT + 99 others); Fri, 18 Feb 2022 03:41:38 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:39308 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232705AbiBRIlg (ORCPT ); Fri, 18 Feb 2022 03:41:36 -0500 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 57E2C265136; Fri, 18 Feb 2022 00:41:20 -0800 (PST) Received: from fraeml707-chm.china.huawei.com (unknown [172.18.147.201]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4K0QBF56lTz67xv7; Fri, 18 Feb 2022 16:40:21 +0800 (CST) Received: from lhreml724-chm.china.huawei.com (10.201.108.75) by fraeml707-chm.china.huawei.com (10.206.15.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21; Fri, 18 Feb 2022 09:41:17 +0100 Received: from [10.47.86.67] (10.47.86.67) by lhreml724-chm.china.huawei.com (10.201.108.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21; Fri, 18 Feb 2022 08:41:16 +0000 Message-ID: Date: Fri, 18 Feb 2022 08:41:13 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.5.1 Subject: Re: [PATCH 1/2] genirq: Extract irq_set_affinity_masks() from devm_platform_get_irqs_affinity() To: Marc Zyngier CC: , , "Greg Kroah-Hartman" , Marcin Wojtas , Russell King , "David S. Miller" , Jakub Kicinski , Thomas Gleixner , References: <20220216090845.1278114-1-maz@kernel.org> <20220216090845.1278114-2-maz@kernel.org> From: John Garry In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.47.86.67] X-ClientProxiedBy: lhreml714-chm.china.huawei.com (10.201.108.65) To lhreml724-chm.china.huawei.com (10.201.108.75) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 17/02/2022 17:17, Marc Zyngier wrote: Hi Marc, >> 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. Thanks, John