From nobody Sun Mar 17 17:12:56 2024 X-Original-To: current@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TyPh52v9fz5Dlv2; Sun, 17 Mar 2024 17:13:09 +0000 (UTC) (envelope-from tuexen@freebsd.org) Received: from drew.franken.de (drew.ipv6.franken.de [IPv6:2001:638:a02:a001:20e:cff:fe4a:feaa]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.franken.de", Issuer "Sectigo RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TyPh468qfz4CSC; Sun, 17 Mar 2024 17:13:08 +0000 (UTC) (envelope-from tuexen@freebsd.org) Authentication-Results: mx1.freebsd.org; none Received: from smtpclient.apple (unknown [IPv6:2a02:8109:1140:c3d:6562:c3d3:df66:1b2d]) (Authenticated sender: micmac) by drew.franken.de (Postfix) with ESMTPSA id EFF9E721E2806; Sun, 17 Mar 2024 18:12:57 +0100 (CET) Content-Type: text/plain; charset=us-ascii List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.500.171.1.1\)) Subject: Re: Request for Testing: TCP RACK From: tuexen@freebsd.org In-Reply-To: <6e795e9c-8de4-4e02-9a96-8fabfaa4e66f@app.fastmail.com> Date: Sun, 17 Mar 2024 18:12:56 +0100 Cc: Nuno Teixeira , garyj@gmx.de, current@freebsd.org, net@freebsd.org, Randall Stewart Content-Transfer-Encoding: quoted-printable Message-Id: References: <42C327BD-6CE4-43AA-A1AE-3BEC08D623DB@freebsd.org> <486915F0-456B-4B09-A8BC-93BBA79C4CA1@freebsd.org> <20240313080624.6c73908c@ernst.home> <508E3B47-8E1B-469F-97B1-2171A3098888@freebsd.org> <86a5n1i0xg.fsf@ltc.des.dev> <78D1FF09-71A3-4486-B934-D8332F54B237@freebsd.org> <20240316104053.20bef8c2@ernst.home> <20240316115128.33d11f7b@ernst.home> <7367F29A-D52B-4828-B79A-AA2667E81E7D@freebsd.org> <4FF534F6-B35D-4596-8D1E-226AD1347AC8@freebsd.org> <6e795e9c-8de4-4e02-9a96-8fabfaa4e66f@app.fastmail.com> To: Drew Gallatin X-Mailer: Apple Mail (2.3774.500.171.1.1) X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, T_SCC_BODY_TEXT_LINE autolearn=disabled version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on mail-n.franken.de X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:680, ipnet:2001:638::/32, country:DE] X-Rspamd-Queue-Id: 4TyPh468qfz4CSC > On 17. Mar 2024, at 16:39, Drew Gallatin wrote: >=20 > I don't have the full context, but it seems like the complaint is a = performance regression in bonnie++ and perhaps other things when = tcp_hpts is loaded, even when it is not used. Is that correct? Correct. >=20 > If so, I suspect its because we drive the tcp_hpts_softclock() routine = from userret(), in order to avoid tons of timer interrupts and context = switches. To test this theory, you could apply a patch like: >=20 > diff --git a/sys/kern/subr_trap.c b/sys/kern/subr_trap.c > index e9a16cd0b36e..54b540c97123 100644 > --- a/sys/kern/subr_trap.c > +++ b/sys/kern/subr_trap.c > @@ -138,7 +138,7 @@ userret(struct thread *td, struct trapframe = *frame) > * Software Timer Support for Network Processing" > * by Mohit Aron and Peter Druschel. > */ > - tcp_hpts_softclock(); > + /*tcp_hpts_softclock();*/ > /* > * Let the scheduler adjust our priority etc. > */ >=20 >=20 > If that fixes it, I suspect we should either make this hook optional = for casual users of tcp_hpts(), or add some kind of "last called" = timestamp to prevent it being called over and over and over on workloads = which are syscall heavy. Nuno, can you test that? >=20 > Note that for non-casual users of hpts (like Netflix, with hundreds of = thousands of TCP connections managed by hpts), this call is a huge win, = so I think we'd prefer that it remain in some form. Sure. Best regards Michael >=20 > Drew