Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 17 Mar 2024 18:12:56 +0100
From:      tuexen@freebsd.org
To:        Drew Gallatin <gallatin@freebsd.org>
Cc:        Nuno Teixeira <eduardo@freebsd.org>, garyj@gmx.de, current@freebsd.org, net@freebsd.org, Randall Stewart <rrs@freebsd.org>
Subject:   Re: Request for Testing: TCP RACK
Message-ID:  <B5D6BF20-3EF3-4B1C-982A-63E6678B3AAD@freebsd.org>
In-Reply-To: <6e795e9c-8de4-4e02-9a96-8fabfaa4e66f@app.fastmail.com>
References:  <42C327BD-6CE4-43AA-A1AE-3BEC08D623DB@freebsd.org> <CAFDf7U%2BU3QpgsG-hY0u3tC_X9WKSRzuAM7Nfhzu-%2BqPBbs1nng@mail.gmail.com> <486915F0-456B-4B09-A8BC-93BBA79C4CA1@freebsd.org> <20240313080624.6c73908c@ernst.home> <508E3B47-8E1B-469F-97B1-2171A3098888@freebsd.org> <86a5n1i0xg.fsf@ltc.des.dev> <AE656D0C-FA5B-4194-8B57-4140CD57ABF1@freebsd.org> <CAFDf7UJRitdHz5QebNH9A4mNo0pKCBRfZCfmFgjNVSdCr_JXrw@mail.gmail.com> <78D1FF09-71A3-4486-B934-D8332F54B237@freebsd.org> <20240316104053.20bef8c2@ernst.home> <CAFDf7UKT=FYsaXRacwsnjDkYUjT4_1QnHynWAc67yxQS8XA0Yw@mail.gmail.com> <20240316115128.33d11f7b@ernst.home> <CAFDf7U%2BBgyw2e1hJySt-4GTX3=qn6LX7B2Ebzcmvr%2BD6MJqfpg@mail.gmail.com> <7367F29A-D52B-4828-B79A-AA2667E81E7D@freebsd.org> <CAFDf7UKRLpBt%2B11GmWO5p0b-L9ZMve6MyCxRUuVm32EBZY0MWA@mail.gmail.com> <BB57B7CC-1506-4B4C-8A04-26F67DE30EDA@freebsd.org> <CAFDf7ULtN9owoH-ns2OfR6ZhypNGxuNzkQbb2P9zR8ceFgaj5A@mail.gmail.com> <4FF534F6-B35D-4596-8D1E-226AD1347AC8@freebsd.org> <CAFDf7U%2BAjfeY%2Bqjq%2B-R71w5i1pRoxQdOmqJ9w4s1U13AA8-duA@mail.gmail.com> <C5D50314-4B0C-42F6-AA67-B5A32A4BA335@freebsd.org> <CAFDf7UKL6vtKo1Mn9Vw_5OD9Xubuw%2BdgS83WKwsiTUaXHs8D6Q@mail.gmail.com> <6e795e9c-8de4-4e02-9a96-8fabfaa4e66f@app.fastmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
> On 17. Mar 2024, at 16:39, Drew Gallatin <gallatin@freebsd.org> 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





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?B5D6BF20-3EF3-4B1C-982A-63E6678B3AAD>