Re: [PATCH 3/4] xfs: make xfs_inode_set_eofblocks_tag cheaper for the common case

Dave Chinner <[email protected]>
Newsgroups gmane.comp.file-systems.xfs.general
Message-ID <20160830230320.GW19025@dastard>
On Tue, Aug 30, 2016 at 04:40:06PM +0200, Christoph Hellwig wrote:
> On Fri, Aug 26, 2016 at 12:02:09PM -0400, Brian Foster wrote:
> > > I don't think taking it should be too bad, but given the ops ordering
> > > it also seems entirely pointless to even take it.
> > > 
> > 
> > Then why are we taking it? I assumed it at least served as a memory
> > barrier...
> 
> I meant to take it for that early check, not in general.
> 
> I guess this is another hint we should try to look into using proper
> atomic bitops here..

I think we've looked at that in the past, but there were cases where
we have to do things atomically with setting/clearing the flags and
that required the spinlock to protect the flag modifications as
well. IIRC there are also cases where we have to check/set multiple
flags at once, which we cannot do with atomic bit ops.

Perhaps the code has changed enough that there isn't a problem
anymore, but I don't think that is the case...

Cheers,

Dave.
-- 
Dave Chinner
[email protected]

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.