[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH RFC 4/5] Introduce iothread-group
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [PATCH RFC 4/5] Introduce iothread-group |
Date: |
Tue, 11 Jul 2017 14:48:29 +0100 |
User-agent: |
Mutt/1.8.0 (2017-02-23) |
On Mon, Jul 10, 2017 at 03:20:26PM +0800, Fam Zheng wrote:
> +static void iothread_group_complete(UserCreatable *obj, Error **errp)
> +{
> + Error *local_err = NULL;
> + IOThreadGroup *group = IOTHREAD_GROUP(obj);
> + char *name, *thread_name;
> + int i;
> +
> + group->ctx = aio_context_new(&local_err);
> + if (!group->ctx) {
> + error_propagate(errp, local_err);
> + return;
> + }
> +
> + aio_context_set_poll_params(group->ctx, group->poll_params,
> + &local_err);
> + if (local_err) {
> + error_propagate(errp, local_err);
> + aio_context_unref(group->ctx);
> + group->ctx = NULL;
> + return;
> + }
> +
> + /* This assumes we are called from a thread with useful CPU affinity for
> us
> + * to inherit.
> + */
> + name = object_get_canonical_path_component(OBJECT(obj));
> + group->iothreads = g_new0(IOThread *, group->size);
> + for (i = 0; i < group->size; ++i) {
group->size > INT_MAX must be rejected. The error message below is
wrong for this property:
if (value < 0) {
error_setg(&local_err, "%s value must be in range [0, %"PRId64"]",
info->name, INT64_MAX);
signature.asc
Description: PGP signature
- [Qemu-devel] [PATCH RFC 0/5] Introduce "-object iothread-group", Fam Zheng, 2017/07/10
- [Qemu-devel] [PATCH RFC 1/5] aio: Wrap poll parameters into AioContextPollParams, Fam Zheng, 2017/07/10
- [Qemu-devel] [PATCH RFC 2/5] iothread: Don't error on windows, Fam Zheng, 2017/07/10
- [Qemu-devel] [PATCH RFC 3/5] iothread: Extract iothread_start, Fam Zheng, 2017/07/10
- [Qemu-devel] [PATCH RFC 4/5] Introduce iothread-group, Fam Zheng, 2017/07/10
- Re: [Qemu-devel] [PATCH RFC 4/5] Introduce iothread-group,
Stefan Hajnoczi <=
- [Qemu-devel] [PATCH RFC 5/5] virtio-blk: Add iothread-group property, Fam Zheng, 2017/07/10
- Re: [Qemu-devel] [PATCH RFC 0/5] Introduce "-object iothread-group", Fam Zheng, 2017/07/10
- Re: [Qemu-devel] [PATCH RFC 0/5] Introduce "-object iothread-group", Stefan Hajnoczi, 2017/07/11
- Re: [Qemu-devel] [PATCH RFC 0/5] Introduce "-object iothread-group", Stefan Hajnoczi, 2017/07/11