From: Tejun Heo <tj@kernel.org>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Petr Mladek <pmladek@suse.com>,
Rusty Russell <rusty@rustcorp.com.au>,
Jeff Epler <jepler@unpythonic.net>, Jiri Kosina <jkosina@suse.cz>,
virtualization@lists.linux-foundation.org,
linux-kernel@vger.kernel.org, Petr Mladek <pmladek@suse.cz>
Subject: Re: [PATCH v4 2/2] virtio_balloon: Use a workqueue instead of "vballoon" kthread
Date: Sun, 3 Jan 2016 08:58:39 -0500 [thread overview]
Message-ID: <20160103135839.GF3660@htj.duckdns.org> (raw)
In-Reply-To: <20160102213603.GA1703@redhat.com>
Hello, Michael.
On Sat, Jan 02, 2016 at 11:36:03PM +0200, Michael S. Tsirkin wrote:
> > Why so? As long as the maximum concurrently used workers are not
> > high, 1/5 second or even a lot longer sleeps are completely fine.
>
> I always thought the right way to defer executing a work queue item
> is to queue delayed work, not sleep + queue work.
That works too and is preferable if there are gonna be a lot of work
items sleeping but it isn't different from any other blocking.
> Doing a sleep ties up one thread for 1/5 of a second, does it not?
It does.
> If so, as long as it's the only driver doing this, we'll be fine,
> but if many others copy this pattern, things will
> start to break, will they not?
The maximum concurrency on the system_wq is 256 which is pretty high,
so for most use cases, it's fine. If high concurrency is expected,
it's better to break it out to a separate workqueue.
Thanks.
--
tejun
next prev parent reply other threads:[~2016-01-03 13:58 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-04 13:37 [PATCH v4 0/2] virtio_balloon: Fix restore and convert to workqueue Petr Mladek
2015-12-04 13:37 ` [PATCH v4 1/2] virtio_balloon: Restore the entire balloon after the system freeze Petr Mladek
2016-01-01 10:11 ` Michael S. Tsirkin
2016-01-01 10:11 ` Michael S. Tsirkin
2015-12-04 13:37 ` [PATCH v4 2/2] virtio_balloon: Use a workqueue instead of "vballoon" kthread Petr Mladek
2016-01-01 10:18 ` Michael S. Tsirkin
2016-01-02 11:43 ` Tejun Heo
2016-01-02 21:36 ` Michael S. Tsirkin
2016-01-03 13:58 ` Tejun Heo [this message]
2016-01-05 14:49 ` Petr Mladek
2016-01-05 15:37 ` Michael S. Tsirkin
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=20160103135839.GF3660@htj.duckdns.org \
--to=tj@kernel.org \
--cc=jepler@unpythonic.net \
--cc=jkosina@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=mst@redhat.com \
--cc=pmladek@suse.com \
--cc=pmladek@suse.cz \
--cc=rusty@rustcorp.com.au \
--cc=virtualization@lists.linux-foundation.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
all inboxes | Powered by JetHome®