Re: [PATCH for-4.14] xfs: fix AIM7 regression

From: Christoph Hellwig
Date: Fri Oct 20 2017 - 02:55:43 EST


On Thu, Oct 19, 2017 at 03:44:31PM -0700, Darrick J. Wong wrote:
> > > The code looks fine, but this seems really strange. If the trylock
> > > fails, then wouldn't the blocking lock have slept anyways if done
> > > initially? Is there any more background info available on this, or
> > > perhaps a theory on why there is such a significant regression..?
> >
> > No, unfortunately I don't have a theory, but I agree it is odd
> > behavior in the rwsem code.
>
> <shrug> I want to know a little more about why there's a performance hit
> in the down_read_trylock -> down_read case. Are we getting penalized
> for that? Is it some weird interaction with lockdep?

I don't think the test bot did run with lockdep. But feel free to take
a look at the mail thread titled

[lkp-robot] [fs] 91f9943e1c: aim7.jobs-per-min -26.6% regression

on lkml. Note that synthetic benchmarks on XFS always saw weird
effects from rwsem details. I remember that a few years ago I had
to back to the mainline patch to move the rwsem fastpath out of line
because thay caused a major performance regressions on CIFS file
serving benchmarks on a very low end ARM NAS box.