All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tony Lu <tonylu@linux.alibaba.com>
To: Karsten Graul <kgraul@linux.ibm.com>
Cc: kuba@kernel.org, davem@davemloft.net, guwen@linux.alibaba.com,
	dust.li@linux.alibaba.com, netdev@vger.kernel.org,
	linux-s390@vger.kernel.org, linux-rdma@vger.kernel.org
Subject: Re: [PATCH net-next 3/3] net/smc: Introduce tracepoint for smcr link down
Date: Wed, 3 Nov 2021 14:57:07 +0800	[thread overview]
Message-ID: <YYIywxTUwl2xp4+/@TonyMac-Alibaba> (raw)
In-Reply-To: <11f17a34-fd35-f2ec-3f20-dd0c34e55fde@linux.ibm.com>

On Tue, Nov 02, 2021 at 10:30:22AM +0100, Karsten Graul wrote:
> On 01/11/2021 08:39, Tony Lu wrote:
> > +
> > +	    TP_printk("lnk=%p lgr=%p state=%d dev=%s location=%p",
> > +		      __entry->lnk, __entry->lgr,
> > +		      __entry->state, __get_str(name),
> > +		      __entry->location)
> 
> The location is printed as pointer (which might even be randomized?),
> is it possible to print the function name of the caller, as described
> here: https://stackoverflow.com/questions/4141324/function-caller-in-linux-kernel
> 
>   printk("Caller is %pS\n", __builtin_return_address(0));
> 
> Not sure if this is possible with the trace points, but it would be
> easier to use. You plan to use a dump to find out about the function caller?

Yes, I am going to find out where caused the SMC-R link down. In our
test environment, the tracepoint for link down help me to debug the root
cause of link termination, without eBPF or systemtap.

By using "%pS", it makes the trace log easy to show the function caller
name without additional translating.

  <idle>-0       [000] ..s.    69.087164: smcr_link_down: lnk=00000000dab41cdc lgr=000000007d5d8e24 state=0 rc=1 dev=mlx5_0 location=smc_wr_tx_tasklet_fn+0x5ef/0x6f0 [smc]

I will improve it in the next patch.

Cheers,
Tony Lu

  reply	other threads:[~2021-11-03  6:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-01  7:39 [PATCH net-next 0/3] Tracepoints for SMC Tony Lu
2021-11-01  7:39 ` [PATCH net-next 1/3] net/smc: Introduce tracepoint for fallback Tony Lu
2021-11-01  7:39 ` [PATCH net-next 2/3] net/smc: Introduce tracepoints for tx and rx msg Tony Lu
2021-11-01  7:39 ` [PATCH net-next 3/3] net/smc: Introduce tracepoint for smcr link down Tony Lu
2021-11-02  9:30   ` Karsten Graul
2021-11-03  6:57     ` Tony Lu [this message]
2021-11-01 13:50 ` [PATCH net-next 0/3] Tracepoints for SMC patchwork-bot+netdevbpf

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=YYIywxTUwl2xp4+/@TonyMac-Alibaba \
    --to=tonylu@linux.alibaba.com \
    --cc=davem@davemloft.net \
    --cc=dust.li@linux.alibaba.com \
    --cc=guwen@linux.alibaba.com \
    --cc=kgraul@linux.ibm.com \
    --cc=kuba@kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /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.