Skip to content

Commit 941ab0b

Browse files
paulmckrcuNeeraj Upadhyay (AMD)
authored andcommitted
rcutorture: Remove support for SRCU-lite
Because SRCU-lite is being replaced by SRCU-fast, this commit removes support for SRCU-lite from rcutorture.c Both SRCU-lite and SRCU-fast provide faster readers by dropping the smp_mb() call from their lock and unlock primitives, but incur a pair of added RCU grace periods during the SRCU grace period. There is a trivial mapping from the SRCU-lite API to that of SRCU-fast, so there should be no transition issues. [ paulmck: Apply Christoph Hellwig feedback. ] Signed-off-by: "Paul E. McKenney" <[email protected]> Signed-off-by: Neeraj Upadhyay (AMD) <[email protected]>
1 parent d08d409 commit 941ab0b

File tree

2 files changed

+1
-8
lines changed

2 files changed

+1
-8
lines changed

include/linux/srcu.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ int init_srcu_struct(struct srcu_struct *ssp);
4949
#define SRCU_READ_FLAVOR_LITE 0x4 // srcu_read_lock_lite().
5050
#define SRCU_READ_FLAVOR_FAST 0x8 // srcu_read_lock_fast().
5151
#define SRCU_READ_FLAVOR_ALL (SRCU_READ_FLAVOR_NORMAL | SRCU_READ_FLAVOR_NMI | \
52-
SRCU_READ_FLAVOR_LITE | SRCU_READ_FLAVOR_FAST) // All of the above.
52+
SRCU_READ_FLAVOR_FAST) // All of the above.
5353
#define SRCU_READ_FLAVOR_SLOWGP (SRCU_READ_FLAVOR_LITE | SRCU_READ_FLAVOR_FAST)
5454
// Flavors requiring synchronize_rcu()
5555
// instead of smp_mb().

kernel/rcu/rcutorture.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -718,11 +718,6 @@ static int srcu_torture_read_lock(void)
718718
WARN_ON_ONCE(idx & ~0x1);
719719
ret += idx << 1;
720720
}
721-
if (reader_flavor & SRCU_READ_FLAVOR_LITE) {
722-
idx = srcu_read_lock_lite(srcu_ctlp);
723-
WARN_ON_ONCE(idx & ~0x1);
724-
ret += idx << 2;
725-
}
726721
if (reader_flavor & SRCU_READ_FLAVOR_FAST) {
727722
scp = srcu_read_lock_fast(srcu_ctlp);
728723
idx = __srcu_ptr_to_ctr(srcu_ctlp, scp);
@@ -756,8 +751,6 @@ static void srcu_torture_read_unlock(int idx)
756751
WARN_ON_ONCE((reader_flavor && (idx & ~reader_flavor)) || (!reader_flavor && (idx & ~0x1)));
757752
if (reader_flavor & SRCU_READ_FLAVOR_FAST)
758753
srcu_read_unlock_fast(srcu_ctlp, __srcu_ctr_to_ptr(srcu_ctlp, (idx & 0x8) >> 3));
759-
if (reader_flavor & SRCU_READ_FLAVOR_LITE)
760-
srcu_read_unlock_lite(srcu_ctlp, (idx & 0x4) >> 2);
761754
if (reader_flavor & SRCU_READ_FLAVOR_NMI)
762755
srcu_read_unlock_nmisafe(srcu_ctlp, (idx & 0x2) >> 1);
763756
if ((reader_flavor & SRCU_READ_FLAVOR_NORMAL) || !(reader_flavor & SRCU_READ_FLAVOR_ALL))

0 commit comments

Comments
 (0)