Re: [RFC][PATCH] fs: optimize inotify/fsnotify code for unwatched files

From: Paul E. McKenney
Date: Mon Jun 22 2015 - 12:51:14 EST


On Mon, Jun 22, 2015 at 05:20:13PM +0200, Peter Zijlstra wrote:
> On Mon, Jun 22, 2015 at 08:11:21AM -0700, Paul E. McKenney wrote:
> > That depends on how slow the resulting slow global state would be.
> > We have some use cases (definitely KVM, perhaps also some of the VFS
> > code) that need the current speed, as opposed to the profound slowness
> > that three trips through synchronize_sched() would provide.
>
> But we have call_srcu() these days, not everything needs to use
> sync_srcu() anymore. Although I've not checked recently.

I believe that the KVM guys do need synchronize_srcu(), but yes, there
probably are at least some cases where people might do well to move
from synchronize_srcu() to call_srcu(). That said, the added complexity
might or might not be worthwhile in all cases.

> > Plus we
> > would lose the ability to have SRCU readers on idle and offline CPUs.
>
> Are we actually doing that? offline CPUs in particular seems iffy, I
> don't think we need (or should) worry about that. I know its been an
> issue with regular RCU due to tracing, but I'm not sure we should care
> for it for SRCU.

I believe that there still are some cases. But why would offline
CPUs seem so iffy? CPUs coming up execute code before they are fully
operational, and during that time, much of the kernel views them as
being offline. Yet they do have to execute significant code in order
to get themselves set up.

Thanx, Paul

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
Please read the FAQ at http://www.tux.org/lkml/