Re: [RFC PATCH] asynchronous page fault.

From: Peter Zijlstra
Date: Mon Jan 04 2010 - 11:03:58 EST


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?

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/