Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 28 Jan 2011 23:45:59 +0100
From:      Ivan Voras <ivoras@freebsd.org>
To:        Gleb Kurtsou <gleb.kurtsou@gmail.com>
Cc:        freebsd-hackers@freebsd.org, Dan Nelson <dnelson@allantgroup.com>
Subject:   Re: Namecache lock contention?
Message-ID:  <AANLkTi=y2xO7guz09Qt_OkBn=xUCf5xB2q7m9bznTXNg@mail.gmail.com>
In-Reply-To: <20110128223703.GA91590@tops.skynet.lt>
References:  <ihuhav$qso$1@dough.gmane.org> <20110128152505.GP75125@dan.emsphone.com> <AANLkTinCbhY5N%2BpuAs9gXT3WOKmPtHCZrb_BwWu__nV6@mail.gmail.com> <20110128211834.GA84881@tops.skynet.lt> <AANLkTi=Rn3ZbEq9cPC42HR5_iQKVMenGz62BLik8vktX@mail.gmail.com> <20110128223703.GA91590@tops.skynet.lt>

next in thread | previous in thread | raw e-mail | index | archive | help
On 28 January 2011 23:37, Gleb Kurtsou <gleb.kurtsou@gmail.com> wrote:

>> * The dtrace output I've send is from around thirty seconds of
>> operation, so around 2000 PHP runs. (PHP in this case is FastCGI, so
>> the processes are persistent instead of constantly respawning). In
>> these 2000 runs there have been around 20,000 rw-block events in
>> cache_lookup - which is strange.

> Are there rename, rmdir calls? - these purge namecache.
> If cache is empty, VOP_LOOKUP acquires write lock to populate the cache.

No, only creates and deletes on files, no directory operations at all.

>> * Here's another dtrace output without rwlock mutex inlining, showing
>> a different picture than what I've earlier thought: most rw-blocks
>> events are in wlock! http://ivoras.net/stuff/rw-block-noinline.txt =C2=
=A0--
>> there are also some blocks without a rwlock function in the trace; I
>> don't understand how rwlock inlining is implemented, maybe the readers
>> are always inlined?
> Add options RWLOCK_NOINLINE, recompiling with -O0 might also be good
> idea.

That's what I meant by "without rwlock mutex inlining". The default
-O2 is enough - aggressive inlining only begins at -O3.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTi=y2xO7guz09Qt_OkBn=xUCf5xB2q7m9bznTXNg>