linux-embedded.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Haws <Jonathan.Haws@sdl.usu.edu>
To: "kevin.dankwardt@gmail.com" <kevin.dankwardt@gmail.com>
Cc: "linux-embedded@vger.kernel.org" <linux-embedded@vger.kernel.org>
Subject: Re: POSIX Message Queue Priority Scheduling
Date: Tue, 31 Oct 2017 16:49:32 +0000	[thread overview]
Message-ID: <1509468572.9813.9.camel@sdl.usu.edu> (raw)
In-Reply-To: <CAJUC52E3gsjSzdkvJD+gL8WSp93ZtabhShX_BHBZJRLDYWZbAg@mail.gmail.com>


You're right about that - but my thread priorities are set such that I
have one thread at priority 25, one at 30, one at 35, etc.  Each of
those ends up blocking on the mq_send at the same time.  When space
becomes available in the queue, I would expect the thread with the
highest priority to wake up and post its message.  The priority of the
message posted simply matched the priority of the thread posting so
that I could tell who posted.

I'm seeing that the thread who blocks first wakes up first, even if
they have a lower priority.  This is not as expected - I expect the
threads to wake in priority order, but that doesn't seem to be the
case.

Would it help if I sent over my test application?

  parent reply	other threads:[~2017-10-31 16:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-31 15:32 POSIX Message Queue Priority Scheduling Jonathan Haws
     [not found] ` <CAJUC52E3gsjSzdkvJD+gL8WSp93ZtabhShX_BHBZJRLDYWZbAg@mail.gmail.com>
2017-10-31 16:49   ` Jonathan Haws [this message]
2017-11-10  2:34   ` Jonathan Haws
     [not found]     ` <5C01B066-EEC2-4D24-B9E6-D6E6AF8BF212@gmail.com>
     [not found]       ` <1510281787.2403.14.camel@sdl.usu.edu>
     [not found]         ` <E100FFF7-7D54-4296-83CF-0950BEE222DB@gmail.com>
     [not found]           ` <1510283635.2403.18.camel@sdl.usu.edu>
     [not found]             ` <CAJUC52HYx1pWt9iHFN6Lc0-SB6wA2zBxX9nQYxzPh+R7tqdVgw@mail.gmail.com>
2017-11-10 19:04               ` Jonathan Haws
2017-11-14 23:29                 ` Jonathan Haws

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=1509468572.9813.9.camel@sdl.usu.edu \
    --to=jonathan.haws@sdl.usu.edu \
    --cc=kevin.dankwardt@gmail.com \
    --cc=linux-embedded@vger.kernel.org \
    /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).