On Thu, Apr 02, 2026 at 04:30:20PM -0700, Laurence Rowe wrote:
On Thu, Apr 2, 2026 at 12:22 PM Laurence Rowe <[email protected]> wrote:
On Thu, Apr 2, 2026 at 5:03 AM Stefano Garzarella <[email protected]> wrote:
> >Scheduling a timeout for a non-blocking accept with an empty backlog
> >meant AF_VSOCK sockets used by epoll network servers incurred hundreds
> >of microseconds of additional latency per accept loop compared to
> >AF_INET or AF_UNIX sockets.
>
> Not related to this patch, but should we do something similar (in
> another patch) also in vsock_connect() or doesn't matter since usually
> it's always blocking?
Looking at vsock_connect it's not immediately obvious to me whether it
is affected
in the same way. I'll capture some ftraces and follow up after
updating this patch.
This does not seem to be a problem for vsock_connect since it checks
for `if (flags & O_NONBLOCK) {` in the while loop before calling
`schedule_timeout`.
Timings and ftraces:
https://github.com/lrowe/linux-vsock-accept-timeout-investigation?tab=readme-ov-file#a-quick-look-at-connect
Thanks for checking and for the fix!
Stefano