From nobody Thu Jul 14 20:15:39 2022 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 4LkQj757Jyz4T4CX; Thu, 14 Jul 2022 20:15:39 +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 4LkQj74Yhbz3TRf; Thu, 14 Jul 2022 20:15:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1657829739; 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=Dg/0eIL3mxvRejtd8WOj7u1/DT51VG8Zau/EoyfPTaA=; b=Sun41R0TdGjKwCTmMM37LkwvPWdG9xqTl0jpIpghWkF68B4RYQc6gLefrRlUa0WCzirjNk pa6EGELEIM8pk0D4bbelffUaLVdxvjvaC2DZMqf5pqvWRxTLr6QpAx9L4xbAKzLXOWZw9F pzmGp2vWl4OejwU36GtDj5wf89RquOHB4fCOYi8IxybgXoSajrpWtK5wBZioiYZ54UofI4 cI5NO1/Q1VKZ0HQ2vpnXLpQYY2ErcAdoCukXXDMtxKREpOtrkDbwyVgd07TUudm41aorCH RP/Q/FmijgRPuYNKnjFfiGhl0RpQ+4ij1hYEZ0hFLyNamXSNalkBZwMBwIlWng== 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 4LkQj73WMMzFxY; Thu, 14 Jul 2022 20:15:39 +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 26EKFdxk088354; Thu, 14 Jul 2022 20:15:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 26EKFdIZ088353; Thu, 14 Jul 2022 20:15:39 GMT (envelope-from git) Date: Thu, 14 Jul 2022 20:15:39 GMT Message-Id: <202207142015.26EKFdIZ088353@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: 2cf7870864ea - main - Collapse interrupt thread priorities. 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=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: 2cf7870864ea7ca753190c9fe8abf36985d601d6 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1657829739; 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=Dg/0eIL3mxvRejtd8WOj7u1/DT51VG8Zau/EoyfPTaA=; b=QwdvIkWlkqTMzAfMra0DcRhgKLyzNSxcGHFZKaKBs8E0BwVxn1RYkv91mbiZ0hyXpTpzz+ PqOj2BtrPMdGtk1/5dl6NT/qWbOuiBB11LZBmaK6jbJ9aCJP1SO88iVIPKepQ3CNav8IXt 4FO0FaGCQJrvOD2im//X7Ql/6ylm4TLLaHlzdGFdoPYrHISfYhd2PN36NknlFKRJOMgu3V zx9ukmmrlnpF1UP5f/pXHJVW4jItALqEv781ZQcCq467LmzkQhpiaIYHCAukmy7uTQU3zv Fdn7g3ttG+tlMIYGND/Jkq8R/uteIiOli4FoZ08zp1BZT9Kb5YXq5USibes3tw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1657829739; a=rsa-sha256; cv=none; b=KcqxzerYeZ4oZDxT0jHvXhZ4kciVl/F8xKpTAiXG9s3T/5APp2bXUp3SETFfKGYGdMmPh3 J6zlBN6ZKEv0Jo5aEeXik8KQ9T+D10mFfmqg9k9kQOYd10QLcJIFbUf4i+mbscf2XU6T2+ yh7gp8BgUHSBn0YBRUe6xZjk2g3aHAP+EAaHmn/3j2boiC9/O+L7vq8ASNJMfbyDB4eMda +O5qAoJba6mEIfHz8BBrUOTYaqHym55N9IRsvIxjUk6PWJO+OllvzUtj+SOuVm6grl3mhN rsmyHtHncsWauNM/Br5wJ43rP5m2Y1ka5bZBX0UBfUiahxpx+JbhXw19/WrSOQ== 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=2cf7870864ea7ca753190c9fe8abf36985d601d6 commit 2cf7870864ea7ca753190c9fe8abf36985d601d6 Author: John Baldwin AuthorDate: 2022-07-14 20:14:33 +0000 Commit: John Baldwin CommitDate: 2022-07-14 20:14:33 +0000 Collapse interrupt thread priorities. Allow high priority hardware interrupts to run at PI_REALTIME via INTR_TYPE_CLK, but collapse all other hardware interrupt threads to the next priority level (PI_INTR). Collapse all SWI priorities to the same priority level (PI_SOFT) just below PI_INTR. Reviewed by: kib, markj Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D35646 --- sys/kern/kern_intr.c | 16 ++-------------- sys/sys/interrupt.h | 4 ++-- sys/sys/priority.h | 21 +++++++++++++-------- 3 files changed, 17 insertions(+), 24 deletions(-) diff --git a/sys/kern/kern_intr.c b/sys/kern/kern_intr.c index 3cd80f63704f..3c4f9d0eac23 100644 --- a/sys/kern/kern_intr.c +++ b/sys/kern/kern_intr.c @@ -1491,20 +1491,8 @@ db_dump_intrhand(struct intr_handler *ih) case PI_REALTIME: db_printf("CLK "); break; - case PI_AV: - db_printf("AV "); - break; - case PI_TTY: - db_printf("TTY "); - break; - case PI_NET: - db_printf("NET "); - break; - case PI_DISK: - db_printf("DISK"); - break; - case PI_DULL: - db_printf("DULL"); + case PI_INTR: + db_printf("INTR"); break; default: if (ih->ih_pri >= PI_SOFT) diff --git a/sys/sys/interrupt.h b/sys/sys/interrupt.h index 09162469daed..ee4f07da1611 100644 --- a/sys/sys/interrupt.h +++ b/sys/sys/interrupt.h @@ -138,8 +138,8 @@ struct intr_event { #define SWI_DELAY 0x2 /* - * Software interrupt numbers in priority order. The priority determines - * the priority of the corresponding interrupt thread. + * Software interrupt numbers. Historically this was used to determine + * the relative priority of SWI ithreads. */ #define SWI_TTY 0 #define SWI_NET 1 diff --git a/sys/sys/priority.h b/sys/sys/priority.h index 428be2d02c68..8fbb9b03f77f 100644 --- a/sys/sys/priority.h +++ b/sys/sys/priority.h @@ -85,15 +85,20 @@ #define PRI_MIN_ITHD (PRI_MIN) #define PRI_MAX_ITHD (PRI_MIN_REALTIME - 1) +/* + * Most hardware interrupt threads run at the same priority, but can + * decay to lower priorities if they run for full time slices. + */ #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) -#define PI_DULL (PRI_MIN_ITHD + 20) -#define PI_SOFT (PRI_MIN_ITHD + 24) -#define PI_SWI(x) (PI_SOFT + (x) * RQ_PPQ) +#define PI_INTR (PRI_MIN_ITHD + 4) +#define PI_AV PI_INTR +#define PI_NET PI_INTR +#define PI_DISK PI_INTR +#define PI_TTY PI_INTR +#define PI_DULL PI_INTR +#define PI_SOFT (PRI_MIN_ITHD + 8) +#define PI_SOFTCLOCK PI_SOFT +#define PI_SWI(x) PI_SOFT #define PRI_MIN_REALTIME (48) #define PRI_MAX_REALTIME (PRI_MIN_KERN - 1)