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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20131124002324.2fe609d6@alan.etchedpixels.co.uk>
Date:	Sun, 24 Nov 2013 00:23:24 +0000
From:	One Thousand Gnomes <gnomes@...rguk.ukuu.org.uk>
To:	Peter Hurley <peter@...leysoftware.com>
Cc:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Jiri Slaby <jslaby@...e.cz>, linux-kernel@...r.kernel.org,
	linux-serial@...r.kernel.org
Subject: Re: [PATCH tty-next 6/7] n_tty: Only perform wakeups for waiters

On Fri, 22 Nov 2013 10:59:24 -0500
Peter Hurley <peter@...leysoftware.com> wrote:

> Only wakeup the _waiting_ reader, polls and/or writer(s).
> 
> Signed-off-by: Peter Hurley <peter@...leysoftware.com>
> ---
>  drivers/tty/n_tty.c | 18 ++++++++++++------
>  1 file changed, 12 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/tty/n_tty.c b/drivers/tty/n_tty.c
> index 8f2356e..aae28a6 100644
> --- a/drivers/tty/n_tty.c
> +++ b/drivers/tty/n_tty.c
> @@ -275,7 +275,8 @@ static void n_tty_check_unthrottle(struct tty_struct *tty)
>  			return;
>  		n_tty_set_room(tty);
>  		n_tty_write_wakeup(tty->link);
> -		wake_up_interruptible_poll(&tty->link->write_wait, POLLOUT);
> +		if (waitqueue_active(&tty->link->write_wait))
> +			wake_up_interruptible_poll(&tty->link->write_wait, POLLOUT);

Does this actually microbenchmark faster ?

Alan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ