Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp3857599imd; Mon, 29 Oct 2018 13:31:16 -0700 (PDT) X-Google-Smtp-Source: AJdET5dHDwmCqKKWdp2OWPCF1uYOj+oOPWh44TPnErx6r5GOY4G7iCM3ntsnsufo1cDAkAN9wR0l X-Received: by 2002:a17:902:15a8:: with SMTP id m37-v6mr15786187pla.256.1540845076388; Mon, 29 Oct 2018 13:31:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540845076; cv=none; d=google.com; s=arc-20160816; b=fXP8q4uFh4EDKo6/kDN+4fi2YWOjuLouDdWHCvHvxwa2I38wfTuq7/MiQQJNz4QDzo sYwipUMzZ/fzvs81aqzTlqxyyyIB9YN774Bq4sm/3jlz83SbqWa1fB1h1cX2FRplMDuE ZFmmrXLUix3Jb2s+S8ha+HyXkdZW05a6qK6xe6sfzRgglMov8rLxVtGRyAMS3H6OOUgW F44IqQ3IE5u2d4MiFA8NDwQ7+hrxoCJEZpNE/Z43yTDjxXVZWeE8usDCW/O8CgUARU0V u7qVp/TYNLiMSOr8NKVRhTMu5lkksuOKKrkgL0om4wGStwCHCeq0Yxo5ENFxd3ToCh+C iGPQ== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:to:subject:dkim-signature; bh=EZYxQZbSxAHazizrdQH9iLVv8n/OuBKXe7dil/rdMNY=; b=ZOnosnnK9veSwzdAe/3cXMc6y6lrCRu94+kRDJQvH0fc1qdDLqDW9C/GyNk+oiXX7z 8TLcUjV3i78SSbGgt7QL0kFcqo0ap7/DrETIqYQtCWF/rvlBE1LZRwSSMn5ZjS9cNLlB E0gwjFpeUBL7nJvD2YPqXjXRo2QGW7YWd3R3bx0unnobXcW+jxOQMi+p7XTdlFrtvhEB X0rCZ1oO5ySNnsrAlomHl4aF42Cao5UQD0dnZKCWHUkte18gT28OcDUeb3AXJAmtJaE1 io78D3Hg2I0gqK2sxSp7TOp4sqQdihJoiBE76CCkGc0zw+GJUbDkAf71+qDLB6dOC3dh NxMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=jladFqca; 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 k6-v6si20156097pls.174.2018.10.29.13.31.00; Mon, 29 Oct 2018 13:31:16 -0700 (PDT) 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; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=jladFqca; 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 S1729685AbeJ3FTi (ORCPT + 99 others); Tue, 30 Oct 2018 01:19:38 -0400 Received: from mail-pl1-f194.google.com ([209.85.214.194]:43983 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729557AbeJ3FTh (ORCPT ); Tue, 30 Oct 2018 01:19:37 -0400 Received: by mail-pl1-f194.google.com with SMTP id g59-v6so346021plb.10 for ; Mon, 29 Oct 2018 13:29:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20150623.gappssmtp.com; s=20150623; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=EZYxQZbSxAHazizrdQH9iLVv8n/OuBKXe7dil/rdMNY=; b=jladFqcaeyMDVEcPA5V35mgKzd7YKZnGCq9iNUhBn2kgx3FHIlE0CtJqxfFCSbR7QB bw7xUuZf+GbGy0RGcb7Z2Snc3JQ9P0lAQSXvThCqthNkht9G1w+TTDAHvFHRFZO5xvM3 nep++lrf+ETGtQuJlm3/zOXOUCgZlMmkChtRIyhV//5VoHoZ2dxdZNs5ngvEWT2OUicy 6bRmY7UTohM+2I/JWZ4LauZdWsvi9bn4/oo/Fy3cgdlMFM4Y+7lPVi/nXF2kCKRya52r s7pbLyiSiNrm9JjUY86p/PjREApI8q4lo/qYfkzfFTbaz0PfAC+UStQbRy3/OjkeYQSO 30EA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=EZYxQZbSxAHazizrdQH9iLVv8n/OuBKXe7dil/rdMNY=; b=e4oypiGMZYa7oah680LQgulyYinhQTi/51Y5PIu8ES7t5lorXGFLV5jlBbGN1Y+5sH lqIQLrZ9QhRtNEWgxUiouNpazdNmuwqO7vEIhbbHgLMiiIzLFZF4osIn54sWxkeIlI0O soek8Cfyf5PgHaO1a6kA/ZO7SCmgr2M6c9qdRYk4GN/1nRYlfAXjiE52YNIZcFXYMUMy xYgrz0qrfR37TjG7cyKo9TIHcZPUzAf3egY1WFRRtguUk6z100xtkoc1+YdtyIVRQP8V Ji5ICtdFYmywnR5gdsnyfBYXOlJixpjFLliVAN8eBO4gbUsfQMXlGz/liXcrvL7lbZP8 x7ig== X-Gm-Message-State: AGRZ1gJGaGOHHgEf6R1tGvlam8Dp729Tr19Eb6m/7tcr/GZYw7rw8Drd 5uICT4iAD9rtzNu+9GGevPJqq15GMw0= X-Received: by 2002:a17:902:b03:: with SMTP id 3-v6mr5107520plq.233.1540844959862; Mon, 29 Oct 2018 13:29:19 -0700 (PDT) Received: from [192.168.1.121] (66.29.188.166.static.utbb.net. [66.29.188.166]) by smtp.gmail.com with ESMTPSA id t85-v6sm28847053pfi.73.2018.10.29.13.29.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 29 Oct 2018 13:29:18 -0700 (PDT) Subject: Re: [PATCH 10/14] blk-mq: initial support for multiple queue maps To: Bart Van Assche , linux-block@vger.kernel.org, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org References: <20181029163738.10172-1-axboe@kernel.dk> <20181029163738.10172-11-axboe@kernel.dk> <1540842034.196084.89.camel@acm.org> <1540843250.196084.93.camel@acm.org> <867d3e60-3edf-39e7-2bcb-02d7f1092f82@kernel.dk> <1540844730.196084.95.camel@acm.org> From: Jens Axboe Message-ID: <50515ef4-35d4-b238-e0fe-799c2fc758cb@kernel.dk> Date: Mon, 29 Oct 2018 14:29:17 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <1540844730.196084.95.camel@acm.org> Content-Type: text/plain; charset=UTF-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/29/18 2:25 PM, Bart Van Assche wrote: > On Mon, 2018-10-29 at 14:09 -0600, Jens Axboe wrote: >> hctx->type will be set to the value of the first type. This is all driver >> private, blk-mq could not care less what the value of the type means. >> >> As to the other question, it works just fine since that is the queue >> that is being accessed. There's no confusion there. I think you're >> misunderstanding how it's seutp. To use nvme as the example, type 0 >> would be reads, 1 writes, and 2 pollable queues. If reads and writes >> share the same set of hardware queues, then type 1 simply doesn't >> exist in terms of ->flags_to_type() return value. This is purely >> driven by the driver. That hook is the only decider of where something >> will go. If we share hctx sets, we share the same hardware queue as >> well. There is just the one set for that case. > > How about adding a comment in blk-mq.h that explains that hardware queues can > be shared among different hardware queue types? I think this is nontrivial and > deserves a comment. Sure, I can do that. I guess a key concept that is confusing based on your above question is that the sets don't have to be consecutive. It's perfectly valid to have 0 and 2 be the available queues, and nothing for 1. For example. BTW, split up the incremental patch, find them here: http://git.kernel.dk/cgit/linux-block/commit/?h=mq-maps&id=6890d88deecfd3723ce620d82f5fc80485f9caec and http://git.kernel.dk/cgit/linux-block/commit/?h=mq-maps&id=907725dff2f8cc6d1502a9123f930b8d3708bd02 -- Jens Axboe