Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932378AbcC2Qve (ORCPT ); Tue, 29 Mar 2016 12:51:34 -0400 Received: from mx0b-00082601.pphosted.com ([67.231.153.30]:16496 "EHLO mx0b-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757466AbcC2Qvd (ORCPT ); Tue, 29 Mar 2016 12:51:33 -0400 Subject: Re: [PATCH 1/3] blk-mq: add an API to estimate hardware queue node To: Shaohua Li , Christoph Hellwig References: <68fed570910230ce847f8f3b685eeea399640a7f.1458941500.git.shli@fb.com> <20160329072443.GA18920@infradead.org> <20160329164722.GA1208161@devbig084.prn1.facebook.com> CC: , , From: Jens Axboe Message-ID: <56FAB243.5020804@fb.com> Date: Tue, 29 Mar 2016 10:50:11 -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: <20160329164722.GA1208161@devbig084.prn1.facebook.com> 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_06:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1143 Lines: 23 On 03/29/2016 10:47 AM, Shaohua Li wrote: > On Tue, Mar 29, 2016 at 12:24:43AM -0700, Christoph Hellwig wrote: >> On Fri, Mar 25, 2016 at 02:36:30PM -0700, Shaohua Li wrote: >>> we allocate most data structure in device's node, but some data >>> structures are not for DMA and mostly used by specific cpus/node which >>> could diff from device's node. Allocating such hot data in device's >>> node doesn't make sense. Add an API to estimate hardware queue node. >>> This can be used before blk-mq actually establishes the mapping. This >>> API runs slow, but it only used in initialization time. >> >> I think this is the wrong way around. I've got some proprotype code >> that just leaves the cpu assignments to the drivers and picks it up >> in blk-mq. Give me a few days to post it.. > > 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. -- Jens Axboe