Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1675194

Re: [PATCH] firmware: wake all waiters

From Linus Torvalds <torvalds@linux-foundation.org>
Newsgroups linux.kernel
Subject Re: [PATCH] firmware: wake all waiters
Date 2017-06-27 01:50 +0200
Message-ID <tWLVv-AA-5@gated-at.bofh.it> (permalink)
References <tVGlc-9V-17@gated-at.bofh.it> <tWK3n-7Ki-5@gated-at.bofh.it> <tWLLQ-wL-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon, Jun 26, 2017 at 4:30 PM, Luis R. Rodriguez <mcgrof@kernel.org> wrote:
>
> On Mon, Jun 26, 2017 at 02:44:17PM -0700, Linus Torvalds wrote:
> >
> > Among all the simplifications it has is exactly the fact that it wakes
> > up only one thing, because it is *so* specialized.
>
> Not sure I follow, it can wake up all items in queue with swake_up_all(), no?

You can, yes.

But it's like using assembly language to build a compiler. Sure, it's
possible, but it's the wrong thing to do.

The thing should just use regular wait/wakeup, which has sane
*default* behavior that people are used to.

> If indeed it cannot queue and wake all then surely this is buggered!

It's not that it cannot, but that it's much more limited than all our
normal waiting support (and it's *meant* for much more limited
situations).

For example, our regular waiting code can handle not just "wake up
one" and "wake up all", it can handle "wake up <n> exclusive waiters,
and whoever isn't exclusive".

And by default, normal wait queues just do the right thing, so you
don't have to specify the exact details of the behavior.

Sure, the firmware loader code doesn't _need_ that, but there also
isn't one of the users who really needs the very limited interface
that has odd semantics and odd default behavior that will trip you up.

The swait interface is so special and so undocumented, that I really
didn't expect anybody to even know about it unless they had very
specific needs, much less use it.

             Linus

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] firmware: wake all waiters Jakub Kicinski <jakub.kicinski@netronome.com> - 2017-06-24 01:40 +0200
  Re: [PATCH] firmware: wake all waiters "Luis R. Rodriguez" <mcgrof@kernel.org> - 2017-06-26 23:30 +0200
    Re: [PATCH] firmware: wake all waiters "Luis R. Rodriguez" <mcgrof@kernel.org> - 2017-06-27 01:50 +0200
    Re: [PATCH] firmware: wake all waiters Jakub Kicinski <jakub.kicinski@netronome.com> - 2017-06-27 04:20 +0200
      Re: [PATCH] firmware: wake all waiters "Luis R. Rodriguez" <mcgrof@kernel.org> - 2017-06-27 18:40 +0200
        Re: [PATCH] firmware: wake all waiters Jakub Kicinski <jakub.kicinski@netronome.com> - 2017-06-27 23:30 +0200
          Re: [PATCH] firmware: wake all waiters "Luis R. Rodriguez" <mcgrof@kernel.org> - 2017-06-28 00:30 +0200
            Re: [PATCH] firmware: wake all waiters Jakub Kicinski <jakub.kicinski@netronome.com> - 2017-06-28 00:50 +0200
              Re: [PATCH] firmware: wake all waiters "Luis R. Rodriguez" <mcgrof@kernel.org> - 2017-06-28 02:00 +0200
            Re: [systemd-devel] [PATCH] firmware: wake all waiters Lennart Poettering <mzxreary@0pointer.de> - 2017-06-28 09:10 +0200
              Re: [systemd-devel] [PATCH] firmware: wake all waiters "Luis R. Rodriguez" <mcgrof@kernel.org> - 2017-06-28 18:10 +0200
                Re: [systemd-devel] [PATCH] firmware: wake all waiters Lennart Poettering <mzxreary@0pointer.de> - 2017-06-28 20:00 +0200
                Re: [systemd-devel] [PATCH] firmware: wake all waiters "Luis R. Rodriguez" <mcgrof@kernel.org> - 2017-06-28 20:00 +0200
                Re: [systemd-devel] [PATCH] firmware: wake all waiters Daniel Wagner <wagi@monom.org> - 2017-06-29 22:10 +0200
      Re: [PATCH] firmware: wake all waiters Bjorn Andersson <bjorn.andersson@linaro.org> - 2017-06-27 20:00 +0200
        Re: [PATCH] firmware: wake all waiters "Luis R. Rodriguez" <mcgrof@kernel.org> - 2017-06-27 20:10 +0200
          Re: [PATCH] firmware: wake all waiters Bjorn Andersson <bjorn.andersson@linaro.org> - 2017-06-27 21:00 +0200
            Re: [PATCH] firmware: wake all waiters "Luis R. Rodriguez" <mcgrof@kernel.org> - 2017-06-27 21:10 +0200
              Re: [PATCH] firmware: wake all waiters Bjorn Andersson <bjorn.andersson@linaro.org> - 2017-06-27 22:00 +0200
                Re: [PATCH] firmware: wake all waiters "Luis R. Rodriguez" <mcgrof@kernel.org> - 2017-06-27 22:30 +0200
  Re: [PATCH] firmware: wake all waiters Linus Torvalds <torvalds@linux-foundation.org> - 2017-06-26 23:50 +0200
    Re: [PATCH] firmware: wake all waiters "Luis R. Rodriguez" <mcgrof@kernel.org> - 2017-06-27 01:40 +0200
      Re: [PATCH] firmware: wake all waiters Linus Torvalds <torvalds@linux-foundation.org> - 2017-06-27 01:50 +0200
        Re: [PATCH] firmware: wake all waiters "Luis R. Rodriguez" <mcgrof@kernel.org> - 2017-06-27 02:20 +0200
          Re: [PATCH] firmware: wake all waiters Davidlohr Bueso <dave@stgolabs.net> - 2017-06-28 15:50 +0200
            Re: [PATCH] firmware: wake all waiters "Luis R. Rodriguez" <mcgrof@kernel.org> - 2017-06-28 18:00 +0200
              Re: [PATCH] firmware: wake all waiters Davidlohr Bueso <dave@stgolabs.net> - 2017-06-28 21:10 +0200
          Re: [PATCH] firmware: wake all waiters Davidlohr Bueso <dave@stgolabs.net> - 2017-06-29 21:10 +0200
            Re: [PATCH] firmware: wake all waiters "Luis R. Rodriguez" <mcgrof@kernel.org> - 2017-06-29 21:50 +0200
              Re: [PATCH] firmware: wake all waiters Davidlohr Bueso <dave@stgolabs.net> - 2017-06-30 18:40 +0200

csiph-web