linux-sctp.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Harald Welte <laforge@gnumonks.org>
To: linux-sctp@vger.kernel.org
Cc: Vadim Yanitskiy <vyanitskiy@sysmocom.de>
Subject: obtaining metrics of skb duration in sk_receive_queue
Date: Fri, 28 Feb 2025 20:23:48 +0100	[thread overview]
Message-ID: <Z8INRNOmfHejh2aw@nataraja> (raw)

Hi!

I'm currently facing a problem whose analysis would require to understand the
latency of how long a DATA chunk stays in the socket receive queue.  Basically
I'm trying to figure out the time between

1) the kernel SCTP stack making data available to the process (socket becomes readable)
2) the process actually performing a sctp_recvmsg to retrieve the data.

Ideally I'd like to see a histogram of those latencies to understand if there's anything
happening in the application process that causes delayed reads.

If anyone has encountered the same situation and/or is familiar with a solution, I'd appreciate
any pointers.

I suppose I could do kprobe+kretprobe on sctp_poll() in order to determine when the socket
becomes readable (return value & EPOLLIN)? Then store the timestamp in a
per-socket map containing a per-skb map containing the timestamps?

But then kprobe/kretprobe for sctp_recvmsg won't be sufficient as I
cannot access the skb at either the function entry nor the function
exit... only somewhere inside the function.  So it looks like a dead
end?

Thanks in advance.

-- 
- Harald Welte <laforge@gnumonks.org>          https://laforge.gnumonks.org/
============================================================================
"Privacy in residential applications is a desirable marketing option."
                                                  (ETSI EN 300 175-7 Ch. A6)

                 reply	other threads:[~2025-02-28 19:24 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=Z8INRNOmfHejh2aw@nataraja \
    --to=laforge@gnumonks.org \
    --cc=linux-sctp@vger.kernel.org \
    --cc=vyanitskiy@sysmocom.de \
    /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;
as well as URLs for NNTP newsgroup(s).