Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5733271imu; Wed, 30 Jan 2019 02:39:33 -0800 (PST) X-Google-Smtp-Source: ALg8bN5vZEyEQR0q7JNziz3WVftqQxlk4dLSHok1WvukJXLd4B+gfMEgt1ektqSF1wcyAAM3R27m X-Received: by 2002:a63:1b58:: with SMTP id b24mr26648527pgm.247.1548844772960; Wed, 30 Jan 2019 02:39:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548844772; cv=none; d=google.com; s=arc-20160816; b=pkXgr39nX2SU36djLvXxs7yvPHoAMGpS7QJ4+iCl+8CxWyhuK2cabJYoO+JMn2VR01 gg78Bd15qMBMWul/4GbjDf473Gu+EpUMlmHk5BJYYCb5X+d3kAmGhe3tqv0/9bSfOvlo 3lKp4V4TXkO6BWD7jBEmvYoR2Wy4dh0khikKOw2WjuJlQsrqXcILPJ1Syqe8pjQXNhtY 3RKd1ycjdJ9na2iqboqNNlU++Zoo7BckNrsznjrDiuKLoCybWw85lZIL61jipOtE1Hsq 2ysTPswIJOQCoE3LRdougO9/HBTerce5I4OvwTVE+RvsYOE8y/M0TRyxJNh95sk3RxDF 9cYA== 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:in-reply-to :mime-version:user-agent:date:message-id:from:cc:references:to :subject; bh=hHkq4YYgua/oP03W3tPrGUsqgrgZ3qm8Y1fKbbtNRcY=; b=agzkhREGOZCI3xk4zUkdSUKpuoa8zb3VtG/k2mQuAZyYukrdRML5AwiQYxYcg4lSTq 4l+Oo3oQgZfYj100W85NIM2FjtnF838BiIDsl9qA/+N88Dhu2Sz+G1RYEmq+Wtop7B01 mzX+Gy6UlonH4XZgFqKPeLlNv4ah3v7/JqydS+A6S20mZf5rqywdpHA4sZUyTQcZzAeA S5te6FHR/eymyyV0jqOiPLhP95lSapVuPI1o7FQq0bL4zHzz96NNhG+yUIZOPNTACLyd nveyZ0c9m9AhY5xrHT0ohfTDo82EB1eziHI5dKh1uNMPU7FYta2GKj9HlWvwBKS36oGg H8eQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x186si1118187pfx.269.2019.01.30.02.39.17; Wed, 30 Jan 2019 02:39:32 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730687AbfA3Kit (ORCPT + 99 others); Wed, 30 Jan 2019 05:38:49 -0500 Received: from szxga07-in.huawei.com ([45.249.212.35]:39984 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726548AbfA3Kit (ORCPT ); Wed, 30 Jan 2019 05:38:49 -0500 Received: from DGGEMS406-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 5688DAD717B61B5EF2AF; Wed, 30 Jan 2019 18:38:47 +0800 (CST) Received: from [127.0.0.1] (10.202.226.43) by DGGEMS406-HUB.china.huawei.com (10.3.19.206) with Microsoft SMTP Server id 14.3.408.0; Wed, 30 Jan 2019 18:38:38 +0800 Subject: Re: Question on handling managed IRQs when hotplugging CPUs To: Keith Busch References: <20190129154433.GF15302@localhost.localdomain> <757902fc-a9ea-090b-7853-89944a0ce1b5@huawei.com> <20190129172059.GC17132@localhost.localdomain> CC: "tglx@linutronix.de" , Christoph Hellwig , Marc Zyngier , "axboe@kernel.dk" , Peter Zijlstra , Michael Ellerman , Linuxarm , "linux-kernel@vger.kernel.org" , Hannes Reinecke From: John Garry Message-ID: <3fe63dab-0791-f476-69c4-9866b70e8520@huawei.com> Date: Wed, 30 Jan 2019 10:38:18 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: <20190129172059.GC17132@localhost.localdomain> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.202.226.43] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 29/01/2019 17:20, Keith Busch wrote: > On Tue, Jan 29, 2019 at 05:12:40PM +0000, John Garry wrote: >> On 29/01/2019 15:44, Keith Busch wrote: >>> >>> Hm, we used to freeze the queues with CPUHP_BLK_MQ_PREPARE callback, >>> which would reap all outstanding commands before the CPU and IRQ are >>> taken offline. That was removed with commit 4b855ad37194f ("blk-mq: >>> Create hctx for each present CPU"). It sounds like we should bring >>> something like that back, but make more fine grain to the per-cpu context. >>> >> >> Seems reasonable. But we would need it to deal with drivers where they only >> expose a single queue to BLK MQ, but use many queues internally. I think >> megaraid sas does this, for example. >> >> I would also be slightly concerned with commands being issued from the >> driver unknown to blk mq, like SCSI TMF. > > I don't think either of those descriptions sound like good candidates > for using managed IRQ affinities. I wouldn't say that this behaviour is obvious to the developer. I can't see anything in Documentation/PCI/MSI-HOWTO.txt It also seems that this policy to rely on upper layer to flush+freeze queues would cause issues if managed IRQs are used by drivers in other subsystems. Networks controllers may have multiple queues and unsoliciated interrupts. Thanks, John > > . >