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] [day] [month] [year] [list]
Date:	Sun, 8 Jun 2014 10:45:13 -0700
From:	Linus Torvalds <torvalds@...ux-foundation.org>
To:	Pavel Machek <pavel@....cz>
Cc:	kernel list <linux-kernel@...r.kernel.org>
Subject: Re: per-thread wait_queue_t

On Sun, Jun 8, 2014 at 4:40 AM, Pavel Machek <pavel@....cz> wrote:
>
> When you proposed to put wait queues into task_struct, you were
> probably looking for less coding and more analysis?

I'm ok with coding, I find your particular patch horrible.

You add a dynamic allocator that will work *horribly* badly if people
actually start using it for more complex cases, and then you use that
for just about the least interesting case. And the way you do the
dynamic allocator, nobody can ever allocate one of the wait-queue
entries *efficiently* by just knowing that they are a leaf and there
is never any recursive allocation.

So quite frankly, I'd add *one* static wait-queue entry, and use it
unconditionally (no "allocation" wrapper) in all the cases where we
see that all that ever happens is

And then I'd make ___wait_event() use that one statically allocated
per-thread wait-queue instead of the current on-stack one.  That would
get a lot of users in one fell swoop. We might have to add some
validation code that the "event" function cannot do anything that can
in turn sleep, but that sounds fairly simple.

See?

           Linus
--
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