From: Alexander Ivanov <alexander.ivanov@virtuozzo.com>
To: Andrey Drobyshev <andrey.drobyshev@virtuozzo.com>
Cc: andrey.zhadchenko@virtuozzo.com, svt-core@virtuozzo.com
Subject: Re: [PATCH hci-8.2 v7 6/7] vhost-blk: create kernel threads with the mainstream worker ioctls
Date: Fri, 20 Nov 2026 14:47:17 +0100 [thread overview]
Message-ID: <48f42c3e-016b-41e3-9d40-a025f4cbc1ab@virtuozzo.com> (raw)
In-Reply-To: <179518007188.811238.1438043824245381569.b4-review@b4>
>> + nworkers = MIN(s->conf.num_threads, hdev->nvqs);
>> +
>> + ret = hdev->vhost_ops->vhost_set_fork_from_owner(hdev,
>> + VHOST_FORK_OWNER_TASK);
>> + if (ret < 0 && nworkers > 1) {
>> + error_report("vhost-blk: unable to set vhost_task mode: %s",
>> + strerror(-ret));
>> + return ret;
>> + }
> This look alright. The only real objective I have left is that with
> nworkers=1 VHOST_FORK_OWNER_TASK goes silently. How about smth like:
>
> ret = hdev->vhost_ops->vhost_set_fork_from_owner(hdev, VHOST_FORK_OWNER_TASK);
> if (ret < 0) {
> if (nworkers > 1) {
> error_report("vhost-blk: unable to set vhost_task mode: %s",
> strerror(-ret));
> return ret;
> }
> warn_report_once("vhost-blk: unable to set vhost_task mode, "
> "using a kthread worker: %s", strerror(-ret));
> }
>
> This way we error out on nworkers>1 and leave a warning in the log with
> nworkers=1, but keep working.
>
> What do you think?
Agree, fixed.
>
> Andrey
>
next prev parent reply other threads:[~2026-11-20 13:47 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-20 12:38 [PATCH hci-8.2 v7 0/7] vhost-blk: switch from VHOST_SET_NWORKERS to " Alexander Ivanov
2026-11-20 12:38 ` [PATCH hci-8.2 v7 1/7] vhost-backend: add vhost_set_fork_from_owner op Alexander Ivanov
2026-11-20 12:40 ` no-reply
2026-11-20 12:38 ` [PATCH hci-8.2 v7 2/7] vhost-blk: reject num-queues above VHOST_BLK_MAX_QUEUES Alexander Ivanov
2026-11-20 12:41 ` no-reply
2026-11-20 12:38 ` [PATCH hci-8.2 v7 3/7] vhost-blk: use a local vhost_dev pointer in start and stop Alexander Ivanov
2026-11-20 12:41 ` no-reply
2026-11-20 13:07 ` Andrey Drobyshev
2026-11-20 12:38 ` [PATCH hci-8.2 v7 4/7] vhost-blk: fix vhost_blk_start() returning 0 on failure Alexander Ivanov
2026-11-20 12:42 ` no-reply
2026-11-20 12:38 ` [PATCH hci-8.2 v7 5/7] vhost-blk: reset the owner when vhost_blk_start() fails Alexander Ivanov
2026-11-20 12:42 ` no-reply
2026-11-20 13:07 ` Andrey Drobyshev
2026-11-20 12:38 ` [PATCH hci-8.2 v7 6/7] vhost-blk: create kernel threads with the mainstream worker ioctls Alexander Ivanov
2026-11-20 12:44 ` no-reply
2026-11-20 13:07 ` Andrey Drobyshev
2026-11-20 13:47 ` Alexander Ivanov [this message]
2026-11-20 12:38 ` [PATCH hci-8.2 v7 7/7] linux-headers: drop VHOST_SET_NWORKERS Alexander Ivanov
2026-11-20 12:43 ` no-reply
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=48f42c3e-016b-41e3-9d40-a025f4cbc1ab@virtuozzo.com \
--to=alexander.ivanov@virtuozzo.com \
--cc=andrey.drobyshev@virtuozzo.com \
--cc=andrey.zhadchenko@virtuozzo.com \
--cc=svt-core@virtuozzo.com \
/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.