From owner-freebsd-arch@FreeBSD.ORG Tue Aug 8 16:24:25 2006 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1D63016A4E0 for ; Tue, 8 Aug 2006 16:24:25 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.235]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6DF2343D55 for ; Tue, 8 Aug 2006 16:24:24 +0000 (GMT) (envelope-from asmrookie@gmail.com) Received: by wx-out-0506.google.com with SMTP id i27so795125wxd for ; Tue, 08 Aug 2006 09:24:23 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=D2n6K2z1fISkOmi+BMdekFeC4mxrtkebEbitsI7xZrRqPcUu0/SP2O3KZpsz0kL3ebg4bVqrfrrReWQSil2wfF+fQlPIBVd8nRanGajUO9PdF1f4CJ2eNeJ9dcopQwpLRIQQ/IYM7DVYvoJSRS8sGQRan1VbIXGjeYmn7irBRjA= Received: by 10.70.8.8 with SMTP id 8mr1036522wxh; Tue, 08 Aug 2006 09:24:23 -0700 (PDT) Received: by 10.70.11.18 with HTTP; Tue, 8 Aug 2006 09:24:23 -0700 (PDT) Message-ID: <3bbf2fe10608080924p1536b4e5s6d3c79be3546aefe@mail.gmail.com> Date: Tue, 8 Aug 2006 18:24:23 +0200 From: "Attilio Rao" Sender: asmrookie@gmail.com To: "Suleiman Souhlal" In-Reply-To: <3bbf2fe10608080908l3c8e7c3aq1e65a610d76d189b@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <3bbf2fe10608071227j17c4cfa6qd84e1d8e53668fda@mail.gmail.com> <44D7B7ED.5070302@FreeBSD.org> <3bbf2fe10608080908l3c8e7c3aq1e65a610d76d189b@mail.gmail.com> X-Google-Sender-Auth: a7b831ac583f3eb9 Cc: freebsd-current@freebsd.org, freebsd-arch@freebsd.org Subject: Re: [PATCH] Adding Solaris-style "owner of records" to rwlocks X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Aug 2006 16:24:25 -0000 2006/8/8, Attilio Rao : > > > > Aren't you missing the hard part: transferring ownership from one reader > > to another? If you don't, you'll still have priority inversions as soon > > as the initial reader unlocks.. > > Exactly, but having a complete owner switching would be: > 1) too hard to achieve in terms of resource taken > 2) will imply too many races and we might get a too hard function > > With this implementation, only the first rlock (for every class > contention) will be penalyzed while the other are treacted as the > easy/hard case. > It doesn't completely solve the priority inversion problem, but it's > the better compromise between performances/correctnes. As addiction, I can say it would be interesting investigate other solutions (i.e: partial readers tracking or full readers tracking) and benchmarking what works in the better way, but here benchmarks would take the biggest part of time. If somebody is interested can drop a mail to me (or to John, if he has time). Attilio -- Peace can only be achieved by understanding - A. Einstein