All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <jens.axboe@oracle.com>
To: Jeff Garzik <jeff@garzik.org>
Cc: linux-kernel@vger.kernel.org, benh@kernel.crashing.org,
	htejun@gmail.com, bzolnier@gmail.com, alan@lxorguk.ukuu.org.uk,
	akpm@linux-foundation.org
Subject: Re: [PATCH 4/7] libata: use lazy workqueues for the pio task
Date: Mon, 24 Aug 2009 20:16:00 +0200	[thread overview]
Message-ID: <20090824181600.GR12579@kernel.dk> (raw)
In-Reply-To: <4A92C500.4030109@garzik.org>

On Mon, Aug 24 2009, Jeff Garzik wrote:
> On 08/24/2009 12:42 PM, Jens Axboe wrote:
>> On Mon, Aug 24 2009, Jeff Garzik wrote:
>>> No objections to the code, operationally...
>>>
>>> But it is disappointing that the "1 thread on UP" problem is not solved
>>> while changing this libata area.  Is there no way to specify a minimum
>>> lazy-thread count?
>>>
>>> A key problem continues to be tying to the number of CPUs, which is
>>> quite inappropriate for libata.
>>
>> We'll solve that next, the first problem is reducing the per-cpu
>> threads. Lots of places use per-cpu workqueues because that is what is
>> available, not necessarily because it's an appropriate choice. Like the
>> ata_wq above, it's not even a good fit.
>
> Agreed + sounds great.
>
> Thanks -- both for hacking libata for this, and more generally, for  
> attacking the too-many-kthreads problem!  :)  It's just sad how many  
> unused workqueue threads hang about, on every modern Linux box.

It is, it's one of those problems that's gotten totally out of hand. A
handful of wasted threads is easily ignored, but once you are safely
into the three digits it's just too much.

I took a quick look at converting libata to slow-work, and it's an easy
fit (and would solve the UP problem too). The remaining piece is a
slow_work_enqueue_delayed(), since we do use pio task queue with a small
delay from one path.

So I hope that we can get by with slow-work with a few tweaks here and
there, and just retain workqueues for the true performance (or
persistent) case. The lazy workqueues is still a nice addition I think,
since they don't hang around forever when things go idle.

-- 
Jens Axboe


  reply	other threads:[~2009-08-24 18:16 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-24  7:56 [PATCH 0/7] Lazy workqueues v2 Jens Axboe
2009-08-24  7:56 ` [PATCH 1/7] workqueue: replace singlethread/freezable/rt parameters and variables with flags Jens Axboe
2009-08-24  7:56 ` [PATCH 2/7] workqueue: add support for lazy workqueues Jens Axboe
2009-08-24  7:56 ` [PATCH 3/7] crypto: use " Jens Axboe
2009-08-24  7:56 ` [PATCH 4/7] libata: use lazy workqueues for the pio task Jens Axboe
2009-08-24 16:32   ` Jeff Garzik
2009-08-24 16:42     ` Jens Axboe
2009-08-24 16:51       ` Jeff Garzik
2009-08-24 18:16         ` Jens Axboe [this message]
2009-08-24 16:45     ` John Stoffel
2009-08-24 16:52       ` Jeff Garzik
2009-08-24  7:56 ` [PATCH 5/7] aio: use lazy workqueues Jens Axboe
2009-08-24  7:56 ` [PATCH 6/7] sunrpc: " Jens Axboe
2009-08-24  7:56 ` [PATCH 7/7] bio: convert integrity to " Jens Axboe

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=20090824181600.GR12579@kernel.dk \
    --to=jens.axboe@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=benh@kernel.crashing.org \
    --cc=bzolnier@gmail.com \
    --cc=htejun@gmail.com \
    --cc=jeff@garzik.org \
    --cc=linux-kernel@vger.kernel.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.