lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20190311092420.7f57b8e4e3420de225213367@gmail.com>
Date:   Mon, 11 Mar 2019 09:24:20 +0100
From:   Alexander Sverdlin <alexander.sverdlin@...il.com>
To:     Oleksij Rempel <o.rempel@...gutronix.de>
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Jiri Slaby <jslaby@...e.com>,
        Pengutronix Kernel Team <kernel@...gutronix.de>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v1 3/3] drivers/tty: increase priority for
 tty_buffer_worker

Hello Oleksij,

On Thu, 10 Jan 2019 11:12:32 +0100
Oleksij Rempel <o.rempel@...gutronix.de> wrote:

> sched_priority = 1 is enough to dramatically reduce latency
> on have system load produced by tasks with default user space prio.
> 
> Signed-off-by: Oleksij Rempel <o.rempel@...gutronix.de>

Tested-by: Alexander Sverdlin <alexander.sverdlin@...il.com>

> ---
>  drivers/tty/tty_buffer.c | 12 +++++++++++-
>  1 file changed, 11 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/tty/tty_buffer.c b/drivers/tty/tty_buffer.c
> index 18bd7f48a319..7cf42f6570a0 100644
> --- a/drivers/tty/tty_buffer.c
> +++ b/drivers/tty/tty_buffer.c
> @@ -13,11 +13,13 @@
>  #include <linux/string.h>
>  #include <linux/slab.h>
>  #include <linux/sched.h>
> +#include <linux/sched/rt.h>
>  #include <linux/wait.h>
>  #include <linux/bitops.h>
>  #include <linux/delay.h>
>  #include <linux/module.h>
>  #include <linux/ratelimit.h>
> +#include <uapi/linux/sched/types.h>
>  
>  
>  #define MIN_TTYB_SIZE	256
> @@ -567,7 +569,15 @@ bool tty_buffer_queue_work(struct tty_port *port)
>  
>  void tty_buffer_init_kthread(void)
>  {
> -	kthread_run(kthread_worker_fn, &tty_buffer_worker, "tty");
> +	struct sched_param param = { .sched_priority = 1 };
> +	struct task_struct *kworker_task;
> +
> +	kworker_task = kthread_run(kthread_worker_fn, &tty_buffer_worker, "tty");
> +	if (IS_ERR(kworker_task)) {
> +		pr_err("failed to create message pump task\n");
> +		return;
> +	}
> +	sched_setscheduler(kworker_task, SCHED_FIFO, &param);
>  }
>  
>  /**


-- 
Alexander Sverdlin.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ