From: Bijan Mottahedeh Date: Thu, 9 Jun 2016 19:36:53 +0000 (-0400) Subject: sparc64: Set VDS workqueue max_active argument to 0 X-Git-Tag: v4.1.12-92~74^2~18 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=a1ab61a431c65eddbafc4087a824e01e42689b12;p=users%2Fjedix%2Flinux-maple.git sparc64: Set VDS workqueue max_active argument to 0 Orabug: 23565322 Based on https://www.kernel.org/doc/Documentation/workqueue.txt The recommended value for max_active is 0: max_active: max_active determines the maximum number of execution contexts per CPU which can be assigned to the work items of a wq. For example, with @max_active of 16, at most 16 work items of the wq can be executing at the same time per CPU. Currently, for a bound wq, the maximum limit for @max_active is 512 and the default value used when 0 is specified is 256. For an unbound wq, the limit is higher of 512 and 4 * num_possible_cpus(). These values are chosen sufficiently high such that they are not the limiting factor while providing protection in runaway cases. The number of active work items of a wq is usually regulated by the users of the wq, more specifically, by how many work items the users may queue at the same time. Unless there is a specific need for throttling the number of active work items, specifying '0' is recommended. Signed-off-by: Bijan Mottahedeh Reviewed-by: Liam Merwick Reviewed-by: Alexandre Chartre (cherry picked from commit b584786e611e8e8a28830386e8b3db8874d794c5) (cherry picked from commit f2559a96b70562267f01d5bb62ef44aa9f0c0cd8) Signed-off-by: Allen Pais --- diff --git a/drivers/block/vds/vds_main.c b/drivers/block/vds/vds_main.c index e67553a91475a..9a467acd55290 100644 --- a/drivers/block/vds/vds_main.c +++ b/drivers/block/vds/vds_main.c @@ -56,12 +56,10 @@ MODULE_VERSION(DRV_MOD_VERSION); * conceivably block when the backend is closed. The serialization should * ensure that a following handshake initiates only after the reset is done. * - * XXX The recommended value for the size of the kernel workqueue is 0 but - * that creates threads which scale with ncpu and because of some apparent - * flow control issues cause intermittent scsi timeouts and LDC aborts so - * limit to 1 thread for now. + * The recommended value for the size of the kernel workqueue is 0; + * it creates threads which scale with ncpu. */ -int vds_wq = 1; +int vds_wq; int vds_dbg; int vds_dbg_ldc; int vds_dbg_vio;