Messages in this thread | | | Subject | Re: [RFC PATCH] asynchronous page fault. | From | Peter Zijlstra <> | Date | Mon, 04 Jan 2010 17:02:54 +0100 |
| |
On Mon, 2010-01-04 at 07:55 -0800, Paul E. McKenney wrote: > > Well, I was thinking srcu to have this force quiescent state in > > call_srcu() much like you did for the preemptible rcu. > > Ah, so the idea would be that you register a function with the srcu_struct > that is invoked when some readers are stuck for too long in their SRCU > read-side critical sections? Presumably you also supply a time value for > "too long" as well. Hmmm... What do you do, cancel the corresponding > I/O or something?
Hmm, I was more thinking along the lines of:
say IDX is the current counter idx.
if (pending > thresh) { flush(!IDX) force_flip_counter(); }
Since we explicitly hold a reference on IDX, we can actually wait for ! IDX to reach 0 and flush those callbacks.
We then force-flip the counter, so that even if all callbacks (or the majority) were not for !IDX but part of IDX, we'd be able to flush them on the next call_srcu() because that will then hold a ref on the new counter index.
Or am I missing something obvious?
| |