From owner-cvs-all Tue Oct 16 11: 0:36 2001 Delivered-To: cvs-all@freebsd.org Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by hub.freebsd.org (Postfix) with ESMTP id 1E17837B40C; Tue, 16 Oct 2001 11:00:27 -0700 (PDT) Received: (from dillon@localhost) by apollo.backplane.com (8.11.6/8.9.1) id f9GI0QP33797; Tue, 16 Oct 2001 11:00:26 -0700 (PDT) (envelope-from dillon) Date: Tue, 16 Oct 2001 11:00:26 -0700 (PDT) From: Matthew Dillon Message-Id: <200110161800.f9GI0QP33797@apollo.backplane.com> To: John Baldwin Cc: Dag-Erling Smorgrav , cvs-all@FreeBSD.org, cvs-committers@FreeBSD.org, Bruce Evans Reply-To: freebsd-hackers@FreeBSD.org Subject: Re: cvs commit: src/sys/vm vnode_pager.c References: Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG :> :> BTW, the profiling data show that mutex debugging actually have very :> little impact - 88% of CPU time is spent in _mtx_unlock_spin_flags(), :> and only 0.6% in witness_unlock() (which _mtx_unlock_spin_flags() :> calls). Witness functions amount to about 3% all told, _mtx_assert() :> accounts for 0.1%. The problem isn't mutex debugging, or mutex :> handling at all - the problem is that ffs_fsync() has an insane amount :> of work to do, most of which is probably bogus. : :How about turning off INVARIANTS and WITNESS and seeing if it does better? :Witness did become more expensive when I made it work for reader/writer locks :on May 4 as it has to manage a list of lock instances instead of embedding the :list inside the lock object itself. : :-- : :John Baldwin -- http://www.FreeBSD.org/~jhb/ (reply-to to hackers) Just calling a mutex function hundreds of thousands of times is going to be enough to cause the problem. I see a way we can fix the problem... the mount point lock is locking the list, so if the information we need to determine whether we have work to do is stored in the vnode itself we can check and loop without having to mess around with any more mutexes. If the flag says that there may be something to do, *then* we do the hard work. -Matt To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message