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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 21D80C04A94 for ; Fri, 4 Aug 2023 12:17:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229847AbjHDMRw (ORCPT ); Fri, 4 Aug 2023 08:17:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60456 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229543AbjHDMRu (ORCPT ); Fri, 4 Aug 2023 08:17:50 -0400 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 716A146A8; Fri, 4 Aug 2023 05:17:49 -0700 (PDT) Received: from lhrpeml500005.china.huawei.com (unknown [172.18.147.226]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4RHPlL0FTvz6J7mS; Fri, 4 Aug 2023 20:14:06 +0800 (CST) Received: from localhost (10.202.227.76) by lhrpeml500005.china.huawei.com (7.191.163.240) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Fri, 4 Aug 2023 13:17:47 +0100 Date: Fri, 4 Aug 2023 13:17:46 +0100 From: Jonathan Cameron To: Alison Schofield CC: Ira Weiny , Davidlohr Bueso , Dave Jiang , Vishal Verma , Dan Williams , , Subject: Re: [PATCH v2 2/2] cxl/mbox: Add handle to event processing debug Message-ID: <20230804131746.00003d65@Huawei.com> In-Reply-To: References: <20230731-cxl-fix-clear-event-debug-print-v2-0-9bdd08d386e9@intel.com> <20230731-cxl-fix-clear-event-debug-print-v2-2-9bdd08d386e9@intel.com> <64cb35b4ef5cc_9473e29411@iweiny-mobl.notmuch> Organization: Huawei Technologies Research and Development (UK) Ltd. X-Mailer: Claws Mail 4.1.0 (GTK 3.24.33; x86_64-w64-mingw32) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.202.227.76] X-ClientProxiedBy: lhrpeml100006.china.huawei.com (7.191.160.224) To lhrpeml500005.china.huawei.com (7.191.163.240) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 3 Aug 2023 10:26:00 -0700 Alison Schofield wrote: > On Wed, Aug 02, 2023 at 10:05:56PM -0700, Ira Weiny wrote: > > Alison Schofield wrote: > > > On Tue, Aug 01, 2023 at 01:13:29PM -0700, Ira Weiny wrote: > > > > Knowing which handle is being processed helped in debugging new event > > > > code. Add a dev_dbg() message with this information. > > > > > > > > Signed-off-by: Ira Weiny > > > > --- > > > > drivers/cxl/core/mbox.c | 6 +++++- > > > > 1 file changed, 5 insertions(+), 1 deletion(-) > > > > > > > > diff --git a/drivers/cxl/core/mbox.c b/drivers/cxl/core/mbox.c > > > > index a1c490f66bbf..f052d5f174ee 100644 > > > > --- a/drivers/cxl/core/mbox.c > > > > +++ b/drivers/cxl/core/mbox.c > > > > @@ -947,9 +947,13 @@ static void cxl_mem_get_records_log(struct cxl_memdev_state *mds, > > > > if (!nr_rec) > > > > break; > > > > > > > > - for (i = 0; i < nr_rec; i++) > > > > + for (i = 0; i < nr_rec; i++) { > > > > + dev_dbg(dev, "Event log %d: processing handle %u\n", > > > > + type, > > > > + le16_to_cpu(payload->records[i].hdr.handle)); > > > > cxl_event_trace_record(cxlmd, type, > > > > &payload->records[i]); > > > > + } > > > > > > Is dev_dbg() overkill when the info is in the trace event? > > > > The trace event will not happen if tracing is not turned on. > > > > This was all part of my testing the DCD events which don't have to, and > > likely will not, have tracing on. So this helped to track which handles > > were being processed from the cxl-test and qemu layers. > > > > Ira > > Thanks for explaining! Good to have that detail in the commit message as it's good justification for the change. Otherwise LGTM. Reviewed-by: Jonathan Cameron > > > > > > > > > > > > > > if (payload->flags & CXL_GET_EVENT_FLAG_OVERFLOW) > > > > trace_cxl_overflow(cxlmd, type, payload); > > > > > > > > -- > > > > 2.41.0 > > > > > > > >