From: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
To: "Jörn Engel" <joern@lazybastard.org>
Cc: linux-fsdevel@vger.kernel.org
Subject: Re: Race between __sync_single_inode() and LogFS garbage collector
Date: Mon, 19 Feb 2007 21:06:33 -0600 [thread overview]
Message-ID: <1171940793.7963.10.camel@kleikamp.austin.ibm.com> (raw)
In-Reply-To: <20070219232351.GG7813@lazybastard.org>
On Mon, 2007-02-19 at 23:23 +0000, Jörn Engel wrote:
> On Mon, 19 February 2007 17:05:55 -0600, Dave Kleikamp wrote:
> >
> > It'd be nice if you could drop s_w_mutex when the garbage collector
> > calls i_get().
>
> Not possible. Garbage collection only happens when space is getting
> tight. At that moment all writes must be serialized or this race will
> be the least of my problems. :(
>
> > Otherwise, you may be able to call ilookup5_nowait() in the garbage
> > collector, and skip that inode if I_LOCK is set.
>
> Also not possible. I cannot skip that inode, or again this race will be
> a minor problem. The inode exists on the medium and I must get it by
> some means. Re-reading it from the medium is fine, writing is not and
> waiting for the write to happen brings me back to square one.
Okay, I get it now. You've got more constraints than I initially
realized.
> It is a nasty problem that has been haunting me for about a year now.
> For a while I tried ilookup5_nowait() and just used the inode in spite
> of the lock. But that will explode spectacularly when racing against
> generic_drop_inode().
You've obviously given this a lot more thought that I have, but this
sounds like something that has possibilities. You couldn't implement
your own drop_inode method that does better locking against the garbage
collector?
> Double-caching or a common lock seem to be the only solutions.
>
> Jörn
>
--
David Kleikamp
IBM Linux Technology Center
-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2007-02-20 3:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-19 21:31 Race between __sync_single_inode() and LogFS garbage collector Jörn Engel
2007-02-19 23:05 ` Dave Kleikamp
2007-02-19 23:23 ` Jörn Engel
2007-02-20 3:06 ` Dave Kleikamp [this message]
2007-02-20 10:50 ` Jörn Engel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1171940793.7963.10.camel@kleikamp.austin.ibm.com \
--to=shaggy@linux.vnet.ibm.com \
--cc=joern@lazybastard.org \
--cc=linux-fsdevel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).