Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp767931imd; Thu, 1 Nov 2018 05:24:49 -0700 (PDT) X-Google-Smtp-Source: AJdET5d5D1QZi/fEpXqg8WhNAd6RUxSuw+ZFsfpYk/jqX4QhMrWylRiOs1msYT8X+nqUmArXOLHe X-Received: by 2002:a62:a93:: with SMTP id 19-v6mr7420559pfk.121.1541075089447; Thu, 01 Nov 2018 05:24:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541075089; cv=none; d=google.com; s=arc-20160816; b=MKFia+oTSKysPWOd/lL/syDj6Cxr6Zrfe8Ff9UOfxscBseLhDcmxGC6VJ4Pd97WlNl uHheyloFIHkkPe5AdVgWCZGIRa32jkWPBjJcjs0GUzhNa57rVFD55plQ9S9+LoIgoq2o hpDalJytmv/8/bKXrYIrnYkp8QwdU29N1XEBvKFXOdLQavJWf038xc1BgHzXdaSbY84m qbpuaFUIdF7FDr+cm6kxhin664rNpKNjlX3ltiVkJ4SVs4dxUD8ZPqYnqmU/iAkjXR7R xgZA83BEjernqL8iIyohwu40yN86D8yr5TBxXhZqao9tzukj3m+B3UqzhhUbejEoydM6 8u0Q== 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=2JfG/OVadBHur99ai6SqguXMYy+g5t8X4+mpHRvDL8A=; b=NxsShNnWWGE0AxcFnuxrnSWmMEiZ0WX+l5xKs66gOt1LptQI9RrcP91vjbJvLP2m0o BaoUmy2jfwiWvvfQ7X7ylH845ho7A+LBl/zuck/N1ADjHbPVFoGF/BkocVkvAY8nJoGL vqOTPMhbEsntlqkVSJsSN1b5fxj+q79nG/TkeGgHthANBb8WwwZzIyhkeCCbQoUplvTl R1nZBRAKix141Wf6ufdZzHrVqei43Q6YBH2ypuraHazd7r1Yf0sP0h4IM7qJ5mpdAx6i yn42460Qw3RDmc31h6o4gfXatXyG+VJkhOUjrkDJIP9469pqDMev7W8LhbSOIxPtOllS 2VfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=v8cEvOCK; 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 w33-v6si26367885pga.590.2018.11.01.05.24.30; Thu, 01 Nov 2018 05:24:49 -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=v8cEvOCK; 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 S1728565AbeKAVZD (ORCPT + 99 others); Thu, 1 Nov 2018 17:25:03 -0400 Received: from mail-pg1-f193.google.com ([209.85.215.193]:43223 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728422AbeKAVZD (ORCPT ); Thu, 1 Nov 2018 17:25:03 -0400 Received: by mail-pg1-f193.google.com with SMTP id n10-v6so8948191pgv.10 for ; Thu, 01 Nov 2018 05:22:18 -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=2JfG/OVadBHur99ai6SqguXMYy+g5t8X4+mpHRvDL8A=; b=v8cEvOCKI7gk9xF6ijuFoeuTT+7xByhIHqdnhVLmUrXVSvZoSL0MkwVt+fPVVRv9Cc Pil7MUDJTlB9r5GTjmlLr7BQ61yHn5JWhw+Q9HrJuXxD41tfnl3VX7Moj8GMAkPaAI4g c+PcP2qBHgPjOocEGpQR6KLK2DFkma5N3XhpUq3K4x23IEBbDVP5dQgiHaq43xWOTN8V V5+mN7398ffeqYTXW6/ahrW6lhgWvTtP2zS73q3dK/YCrmAwQzuxePBerhQdMqzGUDYO ZSnxoNhdcOBRrgWzxmrvkZBw/fYWYzwF2S4nhtrQqaYZWjUn5EksZ+DOKWwijIEPXYkF 5Lrw== 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=2JfG/OVadBHur99ai6SqguXMYy+g5t8X4+mpHRvDL8A=; b=fsj3F3W8wzJ+an+yqzavAA90vT0fbkV/7oFiZqX1kj+qasgleo8ligepCsQNomkE0h O947VEKMQo/5Op3tmR6PbxhCMrMvxJrQ/AG2QlQPxu8TSwxNV2lEmCDHni2lEBWSxWYB 0EVxGL0S56aSykaACunrmGh1UcBnAA/MSaW5rdvcP8IniLSpGl9JzWzA2kpH44rhVKli fgr5hfeQhJQ6kuWn4hvzEud1N/j2z1aBSdXCwc1VveKm5XDs2S/8dU4ZBqohSJiVH5NI J58gZhBPlcItS00qweAp3TezsHCRm9mFwBWnX93bRQDLahAtRkLJUM5Pr2/3KKJoDuRi l9Cg== X-Gm-Message-State: AGRZ1gJnwJX6a3bcC7n/sbArchP656N/cQRRW+ECAMlylaBBuhIQ8t+v n6UhaSBCY7SiXbSgPkHOLmXj1W2kyvY= X-Received: by 2002:a63:9712:: with SMTP id n18mr6897486pge.295.1541074937275; Thu, 01 Nov 2018 05:22:17 -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 p11-v6sm33895195pfo.65.2018.11.01.05.22.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 01 Nov 2018 05:22:16 -0700 (PDT) Subject: Re: [PATCH 09/16] blk-mq: cache request hardware queue mapping To: Hannes Reinecke , linux-block@vger.kernel.org, linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org References: <20181030183252.17857-1-axboe@kernel.dk> <20181030183252.17857-10-axboe@kernel.dk> <222351ec-bf5b-526c-33dd-bd2e8ba051fa@suse.de> From: Jens Axboe Message-ID: <5a12d8c2-cb16-168c-f8e2-ffe1649d6554@kernel.dk> Date: Thu, 1 Nov 2018 06:22:14 -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: <222351ec-bf5b-526c-33dd-bd2e8ba051fa@suse.de> 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 11/1/18 3:27 AM, Hannes Reinecke wrote: > On 10/30/18 7:32 PM, Jens Axboe wrote: >> We call blk_mq_map_queue() a lot, at least two times for each >> request per IO, sometimes more. Since we now have an indirect >> call as well in that function. cache the mapping so we don't >> have to re-call blk_mq_map_queue() for the same request >> multiple times. >> >> Signed-off-by: Jens Axboe >> --- >> block/blk-flush.c | 12 ++++-------- >> block/blk-mq-debugfs.c | 4 +--- >> block/blk-mq-sched.c | 6 ++---- >> block/blk-mq-tag.c | 9 +-------- >> block/blk-mq.c | 22 +++++++++------------- >> block/blk-mq.h | 5 +---- >> include/linux/blkdev.h | 1 + >> 7 files changed, 19 insertions(+), 40 deletions(-) >> > Hehe. > I had been wondering about this since the original mq implementation, > but was told not to worry :-) To be fair, it was just an array index. Now it's got an indirect call, so it's more expensive. > Reviewed-by: Hannes Reinecke Thanks! -- Jens Axboe