public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
To: Eric Dumazet <edumazet@google.com>,
	 "David S . Miller" <davem@davemloft.net>,
	 Jakub Kicinski <kuba@kernel.org>,
	 Paolo Abeni <pabeni@redhat.com>
Cc: Simon Horman <horms@kernel.org>,
	 Kuniyuki Iwashima <kuniyu@google.com>,
	 Willem de Bruijn <willemb@google.com>,
	 netdev@vger.kernel.org,  eric.dumazet@gmail.com,
	 Eric Dumazet <edumazet@google.com>
Subject: Re: [PATCH net-next] net: use ktime_t in struct scm_timestamping_internal
Date: Tue, 03 Mar 2026 22:26:06 -0500	[thread overview]
Message-ID: <willemdebruijn.kernel.24c9a9b9e12df@gmail.com> (raw)
In-Reply-To: <20260304012747.881644-1-edumazet@google.com>

Eric Dumazet wrote:
> Instead of using struct timespec64 in scm_timestamping_internal,
> use ktime_t, saving 24 bytes in kernel stack.
> 
> This makes tcp_update_recv_tstamps() small enough to be inlined.
> 
> The ktime_t -> timespec64 conversions happen after socket lock
> has been released in tcp_recvmsg(), and only if the application
> requested them.
> 
> $ scripts/bloat-o-meter -t vmlinux.0 vmlinux
> add/remove: 0/2 grow/shrink: 5/4 up/down: 146/-277 (-131)
> Function                                     old     new   delta
> tcp_zerocopy_receive                        2383    2425     +42
> mptcp_recvmsg                               1565    1607     +42
> tcp_recvmsg_locked                          3797    3823     +26
> put_cmsg_scm_timestamping64                  131     149     +18
> put_cmsg_scm_timestamping                    131     149     +18
> __pfx_tcp_update_recv_tstamps                 16       -     -16
> do_tcp_getsockopt                           4024    4006     -18
> tcp_recv_timestamp                           474     430     -44
> tcp_zc_handle_leftover                       417     371     -46
> __sock_recv_timestamp                       1087    1031     -56
> tcp_update_recv_tstamps                       97       -     -97
> Total: Before=25223788, After=25223657, chg -0.00%
> 
> Signed-off-by: Eric Dumazet <edumazet@google.com>

Reviewed-by: Willem de Bruijn <willemb@google.com>

  reply	other threads:[~2026-03-04  3:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-04  1:27 [PATCH net-next] net: use ktime_t in struct scm_timestamping_internal Eric Dumazet
2026-03-04  3:26 ` Willem de Bruijn [this message]
2026-03-04  7:11 ` Jason Xing
2026-03-05  2:56   ` Eric Dumazet
2026-03-05  2:40 ` 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=willemdebruijn.kernel.24c9a9b9e12df@gmail.com \
    --to=willemdebruijn.kernel@gmail.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=eric.dumazet@gmail.com \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=kuniyu@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=willemb@google.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