Messages in this thread | | | Date | Mon, 22 Jun 2015 17:29:59 -0700 | From | "Paul E. McKenney" <> | Subject | Re: [RFC][PATCH] fs: optimize inotify/fsnotify code for unwatched files |
| |
On Mon, Jun 22, 2015 at 08:52:29PM +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. > > So what we have with that percpu-rwsem code that I send out earlier > today is a conditional smp_mb(), and I think we can do the same for > SRCU. > > I'm just not sure !GP is common enough for all SRCU cases to be worth > doing.
Especially given that we don't want the readers to have to acquire a lock in order to get a consistent view of whether or not a grace period is in progress.
> Those that rely on sync_srcu() and who do it rarely would definitely > benefit. The same with those that rarely do call_srcu(). > > But those that heavily use call_srcu() would be better off with the > prolonged GP with 3 sync_sched() calls in.
Those are indeed two likely possibilities. Other possibilities include cases where synchronize_srcu() is invoked rarely, but where its latency is visible to userspace, and those where there really is a need to wait synchronously for a grace period, so that call_srcu() doesn't buy you anything.
Thanx, Paul
-- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in Please read the FAQ at http://www.tux.org/lkml/
| |