From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 89AD6C43144 for ; Tue, 26 Jun 2018 14:52:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4329E26C9E for ; Tue, 26 Jun 2018 14:52:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4329E26C9E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751116AbeFZOwa (ORCPT ); Tue, 26 Jun 2018 10:52:30 -0400 Received: from mga04.intel.com ([192.55.52.120]:59883 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751080AbeFZOw3 (ORCPT ); Tue, 26 Jun 2018 10:52:29 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Jun 2018 07:52:28 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,274,1526367600"; d="scan'208";a="70140483" Received: from unknown (HELO localhost.localdomain) ([10.232.112.44]) by orsmga002.jf.intel.com with ESMTP; 26 Jun 2018 07:52:08 -0700 Date: Tue, 26 Jun 2018 08:55:32 -0600 From: Keith Busch To: Johannes Thumshirn Cc: Christoph Hellwig , Sagi Grimberg , Keith Busch , Linux Kernel Mailinglist , Linux NVMe Mailinglist Subject: Re: [PATCH v4 1/2] nvme: cache struct nvme_ctrl reference to struct nvme_request Message-ID: <20180626145532.GA6628@localhost.localdomain> References: <20180626135141.14088-1-jthumshirn@suse.de> <20180626135141.14088-2-jthumshirn@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180626135141.14088-2-jthumshirn@suse.de> User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 26, 2018 at 03:51:40PM +0200, Johannes Thumshirn wrote: > @@ -652,6 +653,7 @@ blk_status_t nvme_setup_cmd(struct nvme_ns *ns, struct request *req, > } > > cmd->common.command_id = req->tag; > + nvme_req(req)->ctrl = ctrl; > if (ns) > trace_nvme_setup_nvm_cmd(req->q->id, cmd); > else I don't think we need to do this per-io. The request coming from the controller's tagset, so we can do this just once at .init_request time, right?