From nobody Tue Feb 22 07:28:59 2022 X-Original-To: dev-commits-src-branches@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 3B46A19C84C0; Tue, 22 Feb 2022 07:29:00 +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 4K2rQ36JBYz3Q69; Tue, 22 Feb 2022 07:28:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1645514940; 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=76EK1dhGWZNuq6kKHb1q5kCiPFiNLqKzYHP4ggyYUS0=; b=OQYIPbdLTW5OpbtwYte44w44Fu2cvn9hd3CMYKQjjLFW83qJZnMwHF+v8c2eMyUCtop8lL tHdrg/ONOpm7BwVjVQIybc3TpZoMSwBObvLa2ulZSVubBZ97jX/b6IzjPH0httcntpN/Lr Jyid7jSsCLxZ2aCRh1ufp/WjlTY8T4I2fD8HNg19GOiuF5j9xfHQT/FO3FbJG+MYx2CCkc o2yiqIC1Z7TIlfm7Ya75YOkCGbnfjJU+nn+nNZcPGQAqGs3LtO2kuNTMFAp583iK7nENnx PHVDnrMmnWoEkG/Rg/eQVLPTVaO4oixUOrNksPLM9/v3Hz0z8g12HMMTQl2gYw== 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 95BAF20122; Tue, 22 Feb 2022 07:28:59 +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 21M7SxwI017341; Tue, 22 Feb 2022 07:28:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 21M7SxH8017340; Tue, 22 Feb 2022 07:28:59 GMT (envelope-from git) Date: Tue, 22 Feb 2022 07:28:59 GMT Message-Id: <202202220728.21M7SxH8017340@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "David E. O'Brien" Subject: git: c4756f4a7abd - stable/12 - Add explicit SI_SUB_EPOCH List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: obrien X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: c4756f4a7abd284b9beb732e734d62706c7cf352 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1645514940; 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=76EK1dhGWZNuq6kKHb1q5kCiPFiNLqKzYHP4ggyYUS0=; b=mVk3I1RtLszW85iHUUXkOB9UtxAxPosHhtrcu9En6g2Un+nnDlzyZxwVyp7mR5LxU1Mwpw gfOLYaDknuRKTpk0ST3BHzKR+fBthtGKrkCHzSUUczd8BD8iRQ4hEvGeZcGDfcPNf9UzGd 8A1TO2zOxLpFLwggExprEp4AY/JTBjUtLEN0cJuJDe65fXJ0HbKda7rKAcOW76Dxw1908r LJKOZ2eHxUm+ZaN6rutRZ45e7NHPeRqFcOYfPt3IXpwvLS0kZBHhiPLeez1w6+KTFeITP/ vJOHxZwYWg/G/sSwJbzB4xiTiK4Pzy9icky1Vk+dzdfF2N2ht1R+lSvjGMofcA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1645514940; a=rsa-sha256; cv=none; b=BerHUqf3Mng1zf7W5KYlDjJMaXXKKVbv7oitEU+pc41LaLL6rwtbhEsDDTmQO+OZjmXrgm ku2Sx01n8KqYWaQuV2q1JnqVd/uSmP4XiY/6fbbnMhGlsN3k9+sKtu62WQjZqfw22Wy/WW aHZjaxBb171iP0EIwGOR3mp421H6I159KCd1Jy/30AAKyYdri2NPAEQ0CSJIuETnPn0q5p FxS6g/a1iM2vLTgJqFhjC3b6T6m51Y83KnvJIZGztn03Zbv3GlG3eRCXxzxH1jkZfqqS8A AiSXtAdW9WLsr9DccMvql9ofDJPxnweIZ3+/zcG7xzaoFbHsDg1uD2zplY6crQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by obrien: URL: https://cgit.FreeBSD.org/src/commit/?id=c4756f4a7abd284b9beb732e734d62706c7cf352 commit c4756f4a7abd284b9beb732e734d62706c7cf352 Author: Conrad Meyer AuthorDate: 2019-11-22 23:23:40 +0000 Commit: David E. O'Brien CommitDate: 2022-02-22 06:20:49 +0000 Add explicit SI_SUB_EPOCH Add explicit SI_SUB_EPOCH, after SI_SUB_TASKQ and before SI_SUB_SMP (EARLY_AP_STARTUP). Rename existing "SI_SUB_TASKQ + 1" to SI_SUB_EPOCH. epoch(9) consumers cannot epoch_alloc() before SI_SUB_EPOCH:SI_ORDER_SECOND, but likely should allocate before SI_SUB_SMP. Prior to this change, consumers (well, epoch itself, and net/if.c) just open-coded the SI_SUB_TASKQ + 1 order to match epoch.c, but this was fragile. (cherry picked from commit 7993a104a10c81e4049e5923061d9bb7a5e35d80) --- sys/kern/subr_epoch.c | 2 +- sys/net/if.c | 3 +-- sys/sys/kernel.h | 1 + 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/kern/subr_epoch.c b/sys/kern/subr_epoch.c index af42446f7dff..8d021f748d57 100644 --- a/sys/kern/subr_epoch.c +++ b/sys/kern/subr_epoch.c @@ -169,7 +169,7 @@ epoch_init(void *arg __unused) global_epoch = epoch_alloc(0); global_epoch_preempt = epoch_alloc(EPOCH_PREEMPT); } -SYSINIT(epoch, SI_SUB_TASKQ + 1, SI_ORDER_FIRST, epoch_init, NULL); +SYSINIT(epoch, SI_SUB_EPOCH, SI_ORDER_FIRST, epoch_init, NULL); #if !defined(EARLY_AP_STARTUP) static void diff --git a/sys/net/if.c b/sys/net/if.c index d93d63f82f23..f2c306af7095 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -984,8 +984,7 @@ if_epochalloc(void *dummy __unused) net_epoch_preempt = epoch_alloc(EPOCH_PREEMPT); net_epoch = epoch_alloc(0); } -SYSINIT(ifepochalloc, SI_SUB_TASKQ + 1, SI_ORDER_ANY, - if_epochalloc, NULL); +SYSINIT(ifepochalloc, SI_SUB_EPOCH, SI_ORDER_ANY, if_epochalloc, NULL); static void if_attachdomain(void *dummy) diff --git a/sys/sys/kernel.h b/sys/sys/kernel.h index ab9574192797..c7d4d7a24e96 100644 --- a/sys/sys/kernel.h +++ b/sys/sys/kernel.h @@ -125,6 +125,7 @@ enum sysinit_sub_id { SI_SUB_MBUF = 0x2700000, /* mbuf subsystem */ SI_SUB_INTR = 0x2800000, /* interrupt threads */ SI_SUB_TASKQ = 0x2880000, /* task queues */ + SI_SUB_EPOCH = 0x2888000, /* epoch subsystem */ #ifdef EARLY_AP_STARTUP SI_SUB_SMP = 0x2900000, /* start the APs*/ #endif