Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp2694406imw; Wed, 6 Jul 2022 10:08:35 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tmWeqXtpo08O63zOr1vi1AHb7MVx+d6P74WK5bMO24IYVofkpMhqkfKG4UkxOw4tsPuFnu X-Received: by 2002:a17:902:c950:b0:16a:6b0c:a2e with SMTP id i16-20020a170902c95000b0016a6b0c0a2emr47735796pla.36.1657127315244; Wed, 06 Jul 2022 10:08:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657127315; cv=none; d=google.com; s=arc-20160816; b=x02cvNVWHwoVjoX5OR4mtOaD8C0VDJxOxdFAunTEAILKObmYenPODmiYKWYtOQ4giV NVye210JHuiXegCxXBekp2400hOgenFE2/aP6RXSBPgw83DVfHcvUx01N4mjcXayD/G8 L/2paW+l4x8uaAz3dutdpREaoWC9es6BKMUQa+Mf/wHTj+Pi6IPXwoK0FhHNpvvM8DJl jDM5HwKPg5HoltlSHP52tbRC/6770cmphqmbiUyG08gjIyz7QLB9jWBWKZkh7H1RiKu/ 6o8eIGz385RDKb7PS6Ea7KQUmAxtqNZ4a7s1Xo5z1If9ErmuyjYY0yGUpKpc1Ls/KLHA /zrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:subject:user-agent:mime-version:date:message-id; bh=4vMOS8tSKgl9SkajjuoWgOzSB3rEOa00bU5weYtSmo4=; b=XFOD1sJ9KMLR7Zb4kVvKlsELxbDCjaeJSUYfClBn/2TfFr/V4MHnyTmqScuwOO9Pp3 3ZUlHAcsFV5jQo85x36Vz9/cG6S20Ibc1eABFM/tKRvxdbenINA1ZsNlJKZ16nBNTm7p bRJmQQtrfQSrOVBk3Z+LbMOYKVVe7zVkPeLeGLdbJepPBNFZKgRfLJ+rbio0W+2iVghN M4g5GWICBmq8g7lwl9J74wZG6Mv0p3gwUTZtdwWlGgAunDmD6IsYV10t47KrYMQIZVZt Z2Uw1q3/U00DwYLYQiXgf3+EnT8daeKbzILbZDXYm/Vw1JYvIx7upl0kYu5XrfRp+iyu YGFw== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g129-20020a636b87000000b00411acc4821bsi26694503pgc.655.2022.07.06.10.08.15; Wed, 06 Jul 2022 10:08:35 -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; 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=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233127AbiGFQ7L (ORCPT + 99 others); Wed, 6 Jul 2022 12:59:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50672 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233054AbiGFQ6y (ORCPT ); Wed, 6 Jul 2022 12:58:54 -0400 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E83932A42D for ; Wed, 6 Jul 2022 09:58:52 -0700 (PDT) Received: from fraeml715-chm.china.huawei.com (unknown [172.18.147.200]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4LdQfb5Grpz67pCt; Thu, 7 Jul 2022 00:56:07 +0800 (CST) Received: from lhreml724-chm.china.huawei.com (10.201.108.75) by fraeml715-chm.china.huawei.com (10.206.15.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Wed, 6 Jul 2022 18:58:50 +0200 Received: from [10.126.171.66] (10.126.171.66) by lhreml724-chm.china.huawei.com (10.201.108.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Wed, 6 Jul 2022 17:58:49 +0100 Message-ID: Date: Wed, 6 Jul 2022 17:58:49 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 Subject: Re: [PATCH] nvme: Fix nvme_setup_command metadata trace event for cdw10 To: Keith Busch , Christoph Hellwig CC: , , , References: <1657095398-114310-1-git-send-email-john.garry@huawei.com> <20220706161825.GA1962@lst.de> <20220706163434.GA2222@lst.de> From: John Garry In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.126.171.66] X-ClientProxiedBy: lhreml732-chm.china.huawei.com (10.201.108.83) To lhreml724-chm.china.huawei.com (10.201.108.75) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H2,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 06/07/2022 17:44, Keith Busch wrote: > 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. ok, I just thought it was a typo, but did not know why you were using an array macro. > 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. > . The warning hints at using struct_group() also ... Anyway, Keith, do you want to write a new patch or shall I? Thanks, John