From: Liu Bo <liubo2009@cn.fujitsu.com>
To: David Sterba <dave@jikos.cz>
Cc: linux-btrfs@vger.kernel.org, chris.mason@fusionio.com,
JBacik@fusionio.com
Subject: Re: [PATCH v3] Btrfs: improve multi-thread buffer read
Date: Thu, 19 Jul 2012 09:11:06 +0800 [thread overview]
Message-ID: <50075EAA.9030806@cn.fujitsu.com> (raw)
In-Reply-To: <20120718115735.GI11226@twin.jikos.cz>
On 07/18/2012 07:57 PM, David Sterba wrote:
> On Mon, Jul 16, 2012 at 02:05:25PM -0400, Liu Bo wrote:
>> v2->v3: adopt kernel native pagevec instead of kmalloc.
>
> Do we really use the pagevec features here? It looks more like a fancy
> way to employ a simple array ...
>
> And with a simple array we could use 16 page pointers covering 16 * 4k =
> 64k bytes which looks more friendly than 14 * 4K = 56K (available in a
> pagevec). This may have a negative effect on the troughput, but I
> haven't measured that. Can you please benchmark it against pagevec?
>
Thanks for the advice.
Yes, it is a simple array that is needed.
Indeed I even tried 128 page array, with which I can get the biggest improvement on my box.
Basically in range [1, 128], the more pages in the array, the bigger improvement we'll get.
But as Chris suggested, my test is really a race case in practical use, half of improvement
is somehow enough, so we turn to use pagevec struct because it is closer to how we solve
similar problems in other parts of the kernel.
thanks,
liubo
>
> david
> --
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
next prev parent reply other threads:[~2012-07-19 1:11 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-16 18:05 [PATCH v3] Btrfs: improve multi-thread buffer read Liu Bo
2012-07-18 11:57 ` David Sterba
2012-07-19 1:11 ` Liu Bo [this message]
2012-07-19 2:05 ` David Sterba
2012-07-19 2:31 ` Liu Bo
2012-07-20 3:36 ` David Sterba
2012-07-20 3:51 ` Liu Bo
2012-07-20 12:40 ` Chris Mason
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=50075EAA.9030806@cn.fujitsu.com \
--to=liubo2009@cn.fujitsu.com \
--cc=JBacik@fusionio.com \
--cc=chris.mason@fusionio.com \
--cc=dave@jikos.cz \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).