On Mon, Jun 08, 2015 at 05:54:03PM -0400, Steven Walter wrote: > On Mon, Jun 8, 2015 at 4:10 PM, Peter Hurley <peter@xxxxxxxxxxxxxxxxxx> wrote: > > On 06/08/2015 03:12 PM, Steven Walter wrote: > >> Use kthread_worker instead of workqueues. For now there is only a > >> single workqueue, but the intention is to bring back the "low_latency" > >> tty option, along with a second high-priority kthread worker. > >> --- > >> drivers/tty/tty_buffer.c | 17 +++++++++++------ > >> drivers/tty/tty_io.c | 3 ++- > >> drivers/tty/tty_port.c | 2 +- > >> include/linux/tty.h | 5 +++-- > >> 4 files changed, 17 insertions(+), 10 deletions(-) > >> > >> diff --git a/drivers/tty/tty_buffer.c b/drivers/tty/tty_buffer.c > >> index ed7b5c8..4564202 100644 > >> --- a/drivers/tty/tty_buffer.c > >> +++ b/drivers/tty/tty_buffer.c > >> @@ -3,6 +3,7 @@ > >> */ > >> > >> #include <linux/types.h> > >> +#include <linux/kthread.h> > >> #include <linux/errno.h> > >> #include <linux/tty.h> > >> #include <linux/tty_driver.h> > >> @@ -431,7 +432,7 @@ receive_buf(struct tty_struct *tty, struct tty_buffer *head, int count) > >> * 'consumer' > >> */ > >> > >> -static void flush_to_ldisc(struct work_struct *work) > >> +static void flush_to_ldisc(struct kthread_work *work) > >> { > >> struct tty_port *port = container_of(work, struct tty_port, buf.work); > >> struct tty_bufhead *buf = &port->buf; > >> @@ -520,17 +521,21 @@ EXPORT_SYMBOL(tty_flip_buffer_push); > >> * Must be called before the other tty buffer functions are used. > >> */ > >> > >> +static DEFINE_KTHREAD_WORKER(tty_buffer_worker); > > > > One i/o thread for a server running 5000 containers? > > Nope. > > Are you really concerned that you would need more than one full CPU's > worth of horsepower just to drive the line disciplines? I find > that... surprising. Think of a dial-in gateway computer with hundreds or thousands of modems attached. You just throttled everything through one cpu where before, it was balanced over all of them, thereby making the performance more deterministic as you wanted, but slower, as no one else wanted :) thanks, greg k-h -- To unsubscribe from this list: send the line "unsubscribe linux-serial" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html