[4172] in arla-drinkers
Re: Arla on FreeBSD
daemon@ATHENA.MIT.EDU (Tomas Olsson)
Thu Feb 15 09:56:52 2007
From arla-drinkers-bounces@stacken.kth.se Thu Feb 15 14:56:52 2007
Return-Path: <arla-drinkers-bounces@stacken.kth.se>
Delivered-To: arla-drinkers-mtg@bloom-picayune.mit.edu
Received: (qmail 6776 invoked from network); 15 Feb 2007 14:56:51 -0000
Received: from mx3.kth.se (130.237.48.97)
by charon.mit.edu with SMTP; 15 Feb 2007 14:56:51 -0000
Received: from localhost (localhost.localdomain [127.0.0.1])
by mx3.kth.se (Postfix) with ESMTP id EA59B14071D;
Thu, 15 Feb 2007 15:56:50 +0100 (CET)
Received: from mx3.kth.se ([127.0.0.1])
by localhost (mx3.kth.se [127.0.0.1]) (amavisd-new, port 10024) with LMTP
id 31316-01-70; Thu, 15 Feb 2007 15:56:48 +0100 (CET)
Received: from tapas.stacken.kth.se (tapas.stacken.kth.se [130.237.234.140])
by mx3.kth.se (Postfix) with ESMTP id D2A6914058E;
Thu, 15 Feb 2007 15:56:45 +0100 (CET)
Received: from tapas.stacken.kth.se (localhost [127.0.0.1])
by tapas.stacken.kth.se (Postfix) with ESMTP id 31DA45350F;
Thu, 15 Feb 2007 15:56:45 +0100 (CET)
X-Original-To: arla-drinkers@tapas.stacken.kth.se
Delivered-To: arla-drinkers@tapas.stacken.kth.se
Received: from brev.stacken.kth.se (brev.stacken.kth.se [130.237.234.84])
by tapas.stacken.kth.se (Postfix) with ESMTP id E93825350F
for <arla-drinkers@tapas.stacken.kth.se>;
Thu, 15 Feb 2007 15:56:42 +0100 (CET)
Received: from mx2.kth.se (mx2.kth.se [130.237.48.98])
by brev.stacken.kth.se (8.12.10/8.12.10) with ESMTP id l1FEugOA007235
for <arla-drinkers@stacken.kth.se>;
Thu, 15 Feb 2007 15:56:42 +0100 (MET)
Received: from localhost (localhost.localdomain [127.0.0.1])
by mx2.kth.se (Postfix) with ESMTP id 4024E14082E
for <arla-drinkers@stacken.kth.se>;
Thu, 15 Feb 2007 15:56:42 +0100 (CET)
Received: from mx2.kth.se ([127.0.0.1])
by localhost (mx2.kth.se [127.0.0.1]) (amavisd-new,
port 10024) with LMTP
id 31130-01-67; Thu, 15 Feb 2007 15:56:39 +0100 (CET)
Received: from kashyyyk.ite.kth.se (kashyyyk.ite.kth.se [130.237.31.35])
by mx2.kth.se (Postfix) with ESMTP id 3E54614081E;
Thu, 15 Feb 2007 15:56:39 +0100 (CET)
Received: by kashyyyk.ite.kth.se (Postfix, from userid 18404)
id F0B8489CA62; Thu, 15 Feb 2007 15:56:38 +0100 (CET)
From: Tomas Olsson <tol@it.su.se>
To: Kostik Belousov <kostikbel@gmail.com>
Subject: Re: Arla on FreeBSD
References: <20070214162938.GA96725@keira.kiwi-computer.com>
<20070214173211.L1054@chrishome.localnet>
<20070214170808.GC96725@keira.kiwi-computer.com>
<lsrvei45pq1.fsf@kashyyyk.ite.kth.se>
<20070215044707.GA39168@deviant.kiev.zoral.com.ua>
<lsrmz3f680v.fsf_-_@kashyyyk.ite.kth.se>
<20070215104537.GC39168@deviant.kiev.zoral.com.ua>
<lsrhctn6393.fsf@kashyyyk.ite.kth.se>
<20070215120855.GE39168@deviant.kiev.zoral.com.ua>
<lsrd54b603c.fsf@kashyyyk.ite.kth.se>
<20070215134608.GG39168@deviant.kiev.zoral.com.ua>
Date: 15 Feb 2007 15:56:38 +0100
In-Reply-To: <20070215134608.GG39168@deviant.kiev.zoral.com.ua>
Message-ID: <lsr8xez5v15.fsf@kashyyyk.ite.kth.se>
Lines: 48
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3
MIME-Version: 1.0
X-Virus-Scanned: by amavisd-new at kth.se
X-Spam-Status: No, hits=-4.9 tagged_above=-200.0 required=5.0 tests=BAYES_00
X-Spam-Level:
Cc: freebsd-fs@freebsd.org, arla-drinkers@stacken.kth.se
X-BeenThere: arla-drinkers@stacken.kth.se
X-Mailman-Version: 2.1.6
Precedence: list
List-Id: Arla discussions <arla-drinkers.stacken.kth.se>
List-Unsubscribe: <https://lists.stacken.kth.se/mailman/listinfo/arla-drinkers>,
<mailto:arla-drinkers-request@stacken.kth.se?subject=unsubscribe>
List-Archive: <http://lists.stacken.kth.se/pipermail/arla-drinkers>
List-Post: <mailto:arla-drinkers@stacken.kth.se>
List-Help: <mailto:arla-drinkers-request@stacken.kth.se?subject=help>
List-Subscribe: <https://lists.stacken.kth.se/mailman/listinfo/arla-drinkers>,
<mailto:arla-drinkers-request@stacken.kth.se?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: arla-drinkers-bounces@stacken.kth.se
Errors-To: arla-drinkers-bounces@stacken.kth.se
X-Virus-Scanned: by amavisd-new at kth.se
Kostik Belousov <kostikbel@gmail.com> writes:
> On Thu, Feb 15, 2007 at 02:07:19PM +0100, Tomas Olsson wrote:
> > Ok, vn_open() must be passed curthread so we can't use arlad's thread when
> > in our VOP. And we cannot use an absolute path to the cache. So vn_open()
> > can't be used?
> vn_open() does not need curthread in strong sence, but td is the thread
> that all locks and sleeps will be performed for.
>
Except in places like vput() and vrele()?
struct thread *td = curthread; /* XXX */
> I think that your current strategy would work, but it needs to be checked.
>
Nice. Possibly there are still a few places where I mix contexts too much
as well. And I've probably missed a few mandatory support routines along
the lines of vn_start_write().
> > So where does this leave us, is plain lookup() (or VOP_LOOKUP) and
> > VOP_CREATE on the cache a possible way to go? Seems to work on OpenBSD.
> vn_open() is the right way. Otherwise, you would in fact reimplement the
> code from it.
>
I know, I just don't see how to get around it.
> Also, you could look at file handle API, that would save you of path lookups
> after the vnode is looked up first time (look around for vfs_vptofh and
> vfs_fhtovp ops). This API is used by NFS server, so it shall work :).
>
That's an idea. We used that before in another context, but then we ran
into trouble with too many OSes so we dropped it. Depends on how much code
one can share.
> > Well, it's marked "doesn't need giant"; we use our own global lock. I don't
> > trust it 100%, but it seems to work so far. I haven't tried it on any MP
> > FreeBSD boxes though.
>
> Again, this could lead to lock order reversals with vnode lock. For
> instance, when lookup() traverses tree, it has the parent directory
> locked and calls fs-provided VOP_LOOKUP(). This method shall return the
> leaf vnode locked. Since, according to you claim, some alra-specific
> global lock is taken between these two vnode locks, it could LOR between
> vnode locks and alra lock
>
I'm not sure if that's currently a problem for us, but I'll take a
look. I'm sure there are other cases.
thanks
/t
_______________________________________________
Arla-drinkers mailing list
Arla-drinkers@stacken.kth.se
https://lists.stacken.kth.se/mailman/listinfo/arla-drinkers