From: Nick Piggin <nickpiggin@yahoo.com.au>
To: Andi Kleen <andi@firstfloor.org>
Cc: Nick Piggin <npiggin@suse.de>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Linux Memory Management List <linux-mm@kvack.org>,
linux-fsdevel@vger.kernel.org
Subject: Re: [RFC] fsblock
Date: Mon, 25 Jun 2007 17:16:22 +1000 [thread overview]
Message-ID: <467F6BC6.60209@yahoo.com.au> (raw)
In-Reply-To: <p73lke95tfm.fsf@bingen.suse.de>
Andi Kleen wrote:
> Nick Piggin <npiggin@suse.de> writes:
>
>>- Structure packing. A page gets a number of buffer heads that are
>> allocated in a linked list. fsblocks are allocated contiguously, so
>> cacheline footprint is smaller in the above situation.
>
>
> It would be interesting to test if that makes a difference for
> database benchmarks running over file systems. Databases
> eat a lot of cache so in theory any cache improvements
> in the kernel which often runs cache cold then should be beneficial.
>
> But I guess it would need at least ext2 to test; Minix is probably not
> good enough.
Yeah, you are right. ext2 would be cool to port as it would be
a reasonable platform for basic performance testing and comparisons.
> In general have you benchmarked the CPU overhead of old vs new code?
> e.g. when we went to BIO scalability went up, but CPU costs
> of a single request also went up. It would be nice to not continue
> or better reverse that trend.
At the moment there are still a few silly things in the code, such
as always calling the insert_mapping indirect function (which is
the get_block equivalent). And it does a bit more RMWing than it
should still.
Also, it always goes to the pagecache radix-tree to find fsblocks,
wheras the buffer layer has a per-CPU cache front-end... so in
that regard, fsblock is really designed with lockless pagecache
in mind, where find_get_page is much faster even in the serial case
(though fsblock shouldn't exactly be slow with the current pagecache).
However, I don't think there are any fundamental performance
problems with fsblock. It even uses one less layer of locking to
do regular IO compared with buffer.c, so in theory it might even
have some advantage.
Single threaded performance of request submission is something I
will definitely try to keep optimal.
>>- Large block support. I can mount and run an 8K block size minix3 fs on
>> my 4K page system and it didn't require anything special in the fs. We
>> can go up to about 32MB blocks now, and gigabyte+ blocks would only
>> require one more bit in the fsblock flags. fsblock_superpage blocks
>> are > PAGE_CACHE_SIZE, midpage ==, and subpage <.
>
>
> Can it be cleanly ifdefed or optimized away?
Yeah, it pretty well stays out of the way when using <= PAGE_CACHE_SIZE
size blocks, generally just a single test and branch of an already-used
cacheline. It can be optimised away completely by commenting out
#define BLOCK_SUPERPAGE_SUPPORT from fsblock.h.
> Unless the fragmentation
> problem is not solved it would seem rather pointless to me. Also I personally
> still think the right way to approach this is larger softpage size.
It does not suffer from a fragmentation problem. It will do scatter
gather IO if the pagecache of that block is not contiguous. My naming
may be a little confusing: fsblock_superpage (which is a function that
returns true if the given fsblock is larger than PAGE_CACHE_SIZE) is
just named as to whether the fsblock is larger than a page, rather than
having a connection to VM superpages.
Don't get me wrong, I think soft page size is a good idea for other
reasons as well (less page metadata and page operations), and that
8 or 16K would probably be a good sweet spot for today's x86 systems.
--
SUSE Labs, Novell Inc.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2007-06-25 7:16 UTC|newest]
Thread overview: 53+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-24 1:45 Nick Piggin
2007-06-24 1:46 ` [patch 1/3] add the fsblock layer Nick Piggin
2007-06-24 15:28 ` Andi Kleen
2007-06-24 20:18 ` Arjan van de Ven
2007-06-25 8:58 ` Andi Kleen
2007-06-25 7:19 ` Nick Piggin
2007-06-24 23:01 ` Neil Brown
2007-06-25 7:41 ` Nick Piggin
2007-06-25 12:29 ` Chris Mason
2007-06-26 2:34 ` Nick Piggin
2007-06-26 2:48 ` Neil Brown
2007-06-26 3:07 ` Nick Piggin
2007-06-26 12:26 ` Chris Mason
2007-06-30 10:40 ` Christoph Hellwig
2007-06-30 10:40 ` Christoph Hellwig
2007-06-25 13:19 ` Chris Mason
2007-06-26 2:42 ` Nick Piggin
2007-06-24 1:46 ` [patch 2/3] block_dev: convert to fsblock Nick Piggin
2007-06-24 1:47 ` [patch 3/3] minix: " Nick Piggin
2007-06-24 1:53 ` [RFC] fsblock Nick Piggin
2007-06-24 3:07 ` Jeff Garzik
2007-06-24 3:47 ` Nick Piggin
2007-06-24 13:51 ` Chris Mason
2007-06-25 6:58 ` Nick Piggin
2007-06-25 12:25 ` Chris Mason
2007-06-30 10:44 ` Christoph Hellwig
2007-06-30 10:42 ` Christoph Hellwig
2007-06-30 11:10 ` Jeff Garzik
2007-06-30 11:13 ` Christoph Hellwig
2007-06-24 4:19 ` William Lee Irwin III
2007-06-24 14:16 ` Andi Kleen
2007-06-25 7:16 ` Nick Piggin [this message]
2007-06-26 3:06 ` David Chinner
2007-06-26 3:55 ` Nick Piggin
2007-06-26 9:23 ` David Chinner
2007-06-26 11:14 ` Nick Piggin
2007-06-27 12:39 ` Kyle Moffett
2007-06-26 12:34 ` Chris Mason
2007-06-27 5:32 ` Nick Piggin
2007-06-27 6:05 ` David Chinner
2007-06-27 11:50 ` Chris Mason
2007-06-27 15:18 ` Anton Altaparmakov
2007-06-27 22:35 ` David Chinner
2007-06-28 2:44 ` Nick Piggin
2007-06-28 12:20 ` Chris Mason
2007-06-29 2:08 ` David Chinner
2007-06-29 2:33 ` Nick Piggin
2007-06-30 11:05 ` Christoph Hellwig
2007-07-09 17:14 ` Christoph Lameter
2007-07-10 0:54 ` Nick Piggin
2007-07-10 0:59 ` Christoph Lameter
2007-07-10 1:07 ` Nick Piggin
2007-07-10 1:37 ` Dave McCracken
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=467F6BC6.60209@yahoo.com.au \
--to=nickpiggin@yahoo.com.au \
--cc=andi@firstfloor.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=npiggin@suse.de \
/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