Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754361AbcC2UwN (ORCPT ); Tue, 29 Mar 2016 16:52:13 -0400 Received: from mx0a-00082601.pphosted.com ([67.231.145.42]:51786 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752608AbcC2UwM (ORCPT ); Tue, 29 Mar 2016 16:52:12 -0400 Subject: Re: [PATCH 1/3] blk-mq: add an API to estimate hardware queue node To: Christoph Hellwig References: <68fed570910230ce847f8f3b685eeea399640a7f.1458941500.git.shli@fb.com> <20160329072443.GA18920@infradead.org> <20160329164722.GA1208161@devbig084.prn1.facebook.com> <56FAB243.5020804@fb.com> <20160329174437.GA451@infradead.org> CC: Shaohua Li , , , From: Jens Axboe Message-ID: <56FAEAD9.40908@fb.com> Date: Tue, 29 Mar 2016 14:51:37 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <20160329174437.GA451@infradead.org> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [192.168.54.13] X-Proofpoint-Spam-Reason: safe X-FB-Internal: Safe X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-03-29_07:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1362 Lines: 29 On 03/29/2016 11:44 AM, Christoph Hellwig wrote: > On Tue, Mar 29, 2016 at 10:50:11AM -0600, Jens Axboe wrote: >>> This looks weird, shouldn't the cpu assignment be determined by block >>> core (blk-mq) because block core decides how to use the queue? >> >> I agree, that belongs in the blk-mq proper, the driver should just follow >> the rules outlined, not impose their own in this regard. It'll also help >> with irq affinity mappings, once we get that in. > > It's not going to work that way unfortunately. Lots of driver simply > have no control over the underlying interrupts. Think of any RDMA > storage or other layer drivers - they get low level queues from a layer > they don't control and need a block queue for each of them. > > My plan is to make the block layer follow what the networking layer > does - get the low level queues / MSI-X pairs and then use the > infrastructure in lib/cpu_rmap.c to figure out the number of queues > and queue placement for them. That sounds fine, as long as we get it in general infrastructure. Note that we need to be able to support sets of queues for blk-mq, once we start splitting them up (for scheduling). As long as we can map sets of queues to sets of CPUs, then that's not a concern. For Shaohua's patches, not binding per-device data to the home node makes a lot of sense, though. -- Jens Axboe