diff options
author | attilio <attilio@FreeBSD.org> | 2012-12-26 15:20:32 +0000 |
---|---|---|
committer | attilio <attilio@FreeBSD.org> | 2012-12-26 15:20:32 +0000 |
commit | 27fa8d59ff9ba9772b2c8708ac558a08e5514100 (patch) | |
tree | c242ac03727931be33e359ab9b32e5ec7895972f /sys/kern/vfs_subr.c | |
parent | 552f8bf56d449d3e2b995d5c4faf4d45950bd536 (diff) | |
download | FreeBSD-src-27fa8d59ff9ba9772b2c8708ac558a08e5514100.zip FreeBSD-src-27fa8d59ff9ba9772b2c8708ac558a08e5514100.tar.gz |
Fixup r244240: mp_ncpus will be 1 also in the !SMP and smp_disabled=1
case. There is no point in optimizing further the code and use a TRUE
litteral for a path that does heavyweight stuff anyway (like lock acq),
at the price of obfuscated code.
Use the appropriate check where necessary and remove a macro.
Sponsored by: EMC / Isilon storage division
MFC after: 3 days
Diffstat (limited to 'sys/kern/vfs_subr.c')
-rw-r--r-- | sys/kern/vfs_subr.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 683daed..7c243b6 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -4724,12 +4724,6 @@ mnt_vnode_markerfree_active(struct vnode **mvp, struct mount *mp) *mvp = NULL; } -#ifdef SMP -#define ALWAYS_YIELD (mp_ncpus == 1) -#else -#define ALWAYS_YIELD 1 -#endif - static struct vnode * mnt_vnode_next_active(struct vnode **mvp, struct mount *mp) { @@ -4746,7 +4740,7 @@ restart: continue; } if (!VI_TRYLOCK(vp)) { - if (ALWAYS_YIELD || should_yield()) { + if (mp_ncpus == 1 || should_yield()) { TAILQ_INSERT_BEFORE(vp, *mvp, v_actfreelist); mtx_unlock(&vnode_free_list_mtx); kern_yield(PRI_USER); @@ -4777,7 +4771,6 @@ restart: KASSERT((vp->v_iflag & VI_ACTIVE) != 0, ("Non-active vp %p", vp)); return (vp); } -#undef ALWAYS_YIELD struct vnode * __mnt_vnode_next_active(struct vnode **mvp, struct mount *mp) |