From owner-svn-src-head@FreeBSD.ORG Wed Dec 26 15:20:33 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8BF1BFFB; Wed, 26 Dec 2012 15:20:33 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 712038FC17; Wed, 26 Dec 2012 15:20:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBQFKX4c090428; Wed, 26 Dec 2012 15:20:33 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBQFKXDM090427; Wed, 26 Dec 2012 15:20:33 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201212261520.qBQFKXDM090427@svn.freebsd.org> From: Attilio Rao Date: Wed, 26 Dec 2012 15:20:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r244706 - head/sys/kern X-SVN-Group: head 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.14 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: Wed, 26 Dec 2012 15:20:33 -0000 Author: attilio Date: Wed Dec 26 15:20:32 2012 New Revision: 244706 URL: http://svnweb.freebsd.org/changeset/base/244706 Log: 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 Modified: head/sys/kern/vfs_subr.c Modified: head/sys/kern/vfs_subr.c ============================================================================== --- head/sys/kern/vfs_subr.c Wed Dec 26 15:13:21 2012 (r244705) +++ head/sys/kern/vfs_subr.c Wed Dec 26 15:20:32 2012 (r244706) @@ -4724,12 +4724,6 @@ mnt_vnode_markerfree_active(struct vnode *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)