Is nobh code still useful?
Jan Kara
reviewerHi,
during my page_mkwrite() work, I've looked at who uses nobh_ versions of
various functions in fs/buffer.c. It seems only ext2 and jfs use them. ext3 uses them only from writepage() (which means we needn't attach buffers to a page when it was written via mmap in writeback mode) and ext4 tries to use them but in fact it's nop because it always attaches buffers to the page earlier. So it's not really widely used, there's quite some code to support it (including one page flag), and it also slightly complicates my page_mkwrite() fixes.
So I wanted to ask does somebody actually remember what it is good for?
Buffer heads obviously consume some memory so was that the reason? OTOH we have to map the page whenever we write to it or send it to disk via writepage().
Honza
Signature · 2 lines
Jan Kara <[email protected]> SUSE Labs, CR
Quoted 15 lines · Jan Kara
Hi,
during my
page_mkwrite()work, I've looked at who usesnobh_versions of
various functions infs/buffer.c. It seems only ext2 and jfs use them. ext3 uses them only fromwritepage()(which means we needn't attach buffers to a page when it was written via mmap in writeback mode) and ext4 tries to use them but in fact it's nop because it always attaches buffers to the page earlier. So it's not really widely used, there's quite some code to support it (including one page flag), and it also slightly complicates mypage_mkwrite()fixes.
So I wanted to ask does somebody actually remember what it is good for?
Buffer heads obviously consume some memory so was that the reason? OTOH we have to map the page whenever we write to it or send it to disk viawritepage().
Quoted 1 line
Honza
I'm currently using nobh_truncate_page() in fs/exofs/inode.c::exofs_truncate().
Though, I suspect that once I do the conversion to Nick's:
"[patch 00/11] new truncate sequence"
and it is submitted, that use will disappear.
Thanks
Boaz
Jan Kara
reviewerQuoted 16 lines · Boaz Harrosh
Quoted 15 lines · Jan Kara
Hi,
during my
page_mkwrite()work, I've looked at who usesnobh_versions of
various functions infs/buffer.c. It seems only ext2 and jfs use them. ext3 uses them only fromwritepage()(which means we needn't attach buffers to a page when it was written via mmap in writeback mode) and ext4 tries to use them but in fact it's nop because it always attaches buffers to the page earlier. So it's not really widely used, there's quite some code to support it (including one page flag), and it also slightly complicates mypage_mkwrite()fixes.
So I wanted to ask does somebody actually remember what it is good for?
Buffer heads obviously consume some memory so was that the reason? OTOH we have to map the page whenever we write to it or send it to disk viawritepage().
Quoted 7 lines
Quoted 1 line
Honza
I'm currently using
nobh_truncate_page()in fs/exofs/inode.c::exofs_truncate().Though, I suspect that once I do the conversion to Nick's:
"[patch 00/11] new truncate sequence"
and it is submitted, that use will disappear.
Yeah, actually with page_mkwrite patches I've just sent, this would
definitely go away so this isn't a use I'm too much worried about ;). But thanks for info anyway.
Honza
Signature · 2 lines
Jan Kara <[email protected]> SUSE Labs, CR
Quoted 16 lines · Jan Kara
Hi,
during my
page_mkwrite()work, I've looked at who usesnobh_versions of
various functions infs/buffer.c. It seems only ext2 and jfs use them. ext3 uses them only fromwritepage()(which means we needn't attach buffers to a page when it was written via mmap in writeback mode) and ext4 tries to use them but in fact it's nop because it always attaches buffers to the page earlier. So it's not really widely used, there's quite some code to support it (including one page flag), and it also slightly complicates mypage_mkwrite()fixes.
So I wanted to ask does somebody actually remember what it is good for?
Buffer heads obviously consume some memory so was that the reason? OTOH we have to map the page whenever we write to it or send it to disk viawritepage().
Originally it was supported on ext2. I added support nobh support for ext3. At that time, the main issue/complaint was that, these bufferheads consume memory from ZONE_NORMAL causing memory pressure on 32-bit (i386) configurations.
Thanks,
Badari
Quoted 6 lines · Badari Pulavarty
Originally it was supported on ext2. I added support nobh support for ext3. At that time, the main
issue/complaint was that, these bufferheads consume memory fromZONE_NORMALcausing
memory pressure on 32-bit (i386) configurations.
Specifically, it matters on very large configuration systems (i.e., 32GB-64GB using PAE-36) that today we'd probably just say, "use x86_64, you moron". It would probably matter if someone were to want to upgrade a non-64-bit capable machine to a newer kernel.
Dropping nobh from ext3 at this point might prevent some of these older systems from upgrading, I'm not sure how much we would care; on the one hand, these machines tended to be pretty expensive, so people would probably want to use them for a while. On the other hand, it has been over five years now since x86_64 machines have been available, and many of these customers are highly unlikely to want to upgrade anyway.
- Ted
Quoted 13 lines · On Fri, 18 Sep 2009 10:12:26 -0400 Theodore Tso <[email protected]> wrote:
Quoted 6 lines · Badari Pulavarty
Originally it was supported on ext2. I added support nobh support for ext3. At that time, the main
issue/complaint was that, these bufferheads consume memory fromZONE_NORMALcausing
memory pressure on 32-bit (i386) configurations.Specifically, it matters on very large configuration systems (i.e., 32GB-64GB using PAE-36) that today we'd probably just say, "use
x86_64, you moron". It would probably matter if someone were to want to upgrade a non-64-bit capable machine to a newer kernel.
Quoted 7 lines
Dropping nobh from ext3 at this point might prevent some of these older systems from upgrading, I'm not sure how much we would care; on the one hand, these machines tended to be pretty expensive, so people would probably want to use them for a while. On the other hand, it has been over five years now since
x86_64machines have been available, and many of these customers are highly unlikely to want to upgrade anyway.
isn't the converse to just make nobh the default but not an option a better approach then?
I forgot why this was a good idea to be an option again ;-)
Signature · 3 lines
Arjan van de Ven Intel Open Source Technology Centre For development, discussion and tips for power savings, visit http://www.lesswatts.org
Jan Kara
reviewerQuoted 23 lines · Arjan van de Ven
Quoted 13 lines · On Fri, 18 Sep 2009 10:12:26 -0400 Theodore Tso <[email protected]> wrote:
Quoted 6 lines · Badari Pulavarty
Originally it was supported on ext2. I added support nobh support for ext3. At that time, the main
issue/complaint was that, these bufferheads consume memory fromZONE_NORMALcausing
memory pressure on 32-bit (i386) configurations.Specifically, it matters on very large configuration systems (i.e., 32GB-64GB using PAE-36) that today we'd probably just say, "use
x86_64, you moron". It would probably matter if someone were to want to upgrade a non-64-bit capable machine to a newer kernel.Quoted 7 lines
Dropping nobh from ext3 at this point might prevent some of these older systems from upgrading, I'm not sure how much we would care; on the one hand, these machines tended to be pretty expensive, so people would probably want to use them for a while. On the other hand, it has been over five years now since
x86_64machines have been available, and many of these customers are highly unlikely to want to upgrade anyway.
Quoted 3 lines
isn't the converse to just make nobh the default but not an option a better approach then?
I forgot why this was a good idea to be an option again ;-)
Buffer heads cache useful information so without them, IO may become more
more CPU intensive (allocating and freeing temporary buffer heads, setting up block mapping etc.).
Also some features like delayed allocation need buffer head bits - that
is why e.g. ext4 doesn't really support nobh mount option.
Honza
Signature · 2 lines
Jan Kara <[email protected]> SUSE Labs, CR
Quoted 5 lines · Badari Pulavarty
Originally it was supported on ext2. I added support nobh support for ext3. At that time, the main
issue/complaint was that, these bufferheads consume memory fromZONE_NORMALcausing
memory pressure on 32-bit (i386) configurations.
Yeah, I think that's a tradeof past it's days. I'm all for nuking it, and while we're at it we should also find a better way to integrate the mpage bits. Not using them is pretty dumb, so the default aops should really be mpage if possible, else fall back without the need for different sets of aops.