[LTP] [PATCH v2 1/1] cachestat01: Reduce required space on 64kb page size

Petr Vorel pvorel@suse.cz
Wed Jul 31 21:30:51 CEST 2024


> Hi!
> > > +	num_shift = MIN(tst_device->size*1024*2.6/page_size, 15);

> > I guess that we can make it future proof by rounding the 2.6 to 3 just

> And that is on the wrong side obviously, so we should do rounding down
> to 2 or 2.2 or something along the lines.

Yes, 3* would fail.

FYI df on good, after last run:

2* => max num_shift < 9 => 1 << 8 (256 pages)
/dev/loop0     xfs      241664   20304    221360   9% /var/tmp/LTP_cacSuoazD/mntpoint
/dev/loop0     btrfs    307200   22368    207872  10% /var/tmp/LTP_cacSuoazD/mntpoint

2.5* => max num_shift < 11 => 1 << 10 (1024 pages)
Highest usage (others have 1% or even 0%):
/dev/loop0     xfs      241664   20304    221360   9% /var/tmp/LTP_cacanBaAa/mntpoint
/dev/loop0     btrfs    307200   71648    158720  32% /var/tmp/LTP_cacanBaAa/mntpoint

2.6* (or 2.7) => max num_shift < 12 => 1 << 11 (2048 pages) => last OK
Highest usage (others have 1% or even 0%):
/dev/loop0     xfs      241664   20304    221360   9% /var/tmp/LTP_cacFYiONa/mntpoint
/dev/loop0     btrfs    307200  137344     93184  60% /var/tmp/LTP_cacrzr4vk/mntpoint

Failures:
2.8* => max num_shift < 13: 1 << 12 (4096 pages) => FAIL on XFS, Btrfs
3* => max num_shift < 14 => 1 << 13 (8192 pages) FAIL on all filesystems

Problem is only with Btrfs and XFS. Others have between 0-1% (including
Bcachefs). Therefore 2.6* (or 2.7*) is IMHO still secure.
If you worry, we can have 2.5* (more secure).

Kind regards,
Petr


More information about the ltp mailing list