On Thu, Oct 19, 2017 at 03:14:07PM +0200, Christoph Hellwig wrote: > On Thu, Oct 19, 2017 at 07:38:48AM -0400, Brian Foster wrote: > > On Thu, Oct 19, 2017 at 09:47:05AM +0200, Christoph Hellwig wrote: > > > Apparently our current rwsem code doesn't like doing the trylock, then > > > lock for real scheme. So change our read/write methods to just do the > > > trylock for the RWF_NOWAIT case. This fixes a ~25% regression in > > > AIM7. > > > > > > > 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? --D > -- > To unsubscribe from this list: send the line "unsubscribe linux-xfs" in > the body of a message to majordomo@xxxxxxxxxxxxxxx > More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line "unsubscribe linux-xfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html