From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752656AbbJQUhU (ORCPT ); Sat, 17 Oct 2015 16:37:20 -0400 Received: from mail-qg0-f44.google.com ([209.85.192.44]:34476 "EHLO mail-qg0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751222AbbJQUgs (ORCPT ); Sat, 17 Oct 2015 16:36:48 -0400 From: Peter Hurley To: Greg Kroah-Hartman Cc: Jiri Slaby , linux-kernel@vger.kernel.org, Peter Hurley Subject: [PATCH 2/2] tty: Use unbound workqueue for all input workers Date: Sat, 17 Oct 2015 16:36:24 -0400 Message-Id: <1445114184-4022-2-git-send-email-peter@hurleysoftware.com> X-Mailer: git-send-email 2.6.1 In-Reply-To: <1445114184-4022-1-git-send-email-peter@hurleysoftware.com> References: <1445114184-4022-1-git-send-email-peter@hurleysoftware.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- drivers/tty/tty_buffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/tty_buffer.c b/drivers/tty/tty_buffer.c index 7cc16db..9a479e6 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); -- 2.6.1