From owner-freebsd-hackers@FreeBSD.ORG Wed Jan 18 16:11:14 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5B0A816A41F for ; Wed, 18 Jan 2006 16:11:14 +0000 (GMT) (envelope-from deischen@freebsd.org) Received: from mail.ntplx.net (mail.ntplx.net [204.213.176.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id BBBAA43D46 for ; Wed, 18 Jan 2006 16:11:13 +0000 (GMT) (envelope-from deischen@freebsd.org) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) by mail.ntplx.net (8.13.5/8.13.5/NETPLEX) with ESMTP id k0IGBCmN013419; Wed, 18 Jan 2006 11:11:12 -0500 (EST) Date: Wed, 18 Jan 2006 11:11:09 -0500 (EST) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: rookie@gufi.org In-Reply-To: <3bbf2fe10601180715k25297666y@mail.gmail.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by AMaViS and Clam AntiVirus (mail.ntplx.net) Cc: freebsd-hackers@freebsd.org Subject: Re: How priority propagation works on read/write lock? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Daniel Eischen List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Jan 2006 16:11:14 -0000 On Wed, 18 Jan 2006, rookie wrote: > 2006/1/18, Daniel Eischen : > >You will eventually do priority propagation for all of them > > (A, B, and C) until G's priority is <= the priority of RW1. > > It doesn't matter if you do one at a time or all of them > > at once. They all (A, B, C) have to release RW1 before > > G can run > > You don't point out the problem. > Here the problem is propagating priority to D, {E1, E2, E3} and F. If it > doesn't happen the whole system will starve. I assume we already know how to propagate priority for mutexes, so once you know how to propagate for RWlocks, it all just works. 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 <= 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. -- DE