Skip to contentSkip to conversation

Large Blocksize Support V3

PATCH In review [email protected] 27 participants 235 messages Apr 24, 2007 – May 9, 2007 Page 2 of 2

Subsystems (11)
lore
Share & tools
lore
#228 lore raw
In reply to David Chinner
Quoted 4 lines · David Chinner

Both. To many things can happen asynchroonously to a page that it makes it just about impossible to predict all the potential race conditions that are involved. complexity arose from trying to fix the races that were uncovered without breaking everything else...

Ok.

Quoted 7 lines
Quoted 2 lines

Until we code review and implementation that does page aggregation for linux we can't say how nasty it would be.

We already have an implementation - I've pointed it out several times
now: see fs/xfs/linux-2.6/xfs_buf.[ch].

There are a lot of nasties in there....

Yes, and but it isn't a generic implementation in mm/filemap.c, it is a compatibility layer. It lives with the current deficiencies instead of removes them.

Quoted 7 lines
Quoted 7 lines
Quoted 6 lines
Quoted 1 line

You're addressing Christoph's straw man here.

No, I'm speaking from years of experience working on a page/buffer/chunk cache capable of using both large pages and aggregating multiple pages. It has, at times, almost driven me insane and I don't want to go back there.

Quoted 8 lines
Quoted 6 lines

The suggestion seems to be to always aggregate pages (to handle PAGE_SIZE < block size), and not to even worry about the fact that it happens that the pages you are aggregating are physically contiguous. The memory allocator and the block layer can worry about that. It isn't something the page cache or filesystems need to pay attention to.

perfomrance problems in using discontigous pages

Small scatter lists?

Quoted 1 line

and needing to vmap() them says otherwise....

Always?

Ugh. I just realized looking at the xfs code that it doesn't work in the presence of high memory, at least not with 4K pages.

Quoted 7 lines
Quoted 4 lines

I suspect the implementation in linux would be sufficiently different that it would not be prone to the same problems. Among other things we are already do most things on a range of page addresses, so we would seem to have most of the infrastructure already.

Filesystems don't typically do this - they work on blocks and assume that a block can be directly referenced.

But that is how mm/filemap.c works. The calls into the filesystem can be per multi-page group as they are current per page. The point is that the existing in kernel abstraction is already larger then a page for doing the work.

Quoted 13 lines
Quoted 6 lines

Given that small block sizes give us better storage efficiency, which means less disk bandwidth used, which means less time to get the data off of a slow disk (especially if you can put multiple files you want simultaneously in that same space). I'm not convinced that large block sizes are a clear disk performance advantage, so we should not neglect the small file sizes.

Hmmm - we're not talking about using 64k block size filesystems to store lots of little files or using them on small, slow disks. We're looking at optimising for multi-petabyte filesystems with multi-terabyte sized files sustaining throughput of tens to hundreds of GB/s to/from hundreds to thousands of disk.

Quoted 4 lines

I certinaly don't consider 64k block size filesystems as something suitable for desktop use - maybe PVRs would benefit, but this is not something you'd use for your kernel build environment on a single disk in a desktop system....

Yes. You are talking about only fixing the kernel for your giant 64K block filesystems that are only interesting on peta-byte arrays.

I am pointing out that the other fixes that have been discussed. Optimistic contiguous page allocation and a larger linux scatter gather list. Are interesting on much smaller filesystem and machine sizes where small files are still interesting. Making them generally better improvements for linux.

If you only improve the giant peta-byte raid cases 99% of linux users simply don't care, and so the code isn't very interesting.

Eric

#229 lore raw

Just to stick my two cents in here:

The definition of what is meant by "large" filesystems has to change with the advances in disk drive technology. In the not too distant past, a "large" single filesystem was 100 GB. There are now consumer grade disks on the market with 1 TB available in a single unit. I don't know about you guys, but that scares the crap out of me, in terms of dealing with that much space on a desktop machine. Efficiently dealing with transferring that much data on a desktop (never mind server) means re-thinking the limitations of the I/O subsystems. What was once the realm of the data center is now the realm of the living room. Large data sets are becoming more commonplace (HD Movies, audio files, etc) with each passing day, and there is no end in sight in the progression. In addition, with the release of specs recently about larger sector sizes for disk drives (2048 bytes, or larger), this is going to become a pressing need for the general case, not just the extremely large servers, or HPC machines and clusters. Already there is no efficient way to back up that much space, in a reasonable time, except to have another disk of a similar or larger size to back up to. Anything we can do to make disk I/O *Faster* is a win.

I recognize that there is a huge issue in dealing with sub block size files. The trade off of small files VS large blocks is now a non trivial problem. Once disk sector sizes increase, the problems will have to be dealt with in a more intelligent manner, possibly dividing sectors into smaller logical blocks for small files? Maybe filesystems that can understand multiple block sizes?

Well, we do live in interesting times; we just have to make the most of it.

Dan Weigert

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Eric W. Biederman
Sent: Monday, May 07, 2007 2:56 AM
To: David Chinner
Cc: Andrew Morton; [email protected]; [email protected]; Mel Gorman; William Lee Irwin III; Jens Axboe; Badari Pulavarty; Maxim Levitsky
Subject: Re: [00/17] Large Blocksize Support V3

Quoted 4 lines · David Chinner

Both. To many things can happen asynchroonously to a page that it makes it just about impossible to predict all the potential race conditions that are involved. complexity arose from trying to fix the races that were uncovered without breaking everything else...

Ok.

Quoted 1 line
Quoted 1 line

Until we code review and implementation that does page aggregation

for

Quoted 6 lines
Quoted 1 line

linux we can't say how nasty it would be.

We already have an implementation - I've pointed it out several times
now: see fs/xfs/linux-2.6/xfs_buf.[ch].

There are a lot of nasties in there....

Yes, and but it isn't a generic implementation in mm/filemap.c, it is a compatibility layer. It lives with the current deficiencies instead of removes them.

Quoted 7 lines
Quoted 7 lines
Quoted 6 lines
Quoted 1 line

You're addressing Christoph's straw man here.

No, I'm speaking from years of experience working on a page/buffer/chunk cache capable of using both large pages and aggregating multiple pages. It has, at times, almost driven me insane and I don't want to go back there.

Quoted 8 lines
Quoted 6 lines

The suggestion seems to be to always aggregate pages (to handle PAGE_SIZE < block size), and not to even worry about the fact that it happens that the pages you are aggregating are physically contiguous. The memory allocator and the block layer can worry about that. It isn't something the page cache or filesystems need to pay attention to.

perfomrance problems in using discontigous pages

Small scatter lists?

Quoted 1 line

and needing to vmap() them says otherwise....

Always?

Ugh. I just realized looking at the xfs code that it doesn't work in the presence of high memory, at least not with 4K pages.

Quoted 7 lines
Quoted 4 lines

I suspect the implementation in linux would be sufficiently different that it would not be prone to the same problems. Among other things we are already do most things on a range of page addresses, so we would seem to have most of the infrastructure already.

Filesystems don't typically do this - they work on blocks and assume that a block can be directly referenced.

But that is how mm/filemap.c works. The calls into the filesystem can be per multi-page group as they are current per page. The point is that the existing in kernel abstraction is already larger then a page for doing the work.

Quoted 13 lines
Quoted 6 lines

Given that small block sizes give us better storage efficiency, which means less disk bandwidth used, which means less time to get the data off of a slow disk (especially if you can put multiple files you want simultaneously in that same space). I'm not convinced that large block sizes are a clear disk performance advantage, so we should not neglect the small file sizes.

Hmmm - we're not talking about using 64k block size filesystems to store lots of little files or using them on small, slow disks. We're looking at optimising for multi-petabyte filesystems with multi-terabyte sized files sustaining throughput of tens to hundreds of GB/s to/from hundreds to thousands of disk.

Quoted 4 lines

I certinaly don't consider 64k block size filesystems as something suitable for desktop use - maybe PVRs would benefit, but this is not something you'd use for your kernel build environment on a single disk in a desktop system....

Yes. You are talking about only fixing the kernel for your giant 64K block filesystems that are only interesting on peta-byte arrays.

I am pointing out that the other fixes that have been discussed. Optimistic contiguous page allocation and a larger linux scatter gather list. Are interesting on much smaller filesystem and machine sizes where small files are still interesting. Making them generally better improvements for linux.

If you only improve the giant peta-byte raid cases 99% of linux users simply don't care, and so the code isn't very interesting.

Eric
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
-----------------------------------------
This message and any attachments are intended only for the use of the addressee and may contain information that is privileged and confidential. If the reader of the message is not the intended recipient or an authorized representative of the intended recipient, you are hereby notified that any dissemination of this communication is strictly prohibited. If you have received this communication in error, notify the sender immediately by return email and delete the message and any attachments from your system.

#230 lore raw
In reply to Andrew Morton
Quoted 4 lines · Andrew Morton

And hardware gets better. If Intel & AMD come out with a 16k pagesize option in a couple of years we'll look pretty dumb. If the problems which you're presently having with that controller get sorted out in the next generation of the hardware, we'll also look pretty dumb.

Unfortunately, this isn't a problem with hardware getting better, but a willingness to break backwards compatibility.

x86_64 uses a 4k page size to avoid breaking 32-bit applications. And unfortunately, iirc, even 64-bit applications are continuing to depend on 4k page alignments for things like the text and bss segments. If the userspace ELF and other compiler/linker specifications were appropriate written so they could handle 16k pagesizes, maybe 5 years from now we could move to a 16k pagesize. But this is going to require some coordination between the userspace binutils folks and AMD/Intel in order to plan such a migration.

- Ted

#231 lore raw
Quoted 18 lines · Theodore Tso
Quoted 4 lines · Andrew Morton

And hardware gets better. If Intel & AMD come out with a 16k pagesize option in a couple of years we'll look pretty dumb. If the problems which you're presently having with that controller get sorted out in the next generation of the hardware, we'll also look pretty dumb.

Unfortunately, this isn't a problem with hardware getting better, but a willingness to break backwards compatibility.

x86_64 uses a 4k page size to avoid breaking 32-bit applications. And unfortunately, iirc, even 64-bit applications are continuing to depend on 4k page alignments for things like the text and bss segments. If the userspace ELF and other compiler/linker specifications were appropriate written so they could handle 16k pagesizes, maybe 5 years from now we could move to a 16k pagesize. But this is going to require some coordination between the userspace binutils folks and AMD/Intel in order to plan such a migration.

Quoted 1 line

- Ted

The AMD64 psABI requires binaries to work with any page size up to 64k.

Whether that's true in practice is another matter entirely, of course.

Signature · 1 line
Nicholas Miell <[email protected]>
#232 lore raw
Quoted 10 lines · Theodore Tso
Quoted 10 lines

Unfortunately, this isn't a problem with hardware getting better, but a willingness to break backwards compatibility.
x86_64 uses a 4k page size to avoid breaking 32-bit applications. And unfortunately, iirc, even 64-bit applications are continuing to depend on 4k page alignments for things like the text and bss segments. If the userspace ELF and other compiler/linker specifications were appropriate written so they could handle 16k pagesizes, maybe 5 years from now we could move to a 16k pagesize. But this is going to require some coordination between the userspace binutils folks and AMD/Intel in order to plan such a migration.

Quoted 2 lines · Nicholas Miell

The AMD64 psABI requires binaries to work with any page size up to 64k. Whether that's true in practice is another matter entirely, of course.

64-bit applications are a non-issue. The ABI requires them to handle it. It's 32-bit applications on x86-64 that are the concern. ABI emulation for them is more involved when 4K 32-bit ABI's are to be emulated on kernels compiled for larger native pagesizes. In practice, so many use getpagesize() it may not be much of an issue, but consider WINE and other sorts of non-Linux-native 32-bit apps, among other issues.

-- wli

#233 lore raw
In reply to [email protected]
Quoted 30 lines · On Wednesday 25 April 2007 01:21, [email protected] wrote:

Rationales:

1. We have problems supporting devices with a higher blocksize than page size. This is for example important to support CD and DVDs that can only read and write 32k or 64k blocks. We currently have a shim layer in there to deal with this situation which limits the speed of I/O. The developers are currently looking for ways to completely bypass the page cache because of this deficiency.

2. 32/64k blocksize is also used in flash devices. Same issues.

3. Future harddisks will support bigger block sizes that Linux cannot support since we are limited to PAGE_SIZE. Ok the on board cache may buffer this for us but what is the point of handling smaller page sizes than what the drive supports?

4. Reduce fsck times. Larger block sizes mean faster file system checking.

5. Performance. If we look at IA64 vs. x86_64 then it seems that the faster interrupt handling on x86_64 compensate for the speed loss due to a smaller page size (4k vs 16k on IA64). Supporting larger block sizes sizes on all allows a significant reduction in I/O overhead and
increases the size of I/O that can be performed by hardware in a single request since the number of scatter gather entries are typically limited for one request. This is going to become increasingly important to support the ever growing memory sizes since we may have to handle excessively large amounts of 4k requests for data sizes that may become common soon. For example to write a 1 terabyte file the kernel would have to handle 256 million 4k chunks.

Quoted 4 lines

6. Cross arch compatibility: It is currently not possible to mount an 16k blocksize ext2 filesystem created on IA64 on an x86_64 system. With this patch this becoems possible.

Hi.

I have a few questions about that patchset:

1) Is it possible for block device to assume that it will alway get big requests (and aligned by big blocksize) ?

2) Does metadata reading/writing occuress also using same big blocksize ?

3 If so, How __bread/__getblk are affrected? Does returned buffer_head point to whole block ?

And what do you think about mine design ?
I want to link parts of compound page through buffer_heads
So the head page's bh points to second page (tail page ) bh's, and from this bh it is possible to reference the page itself and so on.
(This will allow a compound page be physicly fragmented)

Best regards,
Maxim Levitsky

PS:

I ask questions since this patchset does matter to me, I really like to see this <= 4K limit lifted (all software limits are bad)
And finaly get good packet writing... I miss DirectCD much... Altough >4K blocksizes are really only first step.
To make really fast packet writing, the UDF filesystem should be rewritten as well.

#234 lore raw
Quoted 2 lines · Maxim Levitsky

1) Is it possible for block device to assume that it will alway get big requests (and aligned by big blocksize) ?

That is one of the key problems. We hope that Mel Gorman's antifrag work will get us there.

Quoted 1 line

2) Does metadata reading/writing occuress also using same big blocksize ?

It can if the filesystem decides to and sets up the order the mapping.

Quoted 2 lines

3 If so, How __bread/__getblk are affrected? Does returned buffer_head point to whole block ?

Correct.