From nobody Tue Jul 21 02:26:54 2026 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 4h41VR333nz6lLrL for ; Tue, 21 Jul 2026 02:26:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4h41VR0TfCz3mjJ for ; Tue, 21 Jul 2026 02:26:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1784600815; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=88D7ncFYMA1Ucif+2S1aHjzeyzOvoYP13ND0hu3jmcI=; b=V3lmxmBwipVBRhAKqVuynZrWXjwNjhCNvDRIxtrQ7SW3lEXbAx86r4QFuP3csGKpq80ixC Xxs4RB5sQLgnjT/S5KfG+vRGia6tRYOK+z2KPA/rjCnoDmWam8lRCdiKxu7l2L8x75fjix OJGZ50fVFgcq7WP1JPxfLr8F5ZI3MtaXynSIzMVafRrdgqQNV7QPcZwjd23yp6vvaaLaR5 4MCu7KiJk69MCLnY95Fc7ti6i67X2UPAxzlKgEKTcj/wYYqyGhZRL7YGHidLqLTJ5IU4k/ CkZ3OlBirMSlrtW0w2G1WbG+/N/r+wJmnrVwKQ171MgJvLSdMo9AcA895tJpLQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1784600815; a=rsa-sha256; cv=none; b=E1Ehl9UnTt1NnsNbClYmB7zA+XWMf7e1vCABsHhB2Ny9G1dGgqDIowOTTsMAnk2cWKm1+h L778yko7+RzGW68DBEpcqg7GFuRamf56YVWfBLShD8eArjsWZFE3Ph1cajQleNLCGDxMeS 6HjVDSe7Ld49vtvSv3Ou+sWXGIiQle2p6y0Sx0xTrdiMySgWloOQc830rhahaAoUnDMV7J ujX4M2z90FZQfWit//Hho3CaI+ki9UXe5GptvcaPnKcl+1YYxLcS/j6UmnZAG4/i8Shc1y yRxm8kLCY7c6iJle6DnVKCAXdSTYqA3kHx4P+G6JkvA4BBmomoKP90S6XiuiPw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1784600815; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=88D7ncFYMA1Ucif+2S1aHjzeyzOvoYP13ND0hu3jmcI=; b=Ef8I7CvtNfn3/k9QfEFtdiynVBoggJJskKpmM8H0cBLjYqECKVNvgb8mxGeFSL3PR0DSRo akn4Nid5RqW5fDfJHMfWRrc8oginbEAzM8K8QM81dV1VMdLM3aes2vs/+UlXubk/oAAySZ 0q9FB+BnYlzYx/8MK16fr7m30bl8mj1OYZDCMBCrBgfRURcVytSggUjYlVrzsAHcNAUiXl JQe+gMgFa4Bl35O25ds0ReqEBzRxuH+kj/vnPNF/9I8C+T0QlL+E3PU+iZiOZ4FSnRO/rP r5IdyawEuXFLjL4y7ek7FlS2HxAVInTirPusoLn91mB/dxQVpjpIqn14MWXC+Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4h41VQ6LQDzDGl for ; Tue, 21 Jul 2026 02:26:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 21c4f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 21 Jul 2026 02:26:54 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: 5217b4a728dc - main - sched_4bsd: Remove obsolete SMP scaling for ticks per priority level 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5217b4a728dc9fd72bc844c2a6bb30a2a28119c4 Auto-Submitted: auto-generated Date: Tue, 21 Jul 2026 02:26:54 +0000 Message-Id: <6a5ed8ee.21c4f.3395bd77@gitrepo.freebsd.org> The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=5217b4a728dc9fd72bc844c2a6bb30a2a28119c4 commit 5217b4a728dc9fd72bc844c2a6bb30a2a28119c4 Author: Olivier Certner AuthorDate: 2026-06-13 14:19:18 +0000 Commit: Olivier Certner CommitDate: 2026-07-21 02:24:17 +0000 sched_4bsd: Remove obsolete SMP scaling for ticks per priority level The INVERSE_ESTCPU_WEIGHT scaling had been introduced by commit b698380f33ef ("Quick fix for scaling of statclock ticks in the SMP case. ...") to leave more discrimination room for multiple CPUs possibly adding their ticks to the same 'struct ksegrp' (but also slightly changing how CPU hogs are penalized). Then, commit 8460a577a4b4 ("Make KSE a kernel option, ...") introduced the current thread-based code, where tick accounting is only done on the current thread, which renders this trick obsolete on !KSE. Finally, when KSE was removed, the trick became generally obsolete. The trick is actually even harmful because it changes the intended behavior of priorizing more the CPUs that use the less ticks (and so, impairs boosting "interactive" processes). Remove it now. Clamping of 'ts_estcpu' and its relation to the load-average-based decay may be re-examined later. Fixes: 8460a577a4b4 ("Make KSE a kernel option, ...") MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57827 --- sys/kern/sched_4bsd.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/sys/kern/sched_4bsd.c b/sys/kern/sched_4bsd.c index f86dcda218a4..98c5cd8836a8 100644 --- a/sys/kern/sched_4bsd.c +++ b/sys/kern/sched_4bsd.c @@ -70,11 +70,7 @@ * INVERSE_ESTCPU_WEIGHT is only suitable for statclock() frequencies in * the range 100-256 Hz (approximately). */ -#ifdef SMP -#define INVERSE_ESTCPU_WEIGHT (8 * smp_cpus) -#else #define INVERSE_ESTCPU_WEIGHT 8 /* 1 / (priorities per estcpu level). */ -#endif #define NICE_WEIGHT 1 /* Priorities per nice level. */ #define ESTCPULIM(e) \ min((e), INVERSE_ESTCPU_WEIGHT * \