All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <Jonathan.Cameron@Huawei.com>
To: Alison Schofield <alison.schofield@intel.com>
Cc: Ira Weiny <ira.weiny@intel.com>,
	Davidlohr Bueso <dave@stgolabs.net>,
	Dave Jiang <dave.jiang@intel.com>,
	Vishal Verma <vishal.l.verma@intel.com>,
	Dan Williams <dan.j.williams@intel.com>,
	<linux-cxl@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 2/2] cxl/mbox: Add handle to event processing debug
Date: Fri, 4 Aug 2023 13:17:46 +0100	[thread overview]
Message-ID: <20230804131746.00003d65@Huawei.com> (raw)
In-Reply-To: <ZMvjKIEEeUwqANrz@aschofie-mobl2>

On Thu, 3 Aug 2023 10:26:00 -0700
Alison Schofield <alison.schofield@intel.com> 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 <ira.weiny@intel.com>
> > > > ---
> > > >  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 <Jonathan.Cameron@huawei.com>

> 
> >   
> > >   
> > > >  
> > > >  		if (payload->flags & CXL_GET_EVENT_FLAG_OVERFLOW)
> > > >  			trace_cxl_overflow(cxlmd, type, payload);
> > > > 
> > > > -- 
> > > > 2.41.0
> > > >   
> > 
> >   


  reply	other threads:[~2023-08-04 12:17 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-01 20:13 [PATCH v2 0/2] CXL/events: Fix and improve event dev_dbg() messages Ira Weiny
2023-08-01 20:13 ` [PATCH v2 1/2] cxl/mbox: Use correct handle in events debug message Ira Weiny
2023-08-01 20:41   ` Dave Jiang
2023-08-02 16:26   ` Alison Schofield
2023-08-04 12:16   ` Jonathan Cameron
2023-08-01 20:13 ` [PATCH v2 2/2] cxl/mbox: Add handle to event processing debug Ira Weiny
2023-08-01 20:41   ` Dave Jiang
2023-08-02 16:29   ` Alison Schofield
2023-08-03  5:05     ` Ira Weiny
2023-08-03 17:26       ` Alison Schofield
2023-08-04 12:17         ` Jonathan Cameron [this message]
2023-08-03 17:26   ` Alison Schofield

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230804131746.00003d65@Huawei.com \
    --to=jonathan.cameron@huawei.com \
    --cc=alison.schofield@intel.com \
    --cc=dan.j.williams@intel.com \
    --cc=dave.jiang@intel.com \
    --cc=dave@stgolabs.net \
    --cc=ira.weiny@intel.com \
    --cc=linux-cxl@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vishal.l.verma@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.