aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hurley <peter@hurleysoftware.com>2015-10-17 16:36:24 -0400
committerMoyster <oysterized@gmail.com>2019-05-02 16:58:48 +0200
commit5eb74d36b399a14050a108cac44d3046d79e2d59 (patch)
tree3a732cf9087a35c509eda865fe374cf1eb18599b
parentc33a645445449a99675675338d8b41aa2a6d6f44 (diff)
BACKPORT: 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 <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Change-Id: I949ba6dfa56a802bba7c03e7ddbc2bde37b868ba
-rw-r--r--drivers/tty/n_tty.c2
-rw-r--r--drivers/tty/tty_buffer.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/tty/n_tty.c b/drivers/tty/n_tty.c
index db3935bda..2869ab760 100644
--- a/drivers/tty/n_tty.c
+++ b/drivers/tty/n_tty.c
@@ -164,7 +164,7 @@ static void n_tty_set_room(struct tty_struct *tty)
*/
WARN_RATELIMIT(test_bit(TTY_LDISC_HALTED, &tty->flags),
"scheduling buffer work for halted ldisc\n");
- schedule_work(&tty->port->buf.work);
+ queue_work(system_unbound_wq, &tty->port->buf.work);
}
}
diff --git a/drivers/tty/tty_buffer.c b/drivers/tty/tty_buffer.c
index a42a028a9..98351820d 100644
--- a/drivers/tty/tty_buffer.c
+++ b/drivers/tty/tty_buffer.c
@@ -339,7 +339,7 @@ void tty_schedule_flip(struct tty_port *port)
if (buf->tail != NULL)
buf->tail->commit = buf->tail->used;
spin_unlock_irqrestore(&buf->lock, flags);
- schedule_work(&buf->work);
+ queue_work(system_unbound_wq, &buf->work);
}
EXPORT_SYMBOL(tty_schedule_flip);