qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] dma: Avoid reentrancy in DMA transfer handlers
Date: Mon, 31 Oct 2011 17:00:44 +0100	[thread overview]
Message-ID: <4EAEC62C.9000600@redhat.com> (raw)
In-Reply-To: <j8mf6q$2gp$1@dough.gmane.org>

Am 31.10.2011 16:34, schrieb Paolo Bonzini:
> On 10/31/2011 03:46 PM, Kevin Wolf wrote:
>>>  Hmm, I think you should set rearm = 1 to ensure the BH is run when
>>>  ultimately you leave the sync read.  Sorry for not spotting this before.
>>
>> I was about to agree, but in fact adding a rearm = 1; line leads to
>> crashes, whereas in the version I posted it just works. So it looks like
>> something is wrong with doing it, even though it seemed to make perfect
>> sense at the first sight.
> 
> But what will restart the DMA at the end of the synchronous I/O, then?

bdrv_read/write are called inside fdctrl_read_data(), so the outer
DMA_run() already has rearm = 1.

I think the more interesting question is why rescheduling can break
anything. Where would we schedule the BH additionally when it isn't
already scheduled anyway?

Kevin

  reply	other threads:[~2011-10-31 15:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-28 14:18 [Qemu-devel] [PATCH] dma: Avoid reentrancy in DMA transfer handlers Kevin Wolf
2011-10-28 16:35 ` Paolo Bonzini
2011-10-31 14:46   ` Kevin Wolf
2011-10-31 15:34     ` Paolo Bonzini
2011-10-31 16:00       ` Kevin Wolf [this message]
2011-10-31 16:40         ` Kevin Wolf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4EAEC62C.9000600@redhat.com \
    --to=kwolf@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).