lkml.org 
[lkml]   [2012]   [Apr]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC][PATCH 0/3] add FALLOC_FL_NO_HIDE_STALE flag in fallocate
On Wed, Apr 18, 2012 at 12:07:17PM -0400, Ted Ts'o wrote:
> On Wed, Apr 18, 2012 at 01:02:08PM +1000, Dave Chinner wrote:
> > In actual fact, on my 12 disk RAID0 array, XFS is faster with
> > unwritten extents *enabled* than when hacked to turn them off.
>
> Can you explain why this is the case? It seems... counterintuitive.

I'll admit that I was slightly surprised, too.

> The only explanation I can think of is that your code paths when
> unwritten extents are disabled haven't been optimized,

When unwritten extents are disabled, the IO takes the normal
overwrite/extending write path, which is as optimised as
the unwritten path because it is more commonly used.

> in which case
> the comparison between using and not using unwritten extents might not
> be valid.

It's and apples to apples comparison.

The code paths are identical on IO submission, the only difference
is the IO completion path. In the case of unwritten extents, it has
to do a transaction to convert the extents and update the file size.
In the case of the stale extent, it has to modify the file size
because the IO is beyond EOF.

My point, however, is that despite the complexity of unwritten
extent conversion it is not noticably more expensive than a file
size update transaction on XFS. Hence the reasoning for exposing
stale data due to unwritten conversion has too much overhead to be
useful is demonstratably false.

Cheers,

Dave.
--
Dave Chinner
david@fromorbit.com


\
 
 \ /
  Last update: 2012-04-19 01:41    [W:0.086 / U:0.492 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site