public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Waechtler <pwaechtler@mac.com>
To: Krzysztof Benedyczak <golbi@mat.uni.torun.pl>
Cc: Michal Wronski <wrona@mat.uni.torun.pl>,
	linux-kernel@vger.kernel.org, "Gustafson,
	Geoffrey R" <geoffrey.r.gustafson@intel.com>,
	"Abbas, Mohamed" <mohamed.abbas@intel.com>
Subject: Re: [PATCH] unified SysV and POSIX mqueues - complete rewrite
Date: Tue, 19 Nov 2002 17:42:44 +0100	[thread overview]
Message-ID: <3DDA6A04.5A2D60F3@mac.com> (raw)
In-Reply-To: Pine.GSO.4.40.0211191219060.17529-100000@Jan

Krzysztof Benedyczak schrieb:
> 
> Hello,
> 
> After some looking into your code, I think there is a bug.
> Please correct me if I'm wrong.
> 
> The problem occur when awake processes which wait for message (or free
> space). I think that your code will wake them up in random order. POSIX
> says:
> 
> > If more than one thread is waiting to send when space becomes
> > available in the message queue and the Priority Scheduling option is
> > supported, then the thread of the highest priority that has been
> > waiting the longest shall be unblocked to send its message
> 
> I've written a test and it shows that my suspects are rather true?
> 
> BTW: I've had some problems with your patch when linking kernel - in your
> main file were used static functions from msg.c?? Maybe my patch (taken
> from lkml - post date: XI 10) was incomplete? If there is more recent
> version could you inform me? Thanks.
> 

The patch included 2 attachments - one was making the 3 function non static.

SuSv3 - mq_receive:
	If more than one thread is waiting to receive a message when a message
arrives at an empty queue and the Priority Scheduling option is supported, then
the thread of highest priority that has been waiting the longest shall be
selected to receive the message. Otherwise, it is unspecified which waiting
thread receives the message.

--- snip ---

We could implement some kind of priority sorted waitqueue.
I read about some prio aware waitqueue patch (from Ingo Molnar) used
by a NGPT developer for the futexes (I.Gonzalez?)

I thought about some waitqueue in the kernel, that at least put
realtime processes at the front of the waitqueue.

It would be nice to have some generic mechanism in the kernel since
only prio aware message read feature does not buy you much, IMHO

I will look in Ingos folder and also for the patch for the futexes.

  reply	other threads:[~2002-11-19 16:34 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <EDC461A30AC4D511ADE10002A5072CAD04C70992@orsmsx119.jf.intel.com>
2002-11-13 15:10 ` [PATCH] unified SysV and POSIX mqueues - complete rewrite Michal Wronski
2002-11-13 22:25   ` Peter Waechtler
2002-11-19 11:28     ` Krzysztof Benedyczak
2002-11-19 16:42       ` Peter Waechtler [this message]
2002-11-24 11:55   ` Michal Wronski
2002-11-26  9:12     ` Michal Wronski
2002-11-26 11:16       ` Peter Waechtler
2002-11-24 23:05 Peter Waechtler
     [not found] ` <3DE15F9E.A585E26F@digeo.com>
2002-11-25  1:02   ` Peter Waechtler
  -- strict thread matches above, loose matches on Subject: below --
2002-11-19 19:12 Perez-Gonzalez, Inaky
2002-11-10 23:44 Peter Waechtler

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=3DDA6A04.5A2D60F3@mac.com \
    --to=pwaechtler@mac.com \
    --cc=geoffrey.r.gustafson@intel.com \
    --cc=golbi@mat.uni.torun.pl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mohamed.abbas@intel.com \
    --cc=wrona@mat.uni.torun.pl \
    /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