Received: by 2002:a05:7412:8521:b0:e2:908c:2ebd with SMTP id t33csp592106rdf; Fri, 3 Nov 2023 09:12:24 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGdOyO770M7hPkva12YqO5et3RWt+7OwYsKOXKbzdaxb4sjhMC70AYsGm/aSmw8+SCVszes X-Received: by 2002:a17:902:f552:b0:1cc:6906:c016 with SMTP id h18-20020a170902f55200b001cc6906c016mr12816102plf.9.1699027944275; Fri, 03 Nov 2023 09:12:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1699027944; cv=none; d=google.com; s=arc-20160816; b=Oqb3wLccp6kRC/FvW40Kv122CgrAOjXDtypLhxXNgQ5uYzCAd0Yuce92idh37oxHUX XcNNJUsdB0MxPCnOAOKIxqG/dPwZpoZ3BOjR9HjGLRk6tBOGPfgH7vAVZk183tvok4To XGG4Km9sYimOFsA/GpaRh8SL0X3QR5jTh8CFVF95AnQ0lQ+IznFo/ZJFcqxXv+G59oSy egoKymV8Gmcio8nQ7KKQIW1f/3Hu+pRVmjIwJXCFwY3dNp2gCN1hDuR0Yi8dl56umw/A bRgfSHPDpvjvz2X68v31eNovyT9SNAIAWK/jXmkzRg2c+xwuLeCGCkqK8ajFpfbU+tNT wM1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from; bh=W5nbTWSTX+py7POqoGYiIcgR8Dtg6R9dP3HrZOgg8wo=; fh=ta5oFvN6Q61DY4n6qpGWdgXJHNcL0zuizLBwo1QWN94=; b=ZfVfFil9DVVHJfnTGeFqrEj6vd/rNKBXr9LSGf+odXYnckWF1qLfYsKeKeU7VSHX+J G50CjCYh6vgO+M7yjaGnSZyYxIxQuiZkBjz3q6rEG8nIMJ/GXb2hL6+iqHegeLtwQxCd 3dKlssU5qRJc9SlJmsMS9FBAGf66oarBmFTJAcqQ2LUP6Uv8orUjYK3f01tMH7h6g/TB Xvnc825fAim3oN+WCiRt5JIjBnxzDm7cGf2wKMKpt+oxGTxYK03FKk6NIP/2LpDVIOxo kUmcQAjOmBHGgq13+JT2pFpXXMQZdc+im3GVbivalitfW8sNctP6SB4bns8ozNxTzB4T Ba6Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id o18-20020a170902e29200b001cc41a2b752si1679687plc.206.2023.11.03.09.12.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Nov 2023 09:12:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id BB5548312FAF; Fri, 3 Nov 2023 09:12:21 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343933AbjKCQMK convert rfc822-to-8bit (ORCPT + 99 others); Fri, 3 Nov 2023 12:12:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36176 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230138AbjKCQMJ (ORCPT ); Fri, 3 Nov 2023 12:12:09 -0400 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A84DCCA; Fri, 3 Nov 2023 09:12:05 -0700 (PDT) Received: from lhrpeml100003.china.huawei.com (unknown [172.18.147.200]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4SMQhq4CHsz6K7Gp; Sat, 4 Nov 2023 00:11:07 +0800 (CST) Received: from lhrpeml500006.china.huawei.com (7.191.161.198) by lhrpeml100003.china.huawei.com (7.191.160.210) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.31; Fri, 3 Nov 2023 16:12:02 +0000 Received: from lhrpeml500006.china.huawei.com ([7.191.161.198]) by lhrpeml500006.china.huawei.com ([7.191.161.198]) with mapi id 15.01.2507.031; Fri, 3 Nov 2023 16:12:02 +0000 From: Shiju Jose To: Jonathan Cameron , Ira Weiny CC: Dan Williams , Smita Koralahalli , Yazen Ghannam , Davidlohr Bueso , Dave Jiang , Alison Schofield , "Vishal Verma" , Ard Biesheuvel , "linux-efi@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-cxl@vger.kernel.org" Subject: RE: [PATCH RFC v3 1/6] cxl/trace: Remove uuid from event trace known events Thread-Topic: [PATCH RFC v3 1/6] cxl/trace: Remove uuid from event trace known events Thread-Index: AQHaDQgRQ2vINXGk70OHbaqSCzYaYrBoqc8AgAAYFhA= Date: Fri, 3 Nov 2023 16:12:02 +0000 Message-ID: <547d055eb85d4cee9c636c69e89a82ed@huawei.com> References: <20230601-cxl-cper-v3-0-0189d61f7956@intel.com> <20230601-cxl-cper-v3-1-0189d61f7956@intel.com> <20231103142756.00000e20@Huawei.com> In-Reply-To: <20231103142756.00000e20@Huawei.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.48.153.224] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Fri, 03 Nov 2023 09:12:21 -0700 (PDT) >-----Original Message----- >From: Jonathan Cameron >Sent: 03 November 2023 14:28 >To: Ira Weiny >Cc: Dan Williams ; Smita Koralahalli >; Yazen Ghannam >; Davidlohr Bueso ; Dave >Jiang ; Alison Schofield ; >Vishal Verma ; Ard Biesheuvel ; >linux-efi@vger.kernel.org; linux-kernel@vger.kernel.org; linux- >cxl@vger.kernel.org; Shiju Jose >Subject: Re: [PATCH RFC v3 1/6] cxl/trace: Remove uuid from event trace known >events > >On Wed, 01 Nov 2023 14:11:18 -0700 >Ira Weiny wrote: > >> The uuid printed in the well known events is redundant. The uuid >> defines what the event was. >> >> Remove the uuid from the known events and only report it in the >> generic event as it remains informative there. >> >> Reviewed-by: Davidlohr Bueso >> Reviewed-by: Dan Williams >> Signed-off-by: Ira Weiny > >Removing the print is fine, but look like this also removes the actual trace point >field. That's userspace ABI. Expanding it is fine, but taking fields away is more >problematic. > >Are we sure we don't break anyone? Shiju, will rasdaemon be fine with this >change? The field hdr_uuid is removed from the common CXL_EVT_TP_entry shared by the trace events cxl_generic_event, cxl_general_media, cxl_dram and cxl_memory_module . rasdaemon will break because of this while processing these trace events and also affects the corresponding error records in the SQLite data base. Rasdaemon needs update to avoid this. > >Thanks, > >Jonathan > Thanks, Shiju > > >> --- >> drivers/cxl/core/trace.h | 10 +++++----- >> 1 file changed, 5 insertions(+), 5 deletions(-) >> >> diff --git a/drivers/cxl/core/trace.h b/drivers/cxl/core/trace.h index >> a0b5819bc70b..79ed03637604 100644 >> --- a/drivers/cxl/core/trace.h >> +++ b/drivers/cxl/core/trace.h >> @@ -189,7 +189,6 @@ TRACE_EVENT(cxl_overflow, >> __string(memdev, dev_name(&cxlmd->dev)) \ >> __string(host, dev_name(cxlmd->dev.parent)) \ >> __field(int, log) \ >> - __field_struct(uuid_t, hdr_uuid) \ >> __field(u64, serial) \ >> __field(u32, hdr_flags) \ >> __field(u16, hdr_handle) \ >> @@ -203,7 +202,6 @@ TRACE_EVENT(cxl_overflow, >> __assign_str(host, dev_name((cxlmd)->dev.parent)); > \ >> __entry->log = (l); > \ >> __entry->serial = (cxlmd)->cxlds->serial; \ >> - memcpy(&__entry->hdr_uuid, &(hdr).id, sizeof(uuid_t)); > \ >> __entry->hdr_length = (hdr).length; > \ >> __entry->hdr_flags = get_unaligned_le24((hdr).flags); > \ >> __entry->hdr_handle = le16_to_cpu((hdr).handle); > \ >> @@ -212,12 +210,12 @@ TRACE_EVENT(cxl_overflow, >> __entry->hdr_maint_op_class = (hdr).maint_op_class >> >> #define CXL_EVT_TP_printk(fmt, ...) \ >> - TP_printk("memdev=%s host=%s serial=%lld log=%s : time=%llu >uuid=%pUb " \ >> + TP_printk("memdev=%s host=%s serial=%lld log=%s : time=%llu " > \ >> "len=%d flags='%s' handle=%x related_handle=%x " > \ >> "maint_op_class=%u : " fmt, > \ >> __get_str(memdev), __get_str(host), __entry->serial, > \ >> cxl_event_log_type_str(__entry->log), > \ >> - __entry->hdr_timestamp, &__entry->hdr_uuid, __entry- >>hdr_length,\ >> + __entry->hdr_timestamp, __entry->hdr_length, > \ >> show_hdr_flags(__entry->hdr_flags), __entry->hdr_handle, > \ >> __entry->hdr_related_handle, __entry->hdr_maint_op_class, > \ >> ##__VA_ARGS__) >> @@ -231,15 +229,17 @@ TRACE_EVENT(cxl_generic_event, >> >> TP_STRUCT__entry( >> CXL_EVT_TP_entry >> + __field_struct(uuid_t, hdr_uuid) >> __array(u8, data, CXL_EVENT_RECORD_DATA_LENGTH) >> ), >> >> TP_fast_assign( >> CXL_EVT_TP_fast_assign(cxlmd, log, rec->hdr); >> + memcpy(&__entry->hdr_uuid, &rec->hdr.id, sizeof(uuid_t)); >> memcpy(__entry->data, &rec->data, >CXL_EVENT_RECORD_DATA_LENGTH); >> ), >> >> - CXL_EVT_TP_printk("%s", >> + CXL_EVT_TP_printk("uuid=%pUb %s", &__entry->hdr_uuid, >> __print_hex(__entry->data, >CXL_EVENT_RECORD_DATA_LENGTH)) ); >> >>