From: Jeff Liu <jeff.liu@oracle.com>
To: Jan Kara <jack@suse.cz>
Cc: zab@zabbo.net,
"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
Alexander Viro <viro@zeniv.linux.org.uk>,
Andreas Dilger <adilger@dilger.ca>,
Dave Chinner <david@fromorbit.com>,
Mark Fasheh <mfasheh@suse.com>, Joel Becker <jlbec@evilplan.org>,
Chris Mason <chris.mason@fusionio.com>,
Christoph Hellwig <hch@infradead.org>,
ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] [RFC PATCH 0/3] copy-on-write extents mapping
Date: Mon, 25 Feb 2013 22:19:06 +0800 [thread overview]
Message-ID: <512B72DA.4010205@oracle.com> (raw)
In-Reply-To: <20130225132844.GB8232@quack.suse.cz>
On 02/25/2013 09:28 PM, Jan Kara wrote:
> Hi Jeff,
>
> On Sun 24-02-13 21:42:30, Jeff Liu wrote:
>> Thanks for both of your comments and sorry for my too late response since
>> I have to think it over and run tests to gather the performance
>> statistics.
> Sure, no problem.
>
>>
>> No matter kernel is patched or not, there basically no performance
>> improvements although 12 times fiemap ioctl(2) are reduced
> <snip>
> Yeah, I suspected that. As Zach said, kernel has to do all the work
> anyway so you just save some small overhead of additional syscalls. But
> those are rather cheap compared to other stuff you need to do.
>
>> But I have another idea regarding the performance if considering the
>> practical situations. Generally, the end user would run du(1) against a
>> partition with not only the reflinked files but also includes normal
>> files which are not contains any shared extents, or if the user check up
>> the shared extents for a previous reflinked file, but maybe this file has
>> already totally COWed, that is, now it does not contains any shared
>> extent at all.
>>
>> In either case, du(1) has to call fiemap to look through the extents
>> against this kind of files no matter it contains shared extents or not,
>> that's would be an overhead(Yes, du(1) is not a very performance critical
>> application).
>>
>> But with a prejudegement approach, we can bypass the normal files and
>> lookup shared extents against the COW file only.
> Yes, that would be useful and as you showed it can bring noticeable
> speedup.
>
>> Does the results above looks make sense? If yes, I still felt that it's
>> not a formal approach to detect reflinked files. IMHO, if we can improve
>> the stat(2)->getattr() to fill the mode member with a flag to indicate
>> that a file is reflinked/cow or not, it would be more convenient to check
>> as like S_ISREFLINK(stat.st_mode) from the user space since du(1) always
>> fetching the statistics per file disk space accounting.
> I agree that adding filtering to FIEMAP just to accomodate the only
> practical use case of checking whether a file has any shared extent is
> really an overkill. But changing stat(2) the way you describe is ugly hack.
> st_mode has logically nothing to do with whether file has shared extents or
> not. If anything you could use ioctl IOC_GETFLAGS for that. I'm not 100%
> sure that's the right interface but at least it isn't that ugly.
Hi Jan,
Thanks for your quick response and thanks for pointing me out, I have
not realized this interface before, looks it's very nice in this
situation, I'll try it out. :)
Regards,
-Jeff
WARNING: multiple messages have this Message-ID (diff)
From: Jeff Liu <jeff.liu@oracle.com>
To: Jan Kara <jack@suse.cz>
Cc: zab@zabbo.net,
"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
Alexander Viro <viro@zeniv.linux.org.uk>,
Andreas Dilger <adilger@dilger.ca>,
Dave Chinner <david@fromorbit.com>,
Mark Fasheh <mfasheh@suse.com>, Joel Becker <jlbec@evilplan.org>,
Chris Mason <chris.mason@fusionio.com>,
Christoph Hellwig <hch@infradead.org>,
ocfs2-devel@oss.oracle.com
Subject: Re: [RFC PATCH 0/3] copy-on-write extents mapping
Date: Mon, 25 Feb 2013 22:19:06 +0800 [thread overview]
Message-ID: <512B72DA.4010205@oracle.com> (raw)
In-Reply-To: <20130225132844.GB8232@quack.suse.cz>
On 02/25/2013 09:28 PM, Jan Kara wrote:
> Hi Jeff,
>
> On Sun 24-02-13 21:42:30, Jeff Liu wrote:
>> Thanks for both of your comments and sorry for my too late response since
>> I have to think it over and run tests to gather the performance
>> statistics.
> Sure, no problem.
>
>>
>> No matter kernel is patched or not, there basically no performance
>> improvements although 12 times fiemap ioctl(2) are reduced
> <snip>
> Yeah, I suspected that. As Zach said, kernel has to do all the work
> anyway so you just save some small overhead of additional syscalls. But
> those are rather cheap compared to other stuff you need to do.
>
>> But I have another idea regarding the performance if considering the
>> practical situations. Generally, the end user would run du(1) against a
>> partition with not only the reflinked files but also includes normal
>> files which are not contains any shared extents, or if the user check up
>> the shared extents for a previous reflinked file, but maybe this file has
>> already totally COWed, that is, now it does not contains any shared
>> extent at all.
>>
>> In either case, du(1) has to call fiemap to look through the extents
>> against this kind of files no matter it contains shared extents or not,
>> that's would be an overhead(Yes, du(1) is not a very performance critical
>> application).
>>
>> But with a prejudegement approach, we can bypass the normal files and
>> lookup shared extents against the COW file only.
> Yes, that would be useful and as you showed it can bring noticeable
> speedup.
>
>> Does the results above looks make sense? If yes, I still felt that it's
>> not a formal approach to detect reflinked files. IMHO, if we can improve
>> the stat(2)->getattr() to fill the mode member with a flag to indicate
>> that a file is reflinked/cow or not, it would be more convenient to check
>> as like S_ISREFLINK(stat.st_mode) from the user space since du(1) always
>> fetching the statistics per file disk space accounting.
> I agree that adding filtering to FIEMAP just to accomodate the only
> practical use case of checking whether a file has any shared extent is
> really an overkill. But changing stat(2) the way you describe is ugly hack.
> st_mode has logically nothing to do with whether file has shared extents or
> not. If anything you could use ioctl IOC_GETFLAGS for that. I'm not 100%
> sure that's the right interface but at least it isn't that ugly.
Hi Jan,
Thanks for your quick response and thanks for pointing me out, I have
not realized this interface before, looks it's very nice in this
situation, I'll try it out. :)
Regards,
-Jeff
next prev parent reply other threads:[~2013-02-25 14:19 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-20 3:59 [Ocfs2-devel] [RFC PATCH 0/3] copy-on-write extents mapping Jeff Liu
2013-02-20 3:59 ` Jeff Liu
2013-02-21 15:25 ` [Ocfs2-devel] " Jan Kara
2013-02-21 15:25 ` Jan Kara
2013-02-21 18:00 ` [Ocfs2-devel] " Zach Brown
2013-02-21 18:00 ` Zach Brown
2013-02-24 13:42 ` [Ocfs2-devel] " Jeff Liu
2013-02-24 13:42 ` Jeff Liu
2013-02-25 13:28 ` [Ocfs2-devel] " Jan Kara
2013-02-25 13:28 ` Jan Kara
2013-02-25 14:19 ` Jeff Liu [this message]
2013-02-25 14:19 ` Jeff Liu
2013-02-25 17:14 ` [Ocfs2-devel] " Zach Brown
2013-02-25 17:14 ` Zach Brown
2013-03-02 10:46 ` [Ocfs2-devel] " Joel Becker
2013-03-02 10:46 ` Joel Becker
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=512B72DA.4010205@oracle.com \
--to=jeff.liu@oracle.com \
--cc=adilger@dilger.ca \
--cc=chris.mason@fusionio.com \
--cc=david@fromorbit.com \
--cc=hch@infradead.org \
--cc=jack@suse.cz \
--cc=jlbec@evilplan.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=mfasheh@suse.com \
--cc=ocfs2-devel@oss.oracle.com \
--cc=viro@zeniv.linux.org.uk \
--cc=zab@zabbo.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.