xfs
[Top] [All Lists]

Re: [PATCH 4/6] Replace inode flush semaphore with a completion

To: Dave Chinner <david@xxxxxxxxxxxxx>
Subject: Re: [PATCH 4/6] Replace inode flush semaphore with a completion
From: Daniel Walker <dwalker@xxxxxxxxxx>
Date: Wed, 13 Aug 2008 18:34:49 -0700
Cc: xfs@xxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, matthew@xxxxxx
In-reply-to: <20080814001938.GC6119@disturbed>
References: <1214556284-4160-1-git-send-email-david@xxxxxxxxxxxxx> <1214556284-4160-5-git-send-email-david@xxxxxxxxxxxxx> <1218597077.6166.15.camel@xxxxxxxxxxxxxxxxx> <20080813075057.GZ6119@disturbed> <1218641641.6166.32.camel@xxxxxxxxxxxxxxxxx> <20080814001938.GC6119@disturbed>
Sender: xfs-bounce@xxxxxxxxxxx
On Thu, 2008-08-14 at 10:19 +1000, Dave Chinner wrote:
> *However*, given that we already have this exact state in the
> completion itself, I see little reason for adding the additional
> locking overhead and the complexity of race conditions of keeping
> this state coherent with the completion. Modifying the completion
> API slightly to export this state is the simplest, easiest solution
> to the problem....
> 

I'm not suggesting anything concrete at this point, I'm just thinking
about it.

If you assume that most of the time your doing async flushing, you
wouldn't often need to do blocking on the completion .. Another way of
doing it would be drop the completion most of the time, and just use the
flag. Then in the rare case that a function needs to block make a stack
local completion, pass it as a pointer inside the xfs_inode_t, if it's
non-null when the write is finished you would complete().

Daniel


<Prev in Thread] Current Thread [Next in Thread>