From owner-svn-src-all@freebsd.org Mon Oct 14 04:17:57 2019 Return-Path: Delivered-To: svn-src-all@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 345CBBF62F; Mon, 14 Oct 2019 04:17:57 +0000 (UTC) (envelope-from glebius@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 46s4zT0ZYfz3Q8v; Mon, 14 Oct 2019 04:17:57 +0000 (UTC) (envelope-from glebius@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 EC0C32797C; Mon, 14 Oct 2019 04:17:56 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x9E4HuuR000264; Mon, 14 Oct 2019 04:17:56 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x9E4HuA2000261; Mon, 14 Oct 2019 04:17:56 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201910140417.x9E4HuA2000261@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Mon, 14 Oct 2019 04:17:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r353485 - in head/sys: kern sys X-SVN-Group: head X-SVN-Commit-Author: glebius X-SVN-Commit-Paths: in head/sys: kern sys X-SVN-Commit-Revision: 353485 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Oct 2019 04:17:57 -0000 Author: glebius Date: Mon Oct 14 04:17:56 2019 New Revision: 353485 URL: https://svnweb.freebsd.org/changeset/base/353485 Log: Since EPOCH_TRACE had been moved to opt_global.h, we don't need to waste extra space in struct thread. Modified: head/sys/kern/kern_thread.c head/sys/kern/subr_epoch.c head/sys/sys/proc.h Modified: head/sys/kern/kern_thread.c ============================================================================== --- head/sys/kern/kern_thread.c Mon Oct 14 04:10:00 2019 (r353484) +++ head/sys/kern/kern_thread.c Mon Oct 14 04:17:56 2019 (r353485) @@ -668,7 +668,9 @@ thread_link(struct thread *td, struct proc *p) LIST_INIT(&td->td_contested); LIST_INIT(&td->td_lprof[0]); LIST_INIT(&td->td_lprof[1]); +#ifdef EPOCH_TRACE SLIST_INIT(&td->td_epochs); +#endif sigqueue_init(&td->td_sigqueue, p); callout_init(&td->td_slpcallout, 1); TAILQ_INSERT_TAIL(&p->p_threads, td, td_plist); @@ -685,7 +687,9 @@ thread_unlink(struct thread *td) struct proc *p = td->td_proc; PROC_LOCK_ASSERT(p, MA_OWNED); +#ifdef EPOCH_TRACE MPASS(SLIST_EMPTY(&td->td_epochs)); +#endif TAILQ_REMOVE(&p->p_threads, td, td_plist); p->p_numthreads--; Modified: head/sys/kern/subr_epoch.c ============================================================================== --- head/sys/kern/subr_epoch.c Mon Oct 14 04:10:00 2019 (r353484) +++ head/sys/kern/subr_epoch.c Mon Oct 14 04:17:56 2019 (r353485) @@ -258,7 +258,9 @@ epoch_init(void *arg __unused) DPCPU_ID_PTR(cpu, epoch_cb_task), NULL, cpu, NULL, NULL, "epoch call task"); } +#ifdef EPOCH_TRACE SLIST_INIT(&thread0.td_epochs); +#endif inited = 1; global_epoch = epoch_alloc("Global", 0); global_epoch_preempt = epoch_alloc("Global preemptible", EPOCH_PREEMPT); Modified: head/sys/sys/proc.h ============================================================================== --- head/sys/sys/proc.h Mon Oct 14 04:10:00 2019 (r353484) +++ head/sys/sys/proc.h Mon Oct 14 04:17:56 2019 (r353485) @@ -367,7 +367,9 @@ struct thread { void *td_lkpi_task; /* LinuxKPI task struct pointer */ struct epoch_tracker *td_et; /* (k) compat KPI spare tracker */ int td_pmcpend; +#ifdef EPOCH_TRACE SLIST_HEAD(, epoch_tracker) td_epochs; +#endif }; struct thread0_storage {