From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=none (p=none dis=none) header.from=gibson.dropbear.id.au Authentication-Results: passt.top; dkim=pass (2048-bit key; secure) header.d=gibson.dropbear.id.au header.i=@gibson.dropbear.id.au header.a=rsa-sha256 header.s=202504 header.b=Z/a0dIgq; dkim-atps=neutral Received: from mail.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by passt.top (Postfix) with ESMTPS id 843805A0008 for ; Fri, 11 Apr 2025 06:55:03 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202504; t=1744347293; bh=lLQiCOZO/GUMLO4wtuAIXvER+rZUrfiScPUG9T7lS7k=; h=Date:From:To:Cc:Subject:From; b=Z/a0dIgqgHiBW+d3wuVv8ZQZVpifsuf53PJg7oKVxfXJscAejIcgquHLYZloI9bS5 1O1YmTvdHOyTmj65ZLUkGMwkkTNfBu573fdDjSjOKtexZ9uRycBogclD+QdY9jhulb jQfLRfNO5cJzH8gMrymRqJjdbBzlBcA+2nI0PacR6rmrnvi5Mc8tj5DYQZh/M2TY1P m/smXzJmcxl819DuL84OIC16OmI7vMOUjVIk00cjOxj2u8ZQBKTYnCHKLcwvOOCKyQ IOSMNTFvxTUS+SXBUpkXMoXakjds75t27zqKD5vxYo0HF4ukS/h3ODk+oA1K85yqMj UpgkjoMdxYLzg== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4ZYkrF26nlz4x0L; Fri, 11 Apr 2025 14:54:53 +1000 (AEST) Date: Fri, 11 Apr 2025 14:54:50 +1000 From: David Gibson To: Stefano Brivio Subject: tcp_splice SO_RCVLOWAT code; never invoked? Message-ID: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="NoQoDNtnBwCF2eLr" Content-Disposition: inline Message-ID-Hash: OASVZZD75U544PRDBJNSR5RRZ3GX3GDN X-Message-ID-Hash: OASVZZD75U544PRDBJNSR5RRZ3GX3GDN X-MailFrom: dgibson@gandalf.ozlabs.org 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: --NoQoDNtnBwCF2eLr Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Stefano, When debugging the splice EINTR bug I fixed the other day, I found the whole tcp_splice_sock_handler() pretty confusing to follow. So, I was working on some cleanups. But then I noticed something more specifically odd here. We've discussed the use of SO_RCVLOWAT previously. AIUI, you found it essential to achieve reasonable throughput and load for spliced connections. I think we've agreed before that it's not entirely the right tool for the job; just the only one available. Except... as far as I can tell, it's never invoked. AFAICT the only place we enable the RCVLOWAT stuff is in a block under this if: if (!(conn->flags & lowat_set_flag) && readlen > (long)c->tcp.pipe_size / 10) { But... this occurs immediately after: if (readlen >=3D (long)c->tcp.pipe_size * 10 / 100) continue; =2E. which is a strictly more inclusive condition, so we'll never reach the RCVLOWAT block. To confirm, I tried putting an ASSERT(0) in that block, and didn't hit it with spliced iperf3 runs. Am I missing something? --=20 David Gibson (he or they) | 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 --NoQoDNtnBwCF2eLr Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmf4oJkACgkQzQJF27ox 2GcMpQ//RBDYZ30DobJQ95Pc9+azWhik1XSfCGve4tHKSUER9GTMp06IzdE7jceK iGPc+aP5bCvcsYbJY91gyJTp475/TNk4PvLle7lv0l5WNXMI62eqsoP69I/y0w6o dmZjVee9e0T+L0UGzcD+oWALq8l3bQNnjwjW61E7i/Mu+ylvj8w509PAZ/IdkjKc uQDx0ZHWa6wUZG2NRztPC0/raGhR4IXRKJ1KxoQtDWsMSX9NZLn0RWdavhH+Peog dzpuXlLBKRF6h5YCpbQ4Sp59kTVeNTETXrVIArUCt4ydFs0AEoMe7Q5nO4Ri9s1C snQSg3OXt/bLOsPKiqaogUMmeo3NBCRwcnnT7Q7LxyYBW9MLqEqfAZqeSKv4ix+Q OT3+oYD//7Ka6wym/Fj2oBT67xYqqj12hLTqfG2eaCcDpSUO3iGFmVAsKuDr2fYx t4eoeDceO7Y/RUy39SpCySUOE/WCR0AABsApI+g0/6+AJ3ccagAzj3vzvBGNfdSW xCYg7x35gJ9x0IlZKbXlrhmYm8s5cldFtxg0rqsbeZmuW63EvA6pxcccTZ2myEI0 QV8XNkeNeWWt8BU5lxcBRhbmmG6UTSbAbcBp2Mc/7l0PPRPkBVQUwzpFFkTEC4GL 7QR8K8HReXXjmKjvTcbEq0w7Lkmfp3ePkcMHczAcH+Xj5KfiF4I= =fgbB -----END PGP SIGNATURE----- --NoQoDNtnBwCF2eLr--