From: Peter Hurley Date: Sat, 17 Oct 2015 20:36:24 +0000 (-0400) Subject: tty: Use unbound workqueue for all input workers X-Git-Tag: KARO-TX6UL-2015-11-03~37^2 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=e052c6d15c61cc4caff2f06cbca72b183da9f15e;p=karo-tx-linux.git tty: Use unbound workqueue for all input workers The commonly accepted wisdom that scheduling work on the same cpu that handled interrupt i/o benefits from cache-locality is only true if the cpu is idle (since bound kworkers are often the highest vruntime and thus the lowest priority). Measurements of scheduling via the unbound queue show lowered worst-case latency responses of up to 5x over bound workqueue, without increase in average latency or throughput. pty i/o test measurements show >3x (!) reduced total running time; tests previously taking ~8s now complete in <2.5s. Signed-off-by: Peter Hurley Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/tty/tty_buffer.c b/drivers/tty/tty_buffer.c index 7cc16db37e0e..9a479e61791a 100644 --- a/drivers/tty/tty_buffer.c +++ b/drivers/tty/tty_buffer.c @@ -403,7 +403,7 @@ void tty_schedule_flip(struct tty_port *port) * flush_to_ldisc() sees buffer data. */ smp_store_release(&buf->tail->commit, buf->tail->used); - schedule_work(&buf->work); + queue_work(system_unbound_wq, &buf->work); } EXPORT_SYMBOL(tty_schedule_flip);