Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757728AbcC2QsF (ORCPT ); Tue, 29 Mar 2016 12:48:05 -0400 Received: from mx0b-00082601.pphosted.com ([67.231.153.30]:15791 "EHLO mx0b-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757705AbcC2QsB (ORCPT ); Tue, 29 Mar 2016 12:48:01 -0400 Date: Tue, 29 Mar 2016 09:47:23 -0700 From: Shaohua Li To: Christoph Hellwig CC: , , , Subject: Re: [PATCH 1/3] blk-mq: add an API to estimate hardware queue node Message-ID: <20160329164722.GA1208161@devbig084.prn1.facebook.com> References: <68fed570910230ce847f8f3b685eeea399640a7f.1458941500.git.shli@fb.com> <20160329072443.GA18920@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20160329072443.GA18920@infradead.org> User-Agent: Mutt/1.5.20 (2009-12-10) X-Originating-IP: [192.168.52.123] 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: 875 Lines: 15 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?