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


Groups > linux.kernel > #1678050

Re: [PATCH 2/4] swait: add the missing killable swaits

From Davidlohr Bueso <dave@stgolabs.net>
Newsgroups linux.kernel
Subject Re: [PATCH 2/4] swait: add the missing killable swaits
Date 2017-06-29 20:40 +0200
Message-ID <tXMwa-2FO-13@gated-at.bofh.it> (permalink)
References (4 earlier) <tXHPP-8aI-21@gated-at.bofh.it> <tXHZw-8dW-9@gated-at.bofh.it> <tXKkF-1nd-3@gated-at.bofh.it> <tXLJL-28r-1@gated-at.bofh.it> <tXLTr-2de-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, 29 Jun 2017, Linus Torvalds wrote:

>So without some very compelling reason, I'd not want to add yet
>another wait-queue.

Yes, I was expecting this and very much agree.

I'll actually take a look at wake_q for wake_up_all() and co. to see if
we can reduce the spinlock hold times. Of course it would only make sense
for more than a one wakeup.

>I actually think swait is pure garbage. Most users only wake up one
>process anyway, and using swait for that is stupid. If you only wake
>up one, you might as well just have a single process pointer, not a
>wait list at all, and then use "wake_up_process()".

But you still need the notion of a queue, even if you wake one task
at a time... I'm probably missing your point here.

>There is *one* single user of swake_up_all(), and that one looks like
>bogus crap also: it does it outside of the spinlock that could have
>been used to protect the queue - p,lus I'm not sure there's really a
>queue anyway, since I think it's just the grace-period kthread that is
>there.

So those cases when there's only one waiter I completely agree should
not be using waitqueues. pcpu-rwsems in the past suffered from this.

Thanks,
Davidlohr

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


Thread

Re: [PATCH 2/4] swait: add the missing killable swaits Greg KH <gregkh@linuxfoundation.org> - 2017-06-29 15:00 +0200
  Re: [PATCH 2/4] swait: add the missing killable swaits Thomas Gleixner <tglx@linutronix.de> - 2017-06-29 15:10 +0200
    Re: [PATCH 2/4] swait: add the missing killable swaits Greg KH <gregkh@linuxfoundation.org> - 2017-06-29 15:40 +0200
      Re: [PATCH 2/4] swait: add the missing killable swaits Thomas Gleixner <tglx@linutronix.de> - 2017-06-29 15:50 +0200
        Re: [PATCH 2/4] swait: add the missing killable swaits Linus Torvalds <torvalds@linux-foundation.org> - 2017-06-29 18:20 +0200
          Re: [PATCH 2/4] swait: add the missing killable swaits "Luis R. Rodriguez" <mcgrof@kernel.org> - 2017-06-29 19:30 +0200
          Re: [PATCH 2/4] swait: add the missing killable swaits Davidlohr Bueso <dave@stgolabs.net> - 2017-06-29 19:50 +0200
            Re: [PATCH 2/4] swait: add the missing killable swaits Linus Torvalds <torvalds@linux-foundation.org> - 2017-06-29 20:00 +0200
              Re: [PATCH 2/4] swait: add the missing killable swaits Davidlohr Bueso <dave@stgolabs.net> - 2017-06-29 20:40 +0200
                Re: [PATCH 2/4] swait: add the missing killable swaits Linus Torvalds <torvalds@linux-foundation.org> - 2017-06-29 21:00 +0200
                Re: [PATCH 2/4] swait: add the missing killable swaits "Luis R. Rodriguez" <mcgrof@kernel.org> - 2017-06-29 21:50 +0200
                Re: [PATCH 2/4] swait: add the missing killable swaits "Luis R. Rodriguez" <mcgrof@kernel.org> - 2017-06-29 21:50 +0200
                Re: [PATCH 2/4] swait: add the missing killable swaits Jakub Kicinski <jakub.kicinski@netronome.com> - 2017-06-29 23:00 +0200
                Re: [PATCH 2/4] swait: add the missing killable swaits Jakub Kicinski <jakub.kicinski@netronome.com> - 2017-06-30 01:00 +0200
                Re: [PATCH 2/4] swait: add the missing killable swaits Jakub Kicinski <jakub.kicinski@netronome.com> - 2017-06-30 01:10 +0200
                Re: [PATCH 2/4] swait: add the missing killable swaits "Luis R. Rodriguez" <mcgrof@kernel.org> - 2017-06-30 01:10 +0200
                Re: [PATCH 2/4] swait: add the missing killable swaits "Luis R. Rodriguez" <mcgrof@kernel.org> - 2017-06-30 01:00 +0200
                Re: [PATCH 2/4] swait: add the missing killable swaits Linus Torvalds <torvalds@linux-foundation.org> - 2017-06-29 23:00 +0200
          Re: [PATCH 2/4] swait: add the missing killable swaits Marcelo Tosatti <mtosatti@redhat.com> - 2017-06-30 04:40 +0200
            Re: [PATCH 2/4] swait: add the missing killable swaits Linus Torvalds <torvalds@linux-foundation.org> - 2017-06-30 06:10 +0200
              Re: [PATCH 2/4] swait: add the missing killable swaits Marcelo Tosatti <mtosatti@redhat.com> - 2017-06-30 14:00 +0200
              Re: [PATCH 2/4] swait: add the missing killable swaits Marcelo Tosatti <mtosatti@redhat.com> - 2017-06-30 14:10 +0200
              Re: [PATCH 2/4] swait: add the missing killable swaits Krister Johansen <kjlx@templeofstupid.com> - 2017-06-30 19:40 +0200

csiph-web