From owner-svn-src-head@freebsd.org Fri Nov 22 23:23:41 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EB0D41C4450; Fri, 22 Nov 2019 23:23:41 +0000 (UTC) (envelope-from cem@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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47KXYT5vf5z4Myb; Fri, 22 Nov 2019 23:23:41 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AF3B62F2E; Fri, 22 Nov 2019 23:23:41 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xAMNNfPx027345; Fri, 22 Nov 2019 23:23:41 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xAMNNfwi027342; Fri, 22 Nov 2019 23:23:41 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201911222323.xAMNNfwi027342@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Fri, 22 Nov 2019 23:23:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r355024 - in head/sys: kern net sys X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: in head/sys: kern net sys X-SVN-Commit-Revision: 355024 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Nov 2019 23:23:42 -0000 Author: cem Date: Fri Nov 22 23:23:40 2019 New Revision: 355024 URL: https://svnweb.freebsd.org/changeset/base/355024 Log: 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. Reviewed by: mmacy Differential Revision: https://reviews.freebsd.org/D22503 Modified: head/sys/kern/subr_epoch.c head/sys/net/if.c head/sys/sys/kernel.h Modified: head/sys/kern/subr_epoch.c ============================================================================== --- head/sys/kern/subr_epoch.c Fri Nov 22 21:31:59 2019 (r355023) +++ head/sys/kern/subr_epoch.c Fri Nov 22 23:23:40 2019 (r355024) @@ -276,7 +276,7 @@ epoch_init(void *arg __unused) global_epoch = epoch_alloc("Global", 0); global_epoch_preempt = epoch_alloc("Global preemptible", 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 Modified: head/sys/net/if.c ============================================================================== --- head/sys/net/if.c Fri Nov 22 21:31:59 2019 (r355023) +++ head/sys/net/if.c Fri Nov 22 23:23:40 2019 (r355024) @@ -933,8 +933,7 @@ if_epochalloc(void *dummy __unused) net_epoch_preempt = epoch_alloc("Net preemptible", EPOCH_PREEMPT); net_epoch = epoch_alloc("Net", 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) Modified: head/sys/sys/kernel.h ============================================================================== --- head/sys/sys/kernel.h Fri Nov 22 21:31:59 2019 (r355023) +++ head/sys/sys/kernel.h Fri Nov 22 23:23:40 2019 (r355024) @@ -124,6 +124,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