From nobody Mon Dec 04 20:27:00 2023 X-Original-To: dev-commits-src-all@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 4SkZw25nhgz52mj0; Mon, 4 Dec 2023 20:27:14 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4SkZw221LFz3gYN; Mon, 4 Dec 2023 20:27:14 +0000 (UTC) (envelope-from kostikbel@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: from tom.home (kib@localhost [127.0.0.1] (may be forged)) by kib.kiev.ua (8.17.1/8.17.1) with ESMTP id 3B4KR0cQ033054; Mon, 4 Dec 2023 22:27:03 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 3B4KR0cQ033054 Received: (from kostik@localhost) by tom.home (8.17.1/8.17.1/Submit) id 3B4KR0Dj033053; Mon, 4 Dec 2023 22:27:00 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 4 Dec 2023 22:27:00 +0200 From: Konstantin Belousov To: Gleb Smirnoff Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: e3cbc572f154 - main - kern/subr_trap.c: repair the HPTS performance hack in userret() Message-ID: References: <202312041859.3B4IxVcB043749@gitrepo.freebsd.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202312041859.3B4IxVcB043749@gitrepo.freebsd.org> X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=4.0.0 X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-14) on tom.home 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:6939, ipnet:2001:470::/32, country:US] X-Rspamd-Queue-Id: 4SkZw221LFz3gYN On Mon, Dec 04, 2023 at 06:59:31PM +0000, Gleb Smirnoff wrote: > The branch main has been updated by glebius: > > URL: https://cgit.FreeBSD.org/src/commit/?id=e3cbc572f1541fdc18be9971d23e210d5018e662 > > commit e3cbc572f1541fdc18be9971d23e210d5018e662 > Author: Gleb Smirnoff > AuthorDate: 2023-12-04 18:19:46 +0000 > Commit: Gleb Smirnoff > CommitDate: 2023-12-04 18:19:46 +0000 > > kern/subr_trap.c: repair the HPTS performance hack in userret() > > It wasn't functional as subr_trap.c doesn't include opt_inet.h. Put a > better comment provided by gallatin@ in place of the old one. The idea > is to use userret() as a cheap place to call a soft clock. This approach > saves CPU on busy machines and saves power on idle machines. > An alternative would be to constantly schedule callouts. Running with > neither callouts nor the soft clock ruins HPTS precision. Can this be converted to AST, and scheduled as needed, instead of current ugliness?