Received: by 2002:a05:6358:700f:b0:131:369:b2a3 with SMTP id 15csp3489135rwo; Fri, 4 Aug 2023 05:53:32 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFAbRuFII4daNh0rXVYNEfFvERhbd2GctlInn7Jk+kzONqEWG2w7+cmRthoq8a+5fqh40pc X-Received: by 2002:a17:902:ecd2:b0:1b8:656f:76e7 with SMTP id a18-20020a170902ecd200b001b8656f76e7mr2273472plh.23.1691153612104; Fri, 04 Aug 2023 05:53:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691153612; cv=none; d=google.com; s=arc-20160816; b=L2Rp92yz2Am03E9aYtqHgQQXWaKj+Jre+JcUSYtnw9axWlxswyMweGd/BKVtzhMTgk p9vf+TWu4xx9bQEfkbk/pN/hl5Wsn0KKQU8pI01suh+dZUd4rkOjYgiaMXGLd94yCkLO b40ZKw/0fob2ZC0w9xQxlcuCki9nMuFGuYwf/GKpE+IchQkm3xm16jGA4lIzSXBxPVMd S5uKVwCipbddLZ9QsAxS98MOpgXS8Je8ram8466dKMvdFS7JVh2Aiuo2hVgKCDqRf3GX DBSlRHh0HhYy+fuBLIoA7Iq+d0Lb5GFioPlpyXgFypXgh/q+7srpMab012p+ZXXvNmuz QNNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=owPPSjgJL6YNpYflvrs6uRY5QN3GybwmJW249cEvdRA=; fh=Crf3ArbfnGQyix3tLpjV44VpJI6FbFYPtXt1f4XEGLQ=; b=Yz1HCBIxSlaEC9crZ9Wl0qcl2SrzOCqZFQIOR3Mvj2NprNPwzdavASmP3Id5uHvHxG P7xFfW55hayNigCtdMltWUGbotzBnIXaHJjcrmNDlqfSlHvJd1SvK72OT03hbEnLCbBK vT56+FasG8F0d/ueeQxGx9BkVdMtlcDZn4WtXYYpWD3fMdQgjUEITBO6TMvDtK1n3hX+ cAXlYAUz4ftvhEeKeYxsEXMEzMFii9Hcd2cls53zzrZ2VFDx28SQHwLZ6EgpSNkk3Hi/ dGJbXhRqlhXyrcH4A9c1YOPoOmLBUnKf6859iup3KIa1U5JuNn/x6Ht25ZY/N2k857/T g6Wg== 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 e11-20020a170902f10b00b001b8c47563e7si1615176plb.28.2023.08.04.05.53.19; Fri, 04 Aug 2023 05:53:32 -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 S229654AbjHDMRv (ORCPT + 99 others); Fri, 4 Aug 2023 08:17:51 -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 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_PASS 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 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 > > > > > > > >