Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 7 Mar 2022 15:47:45 GMT
From:      Mark Johnston <markj@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: ea683b4bae98 - stable/12 - rmlock: Temporarily revert commit c84bb8cd771c
Message-ID:  <202203071547.227Fljic049464@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/12 has been updated by markj:

URL: https://cgit.FreeBSD.org/src/commit/?id=ea683b4bae98f17dd978fbafc734d8eb1dfd66dc

commit ea683b4bae98f17dd978fbafc734d8eb1dfd66dc
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2022-03-07 15:35:59 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2022-03-07 15:47:38 +0000

    rmlock: Temporarily revert commit c84bb8cd771c
    
    It appears to have introduced a regression on arm64, possibly due to the
    fact that the pcpu pointer is reloaded outside of the critical section
    in _rm_rlock().  Until this is resolved one way or another, let's
    revert.
    
    Reported by:    Ronald Klop <ronald-lists@klop.ws>
    Sponsored by:   The FreeBSD Foundation
    
    (cherry picked from commit afb44cb01018eb1363cb4ee20a31534b844d00f7)
---
 sys/kern/kern_rmlock.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sys/kern/kern_rmlock.c b/sys/kern/kern_rmlock.c
index 45290ac5d562..c51c99e6eb3a 100644
--- a/sys/kern/kern_rmlock.c
+++ b/sys/kern/kern_rmlock.c
@@ -451,7 +451,7 @@ _rm_rlock(struct rmlock *rm, struct rm_priotracker *tracker, int trylock)
 
 	__compiler_membar();
 
-	pc = get_pcpu();
+	pc = cpuid_to_pcpu[td->td_oncpu];
 
 	rm_tracker_add(pc, tracker);
 
@@ -516,7 +516,7 @@ _rm_runlock(struct rmlock *rm, struct rm_priotracker *tracker)
 		return;
 
 	td->td_critnest++;	/* critical_enter(); */
-	pc = get_pcpu();
+	pc = cpuid_to_pcpu[td->td_oncpu];
 	rm_tracker_remove(pc, tracker);
 	td->td_critnest--;
 	sched_unpin();



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202203071547.227Fljic049464>