All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Daniel P. Berrange" <berrange@redhat.com>
To: Achilles Benetopoulos <abenetopoulos@gmail.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Make qemu_thread_create return a flag to indicate if it succeeded
Date: Thu, 16 Mar 2017 17:05:40 +0000	[thread overview]
Message-ID: <20170316170540.GE15193@redhat.com> (raw)
In-Reply-To: <8fb8ed45-6de3-2b74-f5ea-44b374cabcbd@gmail.com>

On Thu, Mar 16, 2017 at 06:55:47PM +0200, Achilles Benetopoulos wrote:
> I am interested in working on the BiteSized Task mentioned in the
> subject line. However, I have a question: Since the current behaviour
> of qemu_thread_create is to fail in the case of an error, then it
> seems logical to make the caller exit (in the patched version) if the
> return value of the call to qemu_thread_create indicates an error. Is
> this desirable? If so, how detailed should the error messages reported
> be? If not, then I'm guessing that the desired behaviour is a more
> graceful handling of the error on a case-by-case basis?

I imagine it would be a two stage conversion. First add an 'Error **errp'
parameter ot the qemu_thread_create() API which gets set on failure. Have
all the callers check this error & exit if set. This is the easy bit.

Second stage is to actually make the callers propagate the error back up
their call stack, so we can avoid exiting QEMU entirely in appropriate cases.
This takes a little more investigation to figure out optimal behaviour for
each of the callers

eg, if we tried to add an I/O thread to an existing running guest, we don't
want QEMU to exit. We just want the error reported back up to the monitor
so the mgmt app can handle it.

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://entangle-photo.org       -o-    http://search.cpan.org/~danberr/ :|

      parent reply	other threads:[~2017-03-16 17:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-16 16:55 [Qemu-devel] Make qemu_thread_create return a flag to indicate if it succeeded Achilles Benetopoulos
2017-03-16 17:04 ` Alex Bennée
2017-03-16 19:02   ` Dr. David Alan Gilbert
2017-03-16 17:05 ` Daniel P. Berrange [this message]

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=20170316170540.GE15193@redhat.com \
    --to=berrange@redhat.com \
    --cc=abenetopoulos@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.