Linux CXL
 help / color / mirror / Atom feed
From: Dave Jiang <dave.jiang@intel.com>
To: <linux-cxl@vger.kernel.org>
Cc: <dave@stgolabs.net>, <jonathan.cameron@huawei.com>,
	<alison.schofield@intel.com>, <vishal.l.verma@intel.com>,
	<ira.weiny@intel.com>, <dan.j.williams@intel.com>
Subject: Re: [PATCH v3] cxl: Remove noisy dev_dbg() outputs
Date: Thu, 21 Sep 2023 10:24:10 -0700	[thread overview]
Message-ID: <721dd264-939a-e791-f7de-e229355ebb2d@intel.com> (raw)
In-Reply-To: <169524300432.3077964.4526387988891514104.stgit@djiang5-mobl3>



On 9/20/23 13:50, Dave Jiang wrote:
> Remove noisy enumeration of commands and CEL opcodes via dev_dbg()
> emit. These outputs were useful during early development. However they are
> now unnecessary and creates excessive noise in the debug log. On certain
> hardware up to 500+ entries have been observed.
> 
> Suggested-by: Alison Schofield <alison.schofield@intel.com>
> Signed-off-by: Dave Jiang <dave.jiang@intel.com>

After discussing with Ira and Dan offline, this patch can be ignored.

To reduce noise, something like this can be done instead:

options cxl_core dyndbg="+fp; func cxl_walk_cel -p"
in /etc/modprobe.d/cxl-debug.conf


> 
> ---
> https://lore.kernel.org/linux-cxl/b72946f0-31dd-b22a-f2e8-a12eb2f522ae@intel.com/T/#t
> 
> v3:
> - Drop eventtrace and just remove the dev_dbg(). (Ira & Alison)
> v2:
> - Add enabling note in commit log (Ira)
> ---
>  drivers/cxl/core/mbox.c |   11 +----------
>  1 file changed, 1 insertion(+), 10 deletions(-)
> 
> diff --git a/drivers/cxl/core/mbox.c b/drivers/cxl/core/mbox.c
> index ca60bb8114f2..963c668a4eb4 100644
> --- a/drivers/cxl/core/mbox.c
> +++ b/drivers/cxl/core/mbox.c
> @@ -707,7 +707,6 @@ static void cxl_walk_cel(struct cxl_memdev_state *mds, size_t size, u8 *cel)
>  {
>  	struct cxl_cel_entry *cel_entry;
>  	const int cel_entries = size / sizeof(*cel_entry);
> -	struct device *dev = mds->cxlds.dev;
>  	int i;
>  
>  	cel_entry = (struct cxl_cel_entry *) cel;
> @@ -717,11 +716,8 @@ static void cxl_walk_cel(struct cxl_memdev_state *mds, size_t size, u8 *cel)
>  		struct cxl_mem_command *cmd = cxl_mem_find_command(opcode);
>  
>  		if (!cmd && (!cxl_is_poison_command(opcode) ||
> -			     !cxl_is_security_command(opcode))) {
> -			dev_dbg(dev,
> -				"Opcode 0x%04x unsupported by driver\n", opcode);
> +			     !cxl_is_security_command(opcode)))
>  			continue;
> -		}
>  
>  		if (cmd)
>  			set_bit(cmd->info.id, mds->enabled_cmds);
> @@ -731,8 +727,6 @@ static void cxl_walk_cel(struct cxl_memdev_state *mds, size_t size, u8 *cel)
>  
>  		if (cxl_is_security_command(opcode))
>  			cxl_set_security_cmd_enabled(&mds->security, opcode);
> -
> -		dev_dbg(dev, "Opcode 0x%04x enabled\n", opcode);
>  	}
>  }
>  
> @@ -787,7 +781,6 @@ static const uuid_t log_uuid[] = {
>  int cxl_enumerate_cmds(struct cxl_memdev_state *mds)
>  {
>  	struct cxl_mbox_get_supported_logs *gsl;
> -	struct device *dev = mds->cxlds.dev;
>  	struct cxl_mem_command *cmd;
>  	int i, rc;
>  
> @@ -801,8 +794,6 @@ int cxl_enumerate_cmds(struct cxl_memdev_state *mds)
>  		uuid_t uuid = gsl->entry[i].uuid;
>  		u8 *log;
>  
> -		dev_dbg(dev, "Found LOG type %pU of size %d", &uuid, size);
> -
>  		if (!uuid_equal(&uuid, &log_uuid[CEL_UUID]))
>  			continue;
>  
> 
> 

      parent reply	other threads:[~2023-09-21 19:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-20 20:50 [PATCH v3] cxl: Remove noisy dev_dbg() outputs Dave Jiang
2023-09-21 15:53 ` Ira Weiny
2023-09-21 17:24 ` Dave Jiang [this message]

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=721dd264-939a-e791-f7de-e229355ebb2d@intel.com \
    --to=dave.jiang@intel.com \
    --cc=alison.schofield@intel.com \
    --cc=dan.j.williams@intel.com \
    --cc=dave@stgolabs.net \
    --cc=ira.weiny@intel.com \
    --cc=jonathan.cameron@huawei.com \
    --cc=linux-cxl@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox