fs/ramfs/inode.c | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-)
From: Pankaj Raghav <p.raghav@samsung.com> Add block size > page size to ramfs as we support minimum folio order allocation in the page cache. The changes are very minimal, and this is also a nice way to stress test just the page cache changes for minimum folio order. I tested the changes from blocksize 4k to 2M with ltp's fsx on an x86 machine. I ran a basic perf test with dd as follows: $ mount ramfs -t ramfs -o blocksize=$bs /media/test/ $ dd if=/mnt/rand of="/media/test/rand" bs=2M count=2048 +------+----------+ | bs | BW(GB/s) | +------+----------+ | 4k | 1.7 | | 8k | 2.4 | | 16k | 3.2 | | 32k | 4.0 | | 64k | 4.5 | | 128k | 4.8 | | 256k | 5.3 | | 512k | 5.5 | | 1M | 5.6 | | 2M | 5.6 | +------+----------+ We get better performance for larger bs as we allocate larger folios instead of multiple smaller folios when there is no memory fragmentation and pressure. Pankaj Raghav (2): ramfs: add blocksize mount option ramfs: enable block size > page size fs/ramfs/inode.c | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) base-commit: 4d0326b60bb753627437fff0f76bf1525bcda422 -- 2.44.1
On Tue, Sep 24, 2024 at 09:23:49PM +0200, Pankaj Raghav (Samsung) wrote: > Add block size > page size to ramfs as we support minimum folio order > allocation in the page cache. The changes are very minimal, and this is > also a nice way to stress test just the page cache changes for minimum > folio order. I don't really see the point of upstreaming this. I'm sure it was useful for your testing. And splitting the patch in two makes no sense to me; the combined patch is not large. > Pankaj Raghav (2): > ramfs: add blocksize mount option > ramfs: enable block size > page size > > fs/ramfs/inode.c | 27 +++++++++++++++++++++++++-- > 1 file changed, 25 insertions(+), 2 deletions(-)
On Tue, Sep 24, 2024 at 09:00:26PM +0100, Matthew Wilcox wrote: > On Tue, Sep 24, 2024 at 09:23:49PM +0200, Pankaj Raghav (Samsung) wrote: > > Add block size > page size to ramfs as we support minimum folio order > > allocation in the page cache. The changes are very minimal, and this is > > also a nice way to stress test just the page cache changes for minimum > > folio order. > > I don't really see the point of upstreaming this. I'm sure it was > useful for your testing. And splitting the patch in two makes no sense > to me; the combined patch is not large. I just wanted to put it out in the wild to see if somebody found it useful as it was pretty trivial to add the support. Also, the first series that tried adding support for LBS in the kernel 17 years ago used ramfs as an example :). The only use case I could come up with was testing the folio order changes in the page cache without having to use a more complicated FS like XFS. In that sense it is still useful to add this feature I guess considering the minimal changes? -- Pankaj
© 2016 - 2024 Red Hat, Inc.