All of lore.kernel.org
 help / color / mirror / Atom feed
From: Miao Xie <miaox@cn.fujitsu.com>
To: Liu Bo <bo.li.liu@oracle.com>
Cc: Linux Btrfs <linux-btrfs@vger.kernel.org>
Subject: Re: [PATCH 0/3] flush delalloc by multi-task
Date: Fri, 26 Oct 2012 11:25:51 +0800	[thread overview]
Message-ID: <508A02BF.10502@cn.fujitsu.com> (raw)
In-Reply-To: <5089F003.8080400@oracle.com>

On Fri, 26 Oct 2012 10:05:55 +0800, Liu Bo wrote:
> On 10/26/2012 09:56 AM, Miao Xie wrote:
>>> I can see the potential improvements brought by flushing inodes this way.
>>>>
>>>> But I don't think it makes much sense by making waiting process multi-task,
>>>> since even we spread wait order extents into different cpus, they just occpied
>>>> the cpu and went on waiting and scheduled then, I mean, the bottleneck is on
>>>> what we're waiting for.
>> Thanks for your comment, I think only btrfs_run_ordered_operations(root, 0) needn't
>> wait for the works, the others must wait.
>>
>> The first reason is to avoid changing the semantic of those tree function. The second
>> reason is we have to wait for the completion of all works, if not, the file data in
>> snapshots may be different with the source suvolumes because the flush may not end
>> before the snapshot creation.
>>
> 
> Yes, it's right that they must wait for all workers to finish.
> 
> But I don't mean that(sorry for my confusing words).
> 
> IMO we don't need to let *btrfs_wait_ordered_extents()* run as multi-task.

It also need to be done by multi-task because btrfs_wait_ordered_extents() doesn't imply
that all the dirty pages in the ordered extent have been written into the disk, that is
it also need do lots of things before waiting for the event - BTRFS_ORDERED_COMPLETE, so
the multi-task process is useful, I think.

Anyway, we need test to validate it.

Thanks
Miao

> 
> thanks,
> liubo
> 
> 
> 
> 



  reply	other threads:[~2012-10-26  4:03 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-25  9:20 [PATCH 0/3] flush delalloc by multi-task Miao Xie
2012-10-25  9:28 ` [PATCH 1/3] Btrfs: make delalloc inodes be flushed " Miao Xie
2012-10-25  9:31 ` [PATCH 2/3] Btrfs: make ordered operations be handled " Miao Xie
2012-10-25  9:41 ` [PATCH 3/3] Btrfs: make ordered extent be flushed " Miao Xie
2012-10-25 11:53 ` [PATCH 0/3] flush delalloc " Liu Bo
2012-10-26  1:56   ` Miao Xie
2012-10-26  2:05     ` Liu Bo
2012-10-26  3:25       ` Miao Xie [this message]
2012-10-26  7:01         ` Liu Bo
2012-11-01  7:43 ` Miao Xie

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=508A02BF.10502@cn.fujitsu.com \
    --to=miaox@cn.fujitsu.com \
    --cc=bo.li.liu@oracle.com \
    --cc=linux-btrfs@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 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.