Message ID | 20240120230824.2619716-1-willy@infradead.org |
---|---|
Headers | show |
Series | ubifs folio conversion | expand |
Matthew, ----- Ursprüngliche Mail ----- > Von: "Matthew Wilcox" <willy@infradead.org> > An: "richard" <richard@nod.at> > CC: "Matthew Wilcox" <willy@infradead.org>, "linux-mtd" <linux-mtd@lists.infradead.org> > Gesendet: Sonntag, 21. Januar 2024 00:08:08 > Betreff: [PATCH 00/15] ubifs folio conversion > This patchset converts ubifs to use folios throughout. I made some > attempt to support large folios, but more work definitely needs to be > done before it can be enabled. It's not clear to me whether it's worth > doing, so I've left that for you ;-) what is the benefit of large folios? > The first patch fixes a misplaced call to SetPageUptodate which has been > with us since the initial merge of ubifs. It looks to be a pretty hard > race to hit, which is why it probably hasn't affected anyone. Thanks a lot for identifying and fixing this one! > With my usual test config, this saves about 2kB of kernel text (almost > 1%). Some functions shrink more than others, eg ubifs_write_begin > reduces by almost a third. YMMV with different configs. > > I've done a few other updates while I'm in here; eg setting/clearing > PageError is pointless because the VFS doesn't use it and ubifs doesn't > test it. And we're phasing out use of PagePrivate / folio_test_private() > in favour of just testing whether folio->private is set. > > I ran this through xfstests and it didn't seem any worse. Can you recommend a specific real load workload to stress test your changes? Thanks, //richard
On Tue, Jan 23, 2024 at 08:33:49AM +0100, Richard Weinberger wrote: > Matthew, > > ----- Ursprüngliche Mail ----- > > Von: "Matthew Wilcox" <willy@infradead.org> > > An: "richard" <richard@nod.at> > > CC: "Matthew Wilcox" <willy@infradead.org>, "linux-mtd" <linux-mtd@lists.infradead.org> > > Gesendet: Sonntag, 21. Januar 2024 00:08:08 > > Betreff: [PATCH 00/15] ubifs folio conversion > > > This patchset converts ubifs to use folios throughout. I made some > > attempt to support large folios, but more work definitely needs to be > > done before it can be enabled. It's not clear to me whether it's worth > > doing, so I've left that for you ;-) > > what is the benefit of large folios? For another purpose, I just wrote this up. Possibly there are more benefits, but these are the ones I remembered just now: But why should a filesystem put in the effort to support large folios (aka multi-page folios)? Lower overheads Fewer calls to the page allocator Shorter LRU list helps vmscan age memory Fewer calls to the page cache for large read()/write() Fewer calls to the architecture code for handling faults in mmaped files Potential use of larger TLB entries (eg contPTE / NAPOT) Being a better kernel citizen The more code using large folios, the easier it is to allocate large folios The costs may outweigh the benefits. I would not invest time in making iso9660, adfs or efs support large folios. But for filesystems which are used every day (XFS, NFS, ext4, btrfs, ...) the benefit is very much worth the cost. > > I ran this through xfstests and it didn't seem any worse. > > Can you recommend a specific real load workload to stress test your changes? Not really. Everything should work just as it did before. I doubt you'd be able to see any performance differences with, eg, a kernel compile. There's usually a few % gain when enabling large folios.
在 2024/1/24 13:01, Matthew Wilcox 写道: > On Tue, Jan 23, 2024 at 08:33:49AM +0100, Richard Weinberger wrote: >> Matthew, >> >> ----- Ursprüngliche Mail ----- >>> Von: "Matthew Wilcox" <willy@infradead.org> >>> An: "richard" <richard@nod.at> >>> CC: "Matthew Wilcox" <willy@infradead.org>, "linux-mtd" <linux-mtd@lists.infradead.org> >>> Gesendet: Sonntag, 21. Januar 2024 00:08:08 >>> Betreff: [PATCH 00/15] ubifs folio conversion >> >>> This patchset converts ubifs to use folios throughout. I made some >>> attempt to support large folios, but more work definitely needs to be >>> done before it can be enabled. It's not clear to me whether it's worth >>> doing, so I've left that for you ;-) >> >> what is the benefit of large folios? > > For another purpose, I just wrote this up. Possibly there are more > benefits, but these are the ones I remembered just now: > > But why should a filesystem put in the effort to support large folios > (aka multi-page folios)? > > Lower overheads > Fewer calls to the page allocator > Shorter LRU list helps vmscan age memory > Fewer calls to the page cache for large read()/write() > Fewer calls to the architecture code for handling faults in mmaped files > Potential use of larger TLB entries (eg contPTE / NAPOT) > Being a better kernel citizen > The more code using large folios, the easier it is to allocate large folios > > The costs may outweigh the benefits. I would not invest time in making > iso9660, adfs or efs support large folios. But for filesystems which > are used every day (XFS, NFS, ext4, btrfs, ...) the benefit is very much > worth the cost. Ext4 could gain a good performance based on large folio[1], one important reason is that blocks allocation method is changed as batch allocation from one by one. There is a difference between UBIFS and ext4 on IO logic, so I'm not sure how much performance the large folio will bring to UBIFS. I think page will be replaced by folio some day, so these patches can be a folio switching and a preparation for large folio support on UBIFS, personally I think. [1] https://lwn.net/Articles/956575/
On Sat, Jan 20, 2024 at 11:08:08PM +0000, Matthew Wilcox (Oracle) wrote: > This patchset converts ubifs to use folios throughout. I made some > attempt to support large folios, but more work definitely needs to be > done before it can be enabled. It's not clear to me whether it's worth > doing, so I've left that for you ;-) It's been four weeks ... do I need to do anything to make sure this hits the next merge window?
----- Ursprüngliche Mail ----- > Von: "Matthew Wilcox" <willy@infradead.org> > On Sat, Jan 20, 2024 at 11:08:08PM +0000, Matthew Wilcox (Oracle) wrote: >> This patchset converts ubifs to use folios throughout. I made some >> attempt to support large folios, but more work definitely needs to be >> done before it can be enabled. It's not clear to me whether it's worth >> doing, so I've left that for you ;-) > > It's been four weeks ... do I need to do anything to make sure this hits > the next merge window? Nope, I'll add it to ubifs/next soon. :-) Thanks, //richard
----- Ursprüngliche Mail ----- > ----- Ursprüngliche Mail ----- >> Von: "Matthew Wilcox" <willy@infradead.org> >> On Sat, Jan 20, 2024 at 11:08:08PM +0000, Matthew Wilcox (Oracle) wrote: >>> This patchset converts ubifs to use folios throughout. I made some >>> attempt to support large folios, but more work definitely needs to be >>> done before it can be enabled. It's not clear to me whether it's worth >>> doing, so I've left that for you ;-) >> >> It's been four weeks ... do I need to do anything to make sure this hits >> the next merge window? > > Nope, I'll add it to ubifs/next soon. :-) I'm not sure whether you're checking the MTD patchwork status. So, patches applied. :) Thanks, //richard