From: Muni Sekhar <munisekharrms@gmail.com>
To: "Valdis Klētnieks" <valdis.kletnieks@vt.edu>
Cc: kernelnewbies <kernelnewbies@kernelnewbies.org>
Subject: Re: wait_event()\ wait_event_interruptible()\ wait_event_interruptible_timeout() and wake_up()
Date: Tue, 30 Jul 2019 07:29:36 +0530 [thread overview]
Message-ID: <CAHhAz+ikK+WknFOY1qUTFU-yCEM1m--nbM3w8Xr_Xj0O-puMDA@mail.gmail.com> (raw)
In-Reply-To: <22208.1564424822@turing-police>
On Mon, Jul 29, 2019 at 11:57 PM Valdis Klētnieks
<valdis.kletnieks@vt.edu> wrote:
>
> On Mon, 29 Jul 2019 22:48:57 +0530, Muni Sekhar said:
> > Let us assume that multiple processes are waiting on wait_event()\
> > wait_event_interruptible()\ wait_event_interruptible_timeout(), which
> > process gets woken up on calling wake_up()??
> >
> > I presume wake_up() picks one process, but is there any algorithm to
> > pick which process?
>
> Hint: If you have more than one process waiting, and they do the same thing
> (think multiple copies of the same kthread), it probably doesn't matter.
>
> If they do different things and which one gets picked matters for correctness,
> you're doing it wrong and probably need some locking.
>
> If they do different things and the results will be correct no matter which
> order they're picked, but you want one to go first for latency/througput
> considerations, you have a scheduling/priority issue and probably need to fix
> it using the vast plethora of knobs and tools available for that purpose.
What are those tools? Can you give some more details on how to fix
latency/throughput issues using those tools..
>
--
Thanks,
Sekhar
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
next prev parent reply other threads:[~2019-07-30 2:01 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-29 17:18 wait_event()\ wait_event_interruptible()\ wait_event_interruptible_timeout() and wake_up() Muni Sekhar
2019-07-29 17:28 ` Greg KH
2019-07-29 18:01 ` Bharath Vedartham
2019-07-29 18:07 ` Muni Sekhar
2019-07-29 18:29 ` Valdis Klētnieks
2019-07-29 18:27 ` Valdis Klētnieks
2019-07-30 1:59 ` Muni Sekhar [this message]
2019-08-06 8:45 ` Muni Sekhar
2019-08-06 11:42 ` Valdis Klētnieks
2019-08-06 12:00 ` Muni Sekhar
2019-08-06 12:26 ` Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAHhAz+ikK+WknFOY1qUTFU-yCEM1m--nbM3w8Xr_Xj0O-puMDA@mail.gmail.com \
--to=munisekharrms@gmail.com \
--cc=kernelnewbies@kernelnewbies.org \
--cc=valdis.kletnieks@vt.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).