Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 Jan 2006 17:31:19 +0100
From:      rookie <asmrookie@gmail.com>
To:        Daniel Eischen <deischen@freebsd.org>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: How priority propagation works on read/write lock?
Message-ID:  <3bbf2fe10601180831r69dbf1f9j@mail.gmail.com>
In-Reply-To: <Pine.GSO.4.43.0601181100511.18649-100000@sea.ntplx.net>
References:  <3bbf2fe10601180715k25297666y@mail.gmail.com> <Pine.GSO.4.43.0601181100511.18649-100000@sea.ntplx.net>

next in thread | previous in thread | raw e-mail | index | archive | help
2006/1/18, Daniel Eischen <deischen@freebsd.org>:
> I assume we already know how to propagate priority for mutexes, so
> once you know how to propagate for RWlocks, it all just works.
As I can see, propagate priority for mutex needs a little modify to
turnstiles code, that's not a great deal.

> Yes, once you choose a thread to propagate, you have to keep
> propagating through whatever it is blocked on or until you
> reach a point where the propagated priority is <=3D the priority
> of the next thread in the heirarchy.  I never questioned that
> part of it, just the need to do it for all threads owning the
> RW lock at the same time.
Maybe it's not "strictly" necessary but please consider that "blocking
hierarchies" are never too long and a total priority propagation would be
quicker (you however need to propagate to every owner in the end so doing i=
t
at the same time could craft a bottleneck if the hierarchy is too long, but
it's a rare case and in the opposite way you need to rule 'what thread need=
s
to be update' every time a blocking thread is unblocked).

Cheers,
Attilio

--
Peace can only be achieved by understanding - A. Einstein



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3bbf2fe10601180831r69dbf1f9j>