From owner-svn-src-all@freebsd.org Mon Oct 21 18:19:34 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 1B0DC15F2D8; Mon, 21 Oct 2019 18:19:34 +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 46xlKK6pt8z3DF6; Mon, 21 Oct 2019 18:19:33 +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 CE38427D4C; Mon, 21 Oct 2019 18:19:33 +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 x9LIJXUq073566; Mon, 21 Oct 2019 18:19:33 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x9LIJWad073561; Mon, 21 Oct 2019 18:19:32 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201910211819.x9LIJWad073561@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Mon, 21 Oct 2019 18:19:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r353869 - 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: 353869 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, 21 Oct 2019 18:19:34 -0000 Author: glebius Date: Mon Oct 21 18:19:32 2019 New Revision: 353869 URL: https://svnweb.freebsd.org/changeset/base/353869 Log: Remove epoch tracker from struct thread. It was an ugly crutch to emulate locking semantics for if_addr_rlock() and if_maddr_rlock(). Modified: head/sys/kern/init_main.c head/sys/kern/kern_thread.c head/sys/kern/subr_epoch.c head/sys/sys/epoch.h head/sys/sys/proc.h Modified: head/sys/kern/init_main.c ============================================================================== --- head/sys/kern/init_main.c Mon Oct 21 18:17:03 2019 (r353868) +++ head/sys/kern/init_main.c Mon Oct 21 18:19:32 2019 (r353869) @@ -514,7 +514,6 @@ proc0_init(void *dummy __unused) td->td_pflags = TDP_KTHREAD; td->td_cpuset = cpuset_thread0(); td->td_domain.dr_policy = td->td_cpuset->cs_domain; - epoch_thread_init(td); prison0_init(); p->p_peers = 0; p->p_leader = p; Modified: head/sys/kern/kern_thread.c ============================================================================== --- head/sys/kern/kern_thread.c Mon Oct 21 18:17:03 2019 (r353868) +++ head/sys/kern/kern_thread.c Mon Oct 21 18:19:32 2019 (r353869) @@ -273,7 +273,6 @@ thread_init(void *mem, int size, int flags) td->td_rlqe = NULL; EVENTHANDLER_DIRECT_INVOKE(thread_init, td); umtx_thread_init(td); - epoch_thread_init(td); td->td_kstack = 0; td->td_sel = NULL; return (0); @@ -293,7 +292,6 @@ thread_fini(void *mem, int size) turnstile_free(td->td_turnstile); sleepq_free(td->td_sleepqueue); umtx_thread_fini(td); - epoch_thread_fini(td); seltdfini(td); } Modified: head/sys/kern/subr_epoch.c ============================================================================== --- head/sys/kern/subr_epoch.c Mon Oct 21 18:17:03 2019 (r353868) +++ head/sys/kern/subr_epoch.c Mon Oct 21 18:19:32 2019 (r353869) @@ -842,17 +842,3 @@ epoch_drain_callbacks(epoch_t epoch) PICKUP_GIANT(); } - -void -epoch_thread_init(struct thread *td) -{ - - td->td_et = malloc(sizeof(struct epoch_tracker), M_EPOCH, M_WAITOK); -} - -void -epoch_thread_fini(struct thread *td) -{ - - free(td->td_et, M_EPOCH); -} Modified: head/sys/sys/epoch.h ============================================================================== --- head/sys/sys/epoch.h Mon Oct 21 18:17:03 2019 (r353868) +++ head/sys/sys/epoch.h Mon Oct 21 18:19:32 2019 (r353869) @@ -93,8 +93,5 @@ void epoch_trace_list(struct thread *); void epoch_enter(epoch_t epoch); void epoch_exit(epoch_t epoch); -void epoch_thread_init(struct thread *); -void epoch_thread_fini(struct thread *); - #endif /* _KERNEL */ #endif /* _SYS_EPOCH_H_ */ Modified: head/sys/sys/proc.h ============================================================================== --- head/sys/sys/proc.h Mon Oct 21 18:17:03 2019 (r353868) +++ head/sys/sys/proc.h Mon Oct 21 18:19:32 2019 (r353869) @@ -365,7 +365,6 @@ struct thread { int td_lastcpu; /* (t) Last cpu we were on. */ int td_oncpu; /* (t) Which cpu we are on. */ 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;