public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: Stefano Brivio <sbrivio@redhat.com>
Cc: passt-dev@passt.top
Subject: Re: [PATCH 2/6] tcp: Don't stop refilling socket pool if we find a filled entry
Date: Thu, 22 Feb 2024 08:42:58 +1100	[thread overview]
Message-ID: <ZdZuYuB90j4Ju9Qb@zatzit> (raw)
In-Reply-To: <20240221220849.685474d9@elisabeth>

[-- Attachment #1: Type: text/plain, Size: 1208 bytes --]

On Wed, Feb 21, 2024 at 10:08:49PM +0100, Stefano Brivio wrote:
> On Mon, 19 Feb 2024 18:56:47 +1100
> David Gibson <david@gibson.dropbear.id.au> wrote:
> 
> > Currently tcp_sock_refill_pool() stops as soon as it finds an entry in the
> > pool with a valid fd.  This appears to makes sense: we always use fds from
> > the front of the pool, so if we find a filled one, the rest of the pool
> > should be filled as well.
> > 
> > However, that's not quite correct.  If a previous refill hit errors trying
> > to open new sockets, it could leave gaps between blocks of valid fds. We're
> > going to add some changes that could make that more likely.
> 
> Uh oh, good catch, I didn't think of the possibility that with 3/6 we
> could otherwise stop in the middle of a block of "empty" slots, with
> filled slots occurring after them.

Right.  The consequences aren't particularly dire if we get this
wrong: we don't fill the pool as full as we should, but we should
still have fds to work with.

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2024-02-21 21:46 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-19  7:56 [PATCH 0/6] tcp: Improve error handling around socket pools David Gibson
2024-02-19  7:56 ` [PATCH 1/6] treewide: Use sa_family_t for address family variables David Gibson
2024-02-19  7:56 ` [PATCH 2/6] tcp: Don't stop refilling socket pool if we find a filled entry David Gibson
2024-02-21 21:08   ` Stefano Brivio
2024-02-21 21:42     ` David Gibson [this message]
2024-02-19  7:56 ` [PATCH 3/6] tcp: Stop on first error when refilling socket pools David Gibson
2024-02-19  7:56 ` [PATCH 4/6] tcp, tcp_splice: Issue warnings if unable to refill socket pool David Gibson
2024-02-21 21:09   ` Stefano Brivio
2024-02-21 21:44     ` David Gibson
2024-02-22 12:45       ` Stefano Brivio
2024-02-19  7:56 ` [PATCH 5/6] tcp, tcp_splice: Helpers for getting sockets from the pools David Gibson
2024-02-19  7:56 ` [PATCH 6/6] tcp: Don't store errnos in socket pool David Gibson
2024-02-21 21:09   ` Stefano Brivio
2024-02-21 21:45     ` David Gibson
2024-02-27 14:22 ` [PATCH 0/6] tcp: Improve error handling around socket pools Stefano Brivio

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=ZdZuYuB90j4Ju9Qb@zatzit \
    --to=david@gibson.dropbear.id.au \
    --cc=passt-dev@passt.top \
    --cc=sbrivio@redhat.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.
Code repositories for project(s) associated with this public inbox

	https://passt.top/passt

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 IMAP folder(s).