Re: [PATCH] mem_event: use wait queue when ring is full

Adin Scannell
Thu, 12 Jan 2012 17:50:41 -0000

On Thu, Jan 12, 2012 at 11:11 AM, Andres Lagar-Cavilla
<andres@lagarcavilla.org> wrote:
>>> What we did is take this patch, amalgamate it with some bits from
our
>>> ring
>>> management approach. We''re ready to submit that, along
with a
>>> description
>>> of how we test it. It works for us, and it involves wait
queue''s for
>>> corner cases.
>>
>> Now if the patch you just sent out uses wait queues as well, and using
>> wait queues causes sudden host reboots for reasons not yet known, how
is
>> your patch any better other that the reboots dont appear to happen
>> anymore?

I didn''t spend a lot of time diagnosing exactly what was going wrong
with the patch.  I did have some local patches applied (in the process
of being submitted to the list) and some debug changes to ensure that
the correct code paths were hit, so it''s quite possible that it may
have been my mistake. If so, I apologize. I didn''t want to spend a lot
of time debugging and I''d had a similar experience with waitqueues in
the fall.

As Andres pointed out, we spent time merging our local approach into
your patch and testing that one. As a result of the combination, I
also did a few interface changes to ensure that callers use the
mem_event code correctly (i.e. calls to wake() are handled internally,
rather than relying on callers), and dropped some of the complexity of
accounting separately for foreign mappers.  With the waitqueue
failsafe in place, I don''t think that''s necessary.  Anyways, I
tried
to preserve the spirit of your code, and would love to hear thoughts.

We''ll be doing more testing today to ensure that we''ve
properly
exercised all the different code paths (including wait queues).

Cheers,
-Adin