writeback: expose the bdi_wq workqueue
authorTejun Heo <tj@kernel.org>
Tue, 2 Apr 2013 02:08:06 +0000 (19:08 -0700)
committerTejun Heo <tj@kernel.org>
Tue, 2 Apr 2013 02:08:06 +0000 (19:08 -0700)
There are cases where userland wants to tweak the priority and
affinity of writeback flushers.  Expose bdi_wq to userland by setting
WQ_SYSFS.  It appears under /sys/bus/workqueue/devices/writeback/ and
allows adjusting maximum concurrency level, cpumask and nice level.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Fengguang Wu <fengguang.wu@intel.com>
Cc: Jeff Moyer <jmoyer@redhat.com>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
mm/backing-dev.c

index 2857d4f6bca4b8e278f84ff3b1b0287869c7077c..50251749225885d958a1b531519326bd177ecf2e 100644 (file)
@@ -259,7 +259,7 @@ static int __init default_bdi_init(void)
        int err;
 
        bdi_wq = alloc_workqueue("writeback", WQ_MEM_RECLAIM | WQ_FREEZABLE |
-                                             WQ_UNBOUND, 0);
+                                             WQ_UNBOUND | WQ_SYSFS, 0);
        if (!bdi_wq)
                return -ENOMEM;