From nobody Thu Apr 21 19:02:33 2022 X-Original-To: dev-commits-src-main@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 8F0271992E36; Thu, 21 Apr 2022 19:02:33 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Kkn3Y2ZrMz3C04; Thu, 21 Apr 2022 19:02:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1650567753; 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=S5vNNiQ9NaGN9UkDg5nFikltbpsZEEu1nL5JYeo47F0=; b=hNQnvNihQ/U4KhXLFUD8DQlZjkH7FCh1Gpy5Pwa+Lraf/xF/2NujS5T1P/5q+8KcVQ+lKU ToV4Iktauc9/yJ5aE5rQQ7F8xXsLI2BVHcy5XlPbcnCxQKTaR68sTwZ7cxH7wWfPoHIF36 sI8l9waz4UFAFqDm/vg7wFLyICnGRvh9Ttxg0XVHjG2homGIl1lo6/r2QM2hmp2jVGvu+Z XJYFCcns3zriKaiqaKF1f8EPm/ep8y/EgExg0syYO5dNBX4Eppe82BKw0LBUkE2CwsjtZK TRFB3iwGr0cZl/vHHvKM/oApz2QMo9r/LLu4HD8M23tJgSiCjmJHMeJ3d3UdOg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 39E0765DA; Thu, 21 Apr 2022 19:02:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 23LJ2X7e035797; Thu, 21 Apr 2022 19:02:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 23LJ2XFS035796; Thu, 21 Apr 2022 19:02:33 GMT (envelope-from git) Date: Thu, 21 Apr 2022 19:02:33 GMT Message-Id: <202204211902.23LJ2XFS035796@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: c7aa0304d5b5 - main - Run softclock threads at a hardware ithread priority. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c7aa0304d5b5443340fc7920975743cfe2c0fca3 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1650567753; 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=S5vNNiQ9NaGN9UkDg5nFikltbpsZEEu1nL5JYeo47F0=; b=l4EIWVIjvZm1SRgNXJKfElbHIZrNjN6BPYjqtsXZVHiEgR7qi2f6PqGi1HXI60b4udF71U c4fgOP6KEF6hWV915J5aHbsR2kpIBg8ovsy2cejdnuWMJsZnLFkvikXn/5YFniv18aYlsi 03TnSbtm+RnTXut94iiKshGKzm9vVYLoPuJzvvj1uX5zVkXRFdXmiGeoEskoTBlIGjiGLF JMucAHCKCw/GujgQ3/d+HGD9e1fobjO2VTC3zJZwQGzGXNFShiLHI4RTHQcggSHzhlbhrP RdhTc9ylPpEF5m0GSMbNX3PHQJpdddifgB2iImlU2yekJQYrxMkFqEYECqO/iQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1650567753; a=rsa-sha256; cv=none; b=EN51ASDbUvrlCihfFJEfMhrBCm/Fa1l9c9GEsLpETpM3uUBdJw6en7+YZNWw2qgppWjAKU SPkleN/Xgjj06KtV35Kw9CNonaTsRtPXz8UROJ15mOM6NkQluhdHaPKOwhWvCkeL+NI4tB Sjzryr4kEaFBM6Tc4Kk6LRcfVlC+wWFhgOq+tePoo4XWHJcI8ZOuoDFlyT/t4wKjsQrIGN Kmd6Onya+r+9LDHH4WUVfOaomoH3R8Rt1okzxdVS1bSWWzT4EDOmzM+C6Gnmp9mIz3W957 UnALB447ozTGmCiwiJD6fHmmXVcFBGWcJsu//sc6BdMk0t0EDRAEX0qKXJCk9A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=c7aa0304d5b5443340fc7920975743cfe2c0fca3 commit c7aa0304d5b5443340fc7920975743cfe2c0fca3 Author: John Baldwin AuthorDate: 2022-04-21 17:40:01 +0000 Commit: John Baldwin CommitDate: 2022-04-21 17:40:01 +0000 Run softclock threads at a hardware ithread priority. Add a new PI_SOFTCLOCK for use by softclock threads. Currently this maps to PI_AV which is the second-highest ithread priority. Reviewed by: mav, kib Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D33693 --- sys/kern/kern_timeout.c | 2 +- sys/sys/priority.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/kern/kern_timeout.c b/sys/kern/kern_timeout.c index db4217114c35..121ee2b13f46 100644 --- a/sys/kern/kern_timeout.c +++ b/sys/kern/kern_timeout.c @@ -393,7 +393,7 @@ start_softclock(void *dummy) cc->cc_thread = td; thread_lock(td); sched_class(td, PRI_ITHD); - sched_prio(td, PI_SWI(SWI_CLOCK)); + sched_prio(td, PI_SOFTCLOCK); TD_SET_IWAIT(td); thread_lock_set(td, (struct mtx *)&cc->cc_lock); thread_unlock(td); diff --git a/sys/sys/priority.h b/sys/sys/priority.h index 60327cf20293..428be2d02c68 100644 --- a/sys/sys/priority.h +++ b/sys/sys/priority.h @@ -87,6 +87,7 @@ #define PI_REALTIME (PRI_MIN_ITHD + 0) #define PI_AV (PRI_MIN_ITHD + 4) +#define PI_SOFTCLOCK PI_AV #define PI_NET (PRI_MIN_ITHD + 8) #define PI_DISK (PRI_MIN_ITHD + 12) #define PI_TTY (PRI_MIN_ITHD + 16)