From: David Miller <davem@davemloft.net>
To: laoar.shao@gmail.com
Cc: eric.dumazet@gmail.com, alexei.starovoitov@gmail.com,
songliubraving@fb.com, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 net-next] net: introduce a new tracepoint for tcp_rcv_space_adjust
Date: Mon, 23 Apr 2018 09:58:44 -0400 (EDT) [thread overview]
Message-ID: <20180423.095844.822486182037441168.davem@davemloft.net> (raw)
In-Reply-To: <1524237506-11011-1-git-send-email-laoar.shao@gmail.com>
From: Yafang Shao <laoar.shao@gmail.com>
Date: Fri, 20 Apr 2018 23:18:26 +0800
> tcp_rcv_space_adjust is called every time data is copied to user space,
> introducing a tcp tracepoint for which could show us when the packet is
> copied to user.
>
> When a tcp packet arrives, tcp_rcv_established() will be called and with
> the existed tracepoint tcp_probe we could get the time when this packet
> arrives.
> Then this packet will be copied to user, and tcp_rcv_space_adjust will
> be called and with this new introduced tracepoint we could get the time
> when this packet is copied to user.
> With these two tracepoints, we could figure out whether the user program
> processes this packet immediately or there's latency.
>
> Hence in the printk message, sk_cookie is printed as a key to relate
> tcp_rcv_space_adjust with tcp_probe.
>
> Maybe we could export sockfd in this new tracepoint as well, then we
> could relate this new tracepoint with epoll/read/recv* tracepoints, and
> finally that could show us the whole lifespan of this packet. But we
> could also implement that with pid as these functions are executed in
> process context.
>
> Signed-off-by: Yafang Shao <laoar.shao@gmail.com>
>
> ---
> v2 -> v3: use sock_gen_cookie in tcp_event_sk as well.
> Maybe we could init sk_cookie in the stack then in other code
> path we just read it other than set it. If that is needed I
> will do it in another new patch.
> v1 -> v2: use sk_cookie as a key suggested by Eric.
Applied, thank you.
prev parent reply other threads:[~2018-04-23 13:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-20 15:18 [PATCH v3 net-next] net: introduce a new tracepoint for tcp_rcv_space_adjust Yafang Shao
2018-04-20 15:21 ` David Miller
2018-04-20 15:24 ` Yafang Shao
2018-04-23 13:58 ` David Miller [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=20180423.095844.822486182037441168.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=alexei.starovoitov@gmail.com \
--cc=eric.dumazet@gmail.com \
--cc=laoar.shao@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=songliubraving@fb.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