Re: [LKP] [lkp] [dcache_{readdir, dir_lseek}() users] 4e82901cd6: reaim.jobs_per_min -49.1% regression

From: Al Viro
Date: Thu Jun 02 2016 - 12:30:22 EST

On Thu, Jun 02, 2016 at 02:28:36PM +0800, Huang, Ying wrote:
> "Huang, Ying" <ying.huang@xxxxxxxxx> writes:

> Here is the comparison result with perf profile information. You can
> find it via searching 'perf-profile'.

Looks like this load is hitting the arseloads of contention cases of
spin_lock() on various ->d_lock inside dcache_readdir(). With exclusive
lock on directory most of them end up uncontended...

I'll try to see what can be done there; quite a bit of those are actually
due to moving the cursor on every step. I wonder if we could do the list
traversals with something less drastic - the real contents changes are
prevented by the shared lock on directory being held, after all...

I'll play with that and post when I get somewhere with it...