lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 07 Sep 2006 18:30:13 +0900 (JST)
From:	Atsushi Nemoto <nemoto@...hiba-tops.co.jp>
To:	jakub@...hat.com
Cc:	sebastien.dugue@...l.net, arjan@...radead.org, mingo@...hat.com,
	linux-kernel@...r.kernel.org, pierre.peiffer@...l.net,
	drepper@...hat.com
Subject: Re: NPTL mutex and the scheduling priority

On Thu, 7 Sep 2006 04:32:44 -0400, Jakub Jelinek <jakub@...hat.com> wrote:
> > But pthread_cond_signal and sem_post still wakeup a thread in FIFO
> > order, as you can guess.
> > 
> > With the plist patch (applied by hand), I can get desired behavior.
> > Thank you.  But It seems the patch lacks reordering on priority
> > changes.
> 
> Yes, either something like the plist patch for FUTEX_WAKE etc. or, if that
> proves to be too slow for the usual case (non-RT threads), FIFO wakeup
> initially and conversion to plist wakeup whenever first waiter with realtime
> priority is added, is still needed.  That will cure e.g. non-PI
> pthread_mutex_unlock and sem_post.  For pthread_cond_{signal,broadcast} we
> need further kernel changes, so that the condvar's internal lock can be
> always a PI lock.

Thank you, I'll stay tuned.

> > <off_topic>
> > BTW, If I tried to create a PI mutex on a kernel without PI futex
> > support, pthread_mutexattr_setprotocol(PTHREAD_PRIO_INHERIT) returned
> > 0 and pthread_mutex_init() returned ENOTSUP.  This is not a right
> > behavior according to the manual ...
> > </off_topic>
> 
> Why?
> POSIX doesn't forbid ENOTSUP in pthread_mutex_init to my knowledge.

http://www.opengroup.org/onlinepubs/009695399/functions/pthread_mutexattr_setprotocol.html
http://www.opengroup.org/onlinepubs/009695399/functions/pthread_mutex_init.html

>From ERRORS section of pthread_mutexattr_setprotocol:

	The pthread_mutexattr_setprotocol() function shall fail if:
	[ENOTSUP]
	    The value specified by protocol is an unsupported value. 

And ENOTSUP is not enumerated in ERRORS section of pthread_mutex_init.

---
Atsushi Nemoto
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ