lkml.org 
[lkml]   [2015]   [Jun]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC][PATCH] fs: optimize inotify/fsnotify code for unwatched files
On 06/22/2015 05:26 PM, Paul E. McKenney wrote:
> OK, here is an experimental patch that provides a fast-readers variant
> of RCU, forward-ported from v3.3. Because we didn't have call_srcu()
> and srcu_barrier() back then, it is not a drop-in replacement for SRCU,
> so you need to adapt the code to the API, which means putting an "fr"
> in front of the "srcu" in the API members.
>
> Understood on the overhead of the memory-barrier instruction showing
> up consistently. My point was instead that getting rid of this
> memory-barrier instruction does not come for free, as it greatly
> increases the latency of synchronize_frsrcu(). In a real workload,
> it is entirely possible that the savings from eliminating the memory
> barrier are overwhelmed by the increased grace-period latency.
>
> Anyway, the patch is below. Very lightly tested.

This does give a very similar performance boost as the other
optimization I posted. I measured this patch to boost the writes/second
by 11.0% while my previous optimization did 10.8%.

I don't think this workload will see any of the overhead of the
synchronize_frsrcu(), though, but this helps confirm the source of the
overhead.


\
 
 \ /
  Last update: 2015-06-24 19:01    [W:0.064 / U:0.980 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site