From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by passt.top (Postfix) with ESMTP id 0A05F5A027D for ; Wed, 21 Feb 2024 22:09:28 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1708549767; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=jX8ED3TnTOkR2d+BVbGwp5+qhkRPmzdNRiK70DEEIOw=; b=WCEKz9wiCLddC84we7EkcUAgqG02U+0GlO75jJlMGs/m6aFi8ISDUES+MCbiPnBdJDJFJE M7r8GBdF1rXFasc+v9h+3UYLF9aGal4zgEPx7R2gwQXVOGRgkUietXyLO8KwzpzUFNPNSc xP1CbhpinIwTZjy7G3IfIJ97a83wZt8= Received: from mail-ed1-f71.google.com (mail-ed1-f71.google.com [209.85.208.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-32-dyaRw8BgPCSPqMwZFMEzGw-1; Wed, 21 Feb 2024 16:09:26 -0500 X-MC-Unique: dyaRw8BgPCSPqMwZFMEzGw-1 Received: by mail-ed1-f71.google.com with SMTP id 4fb4d7f45d1cf-564cb5b2bc5so1383336a12.0 for ; Wed, 21 Feb 2024 13:09:26 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708549764; x=1709154564; h=content-transfer-encoding:mime-version:organization:references :in-reply-to:message-id:subject:cc:to:from:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=jX8ED3TnTOkR2d+BVbGwp5+qhkRPmzdNRiK70DEEIOw=; b=kwYzzu1sorhi8QjXDB/A2eSqMUdCxED2jBz+2PZhn5EQgG0REnW6CYJ0i0bC16v5y8 heiKGBiMAE5Z0Kds/5ovzckGlu6d6AH0x4+NJDD65arNEkpeibxvzS+eZDwpjZownQqR 4r+my4koLur260fwFSpuUdhoVFtgtjnDRYVCgyz/AylrqYRO4Ak3+TOxwKcLBATysGUA OZZcVgOX82wODeUmsL5t1wBVaRjhYSEFeyWvw8sSCjVESw/0u7Lg5zb0lqwmJzkFOBNo 1HqOdNLSulIaga5BaddTqeAS/2xcDTjRJiTgLlFOyh0oQPKtC2SSGD69ZFBXY7voQiOG iZSw== X-Gm-Message-State: AOJu0YydgEApARe8G7sVzm6z4IzmiEDAuTybaS5EMmuza1SlatNMaKeR KpcPj4RnJi3hYjhK0AzbZ4TGIMABjerw0W38qEAdZ6YAYAaVZDKbfRRwac5+thdobNpPmV3aasy rJsZkL3DTqSO4cMT4wtxLm3agrm3Cr1EOy/ZhUCFgvZ/q2122t5FpCHbAaUT6 X-Received: by 2002:a05:6402:40c2:b0:563:e944:8e1 with SMTP id z2-20020a05640240c200b00563e94408e1mr12745526edb.29.1708549764697; Wed, 21 Feb 2024 13:09:24 -0800 (PST) X-Google-Smtp-Source: AGHT+IGqc5n2Z2p44xu6bYgx6ukvDYywaPdcio/j0H/NPUWdA2XQ//XAMBzFZIHV6SPHvTcjleAkzg== X-Received: by 2002:a05:6402:40c2:b0:563:e944:8e1 with SMTP id z2-20020a05640240c200b00563e94408e1mr12745521edb.29.1708549764393; Wed, 21 Feb 2024 13:09:24 -0800 (PST) Received: from maya.cloud.tilaa.com (maya.cloud.tilaa.com. [164.138.29.33]) by smtp.gmail.com with ESMTPSA id x3-20020aa7d383000000b005646c7b9712sm3412145edq.16.2024.02.21.13.09.22 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 21 Feb 2024 13:09:23 -0800 (PST) Date: Wed, 21 Feb 2024 22:08:49 +0100 From: Stefano Brivio To: David Gibson Subject: Re: [PATCH 2/6] tcp: Don't stop refilling socket pool if we find a filled entry Message-ID: <20240221220849.685474d9@elisabeth> In-Reply-To: <20240219075651.1360229-3-david@gibson.dropbear.id.au> References: <20240219075651.1360229-1-david@gibson.dropbear.id.au> <20240219075651.1360229-3-david@gibson.dropbear.id.au> Organization: Red Hat X-Mailer: Claws Mail 4.2.0 (GTK 3.24.36; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-ID-Hash: QYKGPEOGSXMAICFOEVA7UIPF5VKK2AUM X-Message-ID-Hash: QYKGPEOGSXMAICFOEVA7UIPF5VKK2AUM X-MailFrom: sbrivio@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: passt-dev@passt.top X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Mon, 19 Feb 2024 18:56:47 +1100 David Gibson 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. -- Stefano