From owner-svn-src-head@freebsd.org Tue Aug 21 03:33:56 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E0A3A10878BA; Tue, 21 Aug 2018 03:33:55 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 977B37068E; Tue, 21 Aug 2018 03:33:55 +0000 (UTC) (envelope-from mmacy@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 79FCD1E9D0; Tue, 21 Aug 2018 03:33:55 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7L3XtWi029587; Tue, 21 Aug 2018 03:33:55 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7L3XtvQ029585; Tue, 21 Aug 2018 03:33:55 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <201808210333.w7L3XtvQ029585@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Tue, 21 Aug 2018 03:33:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338127 - head/sys/sys X-SVN-Group: head X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: head/sys/sys X-SVN-Commit-Revision: 338127 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.27 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: Tue, 21 Aug 2018 03:33:56 -0000 Author: mmacy Date: Tue Aug 21 03:33:54 2018 New Revision: 338127 URL: https://svnweb.freebsd.org/changeset/base/338127 Log: Make epoch KBI consistent between INVARIANTS and non-INVARIANTS move extra fields under EPOCH_TRACKER_DEBUG Reported by: hps Modified: head/sys/sys/epoch.h head/sys/sys/epoch_private.h Modified: head/sys/sys/epoch.h ============================================================================== --- head/sys/sys/epoch.h Tue Aug 21 02:38:07 2018 (r338126) +++ head/sys/sys/epoch.h Tue Aug 21 03:33:54 2018 (r338127) @@ -52,7 +52,7 @@ typedef struct epoch_context *epoch_context_t; struct epoch_tracker { void *datap[3]; -#ifdef INVARIANTS +#ifdef EPOCH_TRACKER_DEBUG int datai[5]; #else int datai[1]; Modified: head/sys/sys/epoch_private.h ============================================================================== --- head/sys/sys/epoch_private.h Tue Aug 21 02:38:07 2018 (r338126) +++ head/sys/sys/epoch_private.h Tue Aug 21 03:33:54 2018 (r338127) @@ -76,13 +76,13 @@ critical_exit_sa(void *tdarg) } typedef struct epoch_thread { -#ifdef INVARIANTS +#ifdef EPOCH_TRACKER_DEBUG uint64_t et_magic_pre; #endif TAILQ_ENTRY(epoch_thread) et_link; /* Epoch queue. */ struct thread *et_td; /* pointer to thread in section */ ck_epoch_section_t et_section; /* epoch section object */ -#ifdef INVARIANTS +#ifdef EPOCH_TRACKER_DEBUG uint64_t et_magic_post; #endif } *epoch_thread_t; @@ -124,8 +124,8 @@ epoch_enter_preempt(epoch_t epoch, epoch_tracker_t et) MPASS(cold || epoch != NULL); INIT_CHECK(epoch); etd = (void *)et; -#ifdef INVARIANTS MPASS(epoch->e_flags & EPOCH_PREEMPT); +#ifdef EPOCH_TRACKER_DEBUG etd->et_magic_pre = EPOCH_MAGIC0; etd->et_magic_post = EPOCH_MAGIC1; #endif @@ -174,15 +174,15 @@ epoch_exit_preempt(epoch_t epoch, epoch_tracker_t et) er = epoch_currecord(epoch); MPASS(epoch->e_flags & EPOCH_PREEMPT); etd = (void *)et; -#ifdef INVARIANTS MPASS(etd != NULL); MPASS(etd->et_td == (struct thread *)td); +#ifdef EPOCH_TRACKER_DEBUG MPASS(etd->et_magic_pre == EPOCH_MAGIC0); MPASS(etd->et_magic_post == EPOCH_MAGIC1); etd->et_magic_pre = 0; etd->et_magic_post = 0; - etd->et_td = (void*)0xDEADBEEF; #endif + etd->et_td = (void*)0xDEADBEEF; ck_epoch_end(&er->er_record, (ck_epoch_section_t *)&etd->et_section); TAILQ_REMOVE(&er->er_tdlist, etd, et_link);