All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/6] Lazy workqueues
@ 2009-08-20 10:17 Jens Axboe
  2009-08-20 10:17 ` [PATCH 1/4] direct-io: unify argument passing by adding a dio_args structure Jens Axboe
  0 siblings, 1 reply; 21+ messages in thread
From: Jens Axboe @ 2009-08-20 10:17 UTC (permalink / raw)
  To: linux-kernel; +Cc: jeff, benh, htejun, bzolnier, alan

Hi,

After yesterdays rant on having too many kernel threads and checking
how many I actually have running on this system (531!), I decided to 
try and do something about it.

My goal was to retain the workqueue interface instead of coming up with
a new scheme that required conversion (or converting to slow_work which,
btw, is an awful name :-). I also wanted to retain the affinity
guarantees of workqueues as much as possible.

So this is a first step in that direction, it's probably full of races
and holes, but should get the idea across. It adds a
create_lazy_workqueue() helper, similar to the other variants that we
currently have. A lazy workqueue works like a normal workqueue, except
that it only (by default) starts a core thread instead of threads for
all online CPUs. When work is queued on a lazy workqueue for a CPU
that doesn't have a thread running, it will be placed on the core CPUs
list and that will then create and move the work to the right target.
Should task creation fail, the queued work will be executed on the
core CPU instead. Once a lazy workqueue thread has been idle for a
certain amount of time, it will again exit.

The patch boots here and I exercised the rpciod workqueue and
verified that it gets created, runs on the right CPU, and exits a while
later. So core functionality should be there, even if it has holes.

With this patchset, I am now down to 280 kernel threads on one of my test
boxes. Still too many, but it's a start and a net reduction of 251
threads here, or 47%!

The code can also be pulled from:

  git://git.kernel.dk/linux-2.6-block.git workqueue

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 21+ messages in thread
* [PATCH 0/4] Page based O_DIRECT v2
@ 2009-08-18  8:34 Jens Axboe
  2009-08-18  8:34 ` [PATCH 1/4] direct-io: unify argument passing by adding a dio_args structure Jens Axboe
  0 siblings, 1 reply; 21+ messages in thread
From: Jens Axboe @ 2009-08-18  8:34 UTC (permalink / raw)
  To: linux-kernel; +Cc: zach.brown, hch

Hi,

Updated patchset for page based O_DIRECT. I didn't include the
loop bits this time, lets focus on getting these core bits into
shape and then loop is easily patchable on top of this.

Changes since last post:

- Changed do_dio() to generic_file_direct_IO() as per Christophs
  suggestion.
- Split the first patch into two parts. One simply adds dio_args
  and maintains the current code, the next has the functional change
  but without changing file systems (except NFS).
- Add ->rw to dio_args (Christoph).
- A locking fixup. Not really related, but should be fixed up anyways.

There are at least two pending things to work on:

1) NFS is still broken, I get a crash in freeing some data that
   is not related to the pages. Will debug this.
2) As Christoph suggested, we need some way to wait for a dio
   when all segments are submitted. Currently it waits for each
   segment. Not sure how best to solve this issue, will think a
   bit more about this. Basically we need to pass down the wait
   list to the generic_file_direct_IO() and have that do the
   queue kick and wait.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2009-08-24  8:06 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-20 10:17 [PATCH 0/6] Lazy workqueues Jens Axboe
2009-08-20 10:17 ` [PATCH 1/4] direct-io: unify argument passing by adding a dio_args structure Jens Axboe
2009-08-20 10:17   ` [PATCH 1/6] workqueue: replace singlethread/freezable/rt parameters and variables with flags Jens Axboe
2009-08-20 10:17     ` [PATCH 2/4] direct-io: make O_DIRECT IO path be page based Jens Axboe
2009-08-20 10:17       ` [PATCH 2/6] workqueue: add support for lazy workqueues Jens Axboe
2009-08-20 10:17         ` [PATCH 3/6] crypto: use " Jens Axboe
2009-08-20 10:17           ` [PATCH 3/4] direct-io: add a "IO for kernel" flag to kiocb Jens Axboe
2009-08-20 10:17             ` [PATCH 4/6] libata: use lazy workqueues for the pio task Jens Axboe
2009-08-20 10:17               ` [PATCH 4/5] loop: support O_DIRECT transfer mode Jens Axboe
2009-08-20 10:17                 ` [PATCH 5/6] aio: use lazy workqueues Jens Axboe
2009-08-20 10:17                   ` [PATCH 4/4] direct-io: get rid of irq flag saving where it isn't needed Jens Axboe
2009-08-20 10:17                     ` [PATCH 6/6] sunrpc: use lazy workqueues Jens Axboe
2009-08-21  0:20         ` [PATCH 2/6] workqueue: add support for " Andrew Morton
2009-08-24  8:06           ` Jens Axboe
2009-08-20 13:19       ` [PATCH 2/4] direct-io: make O_DIRECT IO path be page based Trond Myklebust
2009-08-24  7:58         ` Jens Axboe
2009-08-21  0:12       ` Andrew Morton
2009-08-24  8:00         ` Jens Axboe
2009-08-21  0:03   ` [PATCH 1/4] direct-io: unify argument passing by adding a dio_args structure Andrew Morton
2009-08-24  7:58     ` Jens Axboe
  -- strict thread matches above, loose matches on Subject: below --
2009-08-18  8:34 [PATCH 0/4] Page based O_DIRECT v2 Jens Axboe
2009-08-18  8:34 ` [PATCH 1/4] direct-io: unify argument passing by adding a dio_args structure Jens Axboe

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.