[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC 2/3] rcu: add drain_call_rcu_co() API
From: |
Stefan Hajnoczi |
Subject: |
Re: [RFC 2/3] rcu: add drain_call_rcu_co() API |
Date: |
Tue, 12 Sep 2023 12:52:17 -0400 |
On Tue, 12 Sept 2023 at 12:37, Kevin Wolf <kwolf@redhat.com> wrote:
>
> Am 06.09.2023 um 21:01 hat Stefan Hajnoczi geschrieben:
> > call_drain_rcu() has limitations that make it unsuitable for use in
> > qmp_device_add().
>
> This sounds a bit vague with only alluding to some unnamed limitations.
> I assume that you mean the two points you add to rcu.txt. If so, maybe
> it would be better to add a reference to that in the commit message.
Yes, exactly. I will add a reference to the commit message.
>
> > Introduce a new coroutine version of drain_call_rcu()
> > with the same functionality but that does not drop the BQL. The next
> > patch will use it to fix qmp_device_add().
> >
> > Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
>
> I don't understand the reasoning here. How does yielding from the
> coroutine not effectively release the BQL, too? It's just that you won't
> have explicit code here, but the mainloop will do it for you while
> waiting for new events.
>
> Is this about not dropping the BQL specifically in nested event loops,
> but letting the coroutine wait until we return to the real main loop
> where dropping the BQL is hopefully not a problem?
Yes.
Stefan
- Re: [RFC 1/3] hmp: avoid the nested event loop in handle_hmp_command(), (continued)
- Re: [RFC 1/3] hmp: avoid the nested event loop in handle_hmp_command(), Stefan Hajnoczi, 2023/09/07
- Re: [RFC 1/3] hmp: avoid the nested event loop in handle_hmp_command(), Dr. David Alan Gilbert, 2023/09/07
- Re: [RFC 1/3] hmp: avoid the nested event loop in handle_hmp_command(), Stefan Hajnoczi, 2023/09/07
- Re: [RFC 1/3] hmp: avoid the nested event loop in handle_hmp_command(), Dr. David Alan Gilbert, 2023/09/07
- Re: [RFC 1/3] hmp: avoid the nested event loop in handle_hmp_command(), Stefan Hajnoczi, 2023/09/07
[RFC 3/3] qmp: make qmp_device_add() a coroutine, Stefan Hajnoczi, 2023/09/06
[RFC 2/3] rcu: add drain_call_rcu_co() API, Stefan Hajnoczi, 2023/09/06
Re: [RFC 0/3] qmp: make qmp_device_add() a coroutine, Paolo Bonzini, 2023/09/07