Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp2680061imw; Wed, 6 Jul 2022 09:56:21 -0700 (PDT) X-Google-Smtp-Source: AGRyM1ssPfXzE0b/hfPdty7R7W6KyJedJwm90b8rWEYMF25dQJjiBbziO0wx22loqRQe5z9iwo4C X-Received: by 2002:a17:90a:72c9:b0:1ef:8927:6e42 with SMTP id l9-20020a17090a72c900b001ef89276e42mr20596908pjk.148.1657126580664; Wed, 06 Jul 2022 09:56:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657126580; cv=none; d=google.com; s=arc-20160816; b=n/Rs75WXWbjPvvKDdxgPq0kTCZUHmXdXZ5lrl5PNrNqY8RAgYo8sR1SDI4Bjme97kC H082q1Y4cYxePrpXdPk1LxZx83sD9ymq9kmdCsrSDSUK4wWmfgpRKJPuWCjz1Xo/vuEf ui2EQAU15asw2YjAauqgzkK+bukW05Aq5uA80zcP3QNuYICQ7sQmogvi27sis9YdxSu8 ubL8hG7kdBI0P6/OqQ9562xg/Leoh4wThUW3jDtcaYrIyiG1tcAUihn8XRSTgw4W+Rf7 uDI3Exf/fk5ua7vKl47G2EiUaAmdFdd4z0Jv66cJ1zz1Zs3GHt9OOmhB9BtjKThbNert CRYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=WB4NzJKodbI+y2bqKp/frCweq/iQZMvWuAwrRDVsICg=; b=bjVOXZLWOGAXD18y1797nfg1j5Xouf1JEBA3fWlPItoOrzgCMT5xAxug9g/nOZ2YGD +bUVOfX77DJUwhp5XWy+9Jc4EoIbYcR428qKShZFL0m1BvqSffnsAF/YrcJPjLi+gYTE KaBuYpiGaWGvxbgfZORR+ft75tln04Tb+xyDQHLWcyh/Orxn8EwVgxyaVcbWGasHpxBZ SoE7p1hVPRpNHUPCOa6euLB5sL4JHhMbR/d367E/o2ouR8TK5IOfn6G739Yp2mAQIWLI gRSi8y1yBDg9xTpduSMIn5kvpnxabBfsXfG/l47dYYT+3Q5ZWhA/Pfy70LtuRcIeMbPt jL3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=a74zkiUK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id pl2-20020a17090b268200b001dc4320e6bcsi30177869pjb.146.2022.07.06.09.56.07; Wed, 06 Jul 2022 09:56:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=a74zkiUK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232911AbiGFQor (ORCPT + 99 others); Wed, 6 Jul 2022 12:44:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38686 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232575AbiGFQop (ORCPT ); Wed, 6 Jul 2022 12:44:45 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CA24124F33 for ; Wed, 6 Jul 2022 09:44:44 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 5E35D61DA9 for ; Wed, 6 Jul 2022 16:44:44 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 43EE8C3411C; Wed, 6 Jul 2022 16:44:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1657125883; bh=ETQIfKZ04DBpBTgbtjCsfZym+4EgvwaHflYjwEazCCQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=a74zkiUKuyq/dPmCUK9FEAfat7L9V4nkJmMHDcG04XZv1OCevAd/TOWHcu3ScUEI9 XYjssuU+EkcGFRsV98+R6BRrlaHiUwLtxN8+i8GJdkKMlJl7AHrW5yNYfuW49ZPMab JxykKrwdbqEvxh6sGkdxhxQbloeWyWWuLC+wSmiNPow54vY+7OuewxziiGpZF/HeiP z40s1HJReRpWl/Gl+CCGp/TM+ARjySJIBk3jmt7uD3cHUQHql4JjddJLOMDkwppk5h efEDqiRu/gdTbA58Q3mTWHAGTEwKsEI7DLCVlkuO3YxpoZ+TLln/a1iqMvtZPbKl26 QgKvg8NeXsWjg== Date: Wed, 6 Jul 2022 10:44:40 -0600 From: Keith Busch To: Christoph Hellwig Cc: John Garry , axboe@fb.com, sagi@grimberg.me, linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] nvme: Fix nvme_setup_command metadata trace event for cdw10 Message-ID: References: <1657095398-114310-1-git-send-email-john.garry@huawei.com> <20220706161825.GA1962@lst.de> <20220706163434.GA2222@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220706163434.GA2222@lst.de> X-Spam-Status: No, score=-7.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 06, 2022 at 06:34:34PM +0200, Christoph Hellwig wrote: > On Wed, Jul 06, 2022 at 10:26:09AM -0600, Keith Busch wrote: > > On Wed, Jul 06, 2022 at 06:18:25PM +0200, Christoph Hellwig wrote: > > > On Wed, Jul 06, 2022 at 10:13:22AM -0600, Keith Busch wrote: > > > > Did you test what the trace looks like afte this? We're losing valuable trace > > > > data here. The field is supposed to get CDW's 10 - 15, so that's 24 bytes. I > > > > don't know why it cares that the address of the field being read is only 4 > > > > bytes; we want everything that comes after it too. > > > > > > Because accesses should not spawn boundaries of members in structs unless > > > copying the entire struct. If we want to trace the various fields we > > > need to individually assign them. > > > > > > Anyway, I'm dropping this patch from nvme-5.19 for now to let the > > > discussion conclude. > > > > How about this instead? > > Maybe a better option would be to use struct_group(). Good call, I'd never used that macro before. The result produces anonymous unions like I just proposed, so yes, I like that option.