Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp6746891imm; Wed, 27 Jun 2018 12:38:27 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIUajLWbeCK8YB9zFwXnmSbJDovgZsggkjRVGtPPBXEpQ1plJw0NmyH7H2i1ZI9w6HNn2BU X-Received: by 2002:a63:4002:: with SMTP id n2-v6mr6177271pga.285.1530128307383; Wed, 27 Jun 2018 12:38:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530128307; cv=none; d=google.com; s=arc-20160816; b=blV/4wnUvff0jwWEKa21ONkacKM88vieJwKLUtBfbMRSuqDptmXe+ulu6cyMgh4MZJ F4NEeI4ddKwKpvY7MDSV/VWPJ9XBaR1PO1IDDMnhCiSkmTCUp1diotRF1qy7dd3CnU4m QnsBqgDKEW1rMoPNztfVepO9/9km4JH4f3hIBsd717oDSbRbu+9evAISu/oI4X7N51Xh RLx1dj0JhVa9yFapRXnsMgeT+5Jx2cuP2gs14f7bX8gJBuXn1lZ6fZWyE/9NaISZPtc6 jILThM+0aL5JudFMCw45N37KVTwr3MrY+L8AZUFh/OIQwj4GdrA62Ec1KvWdNTVTxqzY 3HRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=j1gxQKIB61SjXeqFRPo9WHusMEz7tDyzDsIqOFjvLH8=; b=CPkYmoRdtkxuTIBZop20AysZDhmzP9P66Hku9X+zDbirh+/Ym43TLRIZQU2CgH+Nc3 IKTuNpPadTEz+S64qvHqUdmlSRH3WnHWlQpKflaFcNkuZjAb30MUVp3Xz0ETZEBFQWAB qk838WFRJRXpd6/GwjgyxFJ3FWGMqm/gyJWVvuUcBOxo/65nYShOcveNR8Uaaz6o2Hut cOoAXlngSjaY0fodCg6CRyl7FE9gapesIwISYatPivv8qYxJev5H42d8BQx+3F2Mm6nZ zAkqnZmSW6+SVBlyM6RSgMik3A1IbngtlvfCY2a0hChWzQQjqSRY5DIbK22tmaLDUnhi DXFw== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n184-v6si4342803pgn.136.2018.06.27.12.38.13; Wed, 27 Jun 2018 12:38:27 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934966AbeF0Qdp (ORCPT + 99 others); Wed, 27 Jun 2018 12:33:45 -0400 Received: from mga14.intel.com ([192.55.52.115]:20315 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934318AbeF0Qdo (ORCPT ); Wed, 27 Jun 2018 12:33:44 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Jun 2018 09:33:44 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,279,1526367600"; d="scan'208";a="50992590" Received: from unknown (HELO localhost.localdomain) ([10.232.112.44]) by fmsmga008.fm.intel.com with ESMTP; 27 Jun 2018 09:33:40 -0700 Date: Wed, 27 Jun 2018 10:37:06 -0600 From: Keith Busch To: Johannes Thumshirn Cc: Christoph Hellwig , Sagi Grimberg , Keith Busch , James Smart , Linux Kernel Mailinglist , Linux NVMe Mailinglist Subject: Re: [PATCH v5 2/2] nvme: trace: add disk name to tracepoints Message-ID: <20180627163706.GA9361@localhost.localdomain> References: <20180627125324.22064-1-jthumshirn@suse.de> <20180627125324.22064-3-jthumshirn@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180627125324.22064-3-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 Wed, Jun 27, 2018 at 02:53:24PM +0200, Johannes Thumshirn wrote: > TP_fast_assign( > - __entry->qid = qid; > + __assign_str(name, disk_name); > + __entry->ctrl_id = nvme_req(req)->ctrl->cntlid; > + __entry->qid = req->q->id; > __entry->opcode = cmd->common.opcode; > __entry->flags = cmd->common.flags; > __entry->cid = cmd->common.command_id; > @@ -122,10 +130,10 @@ TRACE_EVENT(nvme_setup_nvm_cmd, > memcpy(__entry->cdw10, cmd->common.cdw10, > sizeof(__entry->cdw10)); > ), > - TP_printk("qid=%d, nsid=%u, cmdid=%u, flags=0x%x, meta=0x%llx, cmd=(%s %s)", > - __entry->qid, __entry->nsid, __entry->cid, > - __entry->flags, __entry->metadata, > - show_opcode_name(__entry->opcode), > + TP_printk("nvme%d: disk=%s, qid=%d, nsid=%u, cmdid=%u, flags=0x%x, meta=0x%llx, cmd=(%s %s)", > + __entry->ctrl_id, __get_str(name), __entry->qid, > + __entry->nsid, __entry->cid, __entry->flags, > + __entry->metadata, show_opcode_name(__entry->opcode), > __parse_nvme_cmd(__entry->opcode, __entry->cdw10)) > ); This looks a bit confusing to me. The ctrl->cntlid you're using in __entry->ctrl_id isn't a unique value across subsystems, and it will typically be 0 for all controllers that are the only controller in their subsystem. It looks like you want the # assigned to /dev/nvme<#>. Do you want to use ctrl->instance here instead?