lockmgr: remove more remnants of adaptive spinning

Sponsored by:	The FreeBSD Foundation
This commit is contained in:
mjg 2019-12-01 00:35:08 +00:00
parent 621b9ddfd9
commit 080ffac31b
2 changed files with 2 additions and 8 deletions

View File

@ -61,8 +61,6 @@ __FBSDID("$FreeBSD$");
PMC_SOFT_DECLARE( , , lock, failed);
#endif
CTASSERT(((LK_ADAPTIVE | LK_NOSHARE) & LO_CLASSFLAGS) ==
(LK_ADAPTIVE | LK_NOSHARE));
CTASSERT(LK_UNLOCKED == (LK_UNLOCKED &
~(LK_ALL_WAITERS | LK_EXCLUSIVE_SPINNERS)));
@ -136,10 +134,6 @@ LK_CAN_SHARE(uintptr_t x, int flags, bool fp)
#define LK_TRYWIT(x) \
(LK_TRYOP(x) ? LOP_TRYLOCK : 0)
#define LK_CAN_ADAPT(lk, f) \
(((lk)->lock_object.lo_flags & LK_ADAPTIVE) != 0 && \
((f) & LK_SLEEPFAIL) == 0)
#define lockmgr_disowned(lk) \
(((lk)->lk_lock & ~(LK_FLAGMASK & ~LK_SHARE)) == LK_KERNPROC)
@ -453,7 +447,7 @@ lockinit(struct lock *lk, int pri, const char *wmesg, int timo, int flags)
iflags |= LO_IS_VNODE;
if (flags & LK_NEW)
iflags |= LO_NEW;
iflags |= flags & (LK_ADAPTIVE | LK_NOSHARE);
iflags |= flags & LK_NOSHARE;
lock_init(&lk->lock_object, &lock_class_lockmgr, wmesg, NULL, iflags);
lk->lk_lock = LK_UNLOCKED;

View File

@ -150,7 +150,7 @@ _lockmgr_args_rw(struct lock *lk, u_int flags, struct rwlock *ilk,
#define LK_NOSHARE 0x000008
#define LK_NOWITNESS 0x000010
#define LK_QUIET 0x000020
#define LK_ADAPTIVE 0x000040
#define LK_UNUSED0 0x000040 /* Was LK_ADAPTIVE */
#define LK_IS_VNODE 0x000080 /* Tell WITNESS about a VNODE lock */
#define LK_NEW 0x000100