public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: Cyril Hrubis <chrubis@suse.cz>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v2 1/1] cachestat01: Reduce required space on 64kb page size
Date: Wed, 31 Jul 2024 21:30:51 +0200	[thread overview]
Message-ID: <20240731193051.GA1428673@pevik> (raw)
In-Reply-To: <ZqoUaJ4sc30EHzNm@yuki>

> 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

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  reply	other threads:[~2024-07-31 19:31 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-31  7:34 [LTP] [PATCH v2 1/1] cachestat01: Reduce required space on 64kb page size Petr Vorel
2024-07-31 10:32 ` Cyril Hrubis
2024-07-31 10:39   ` Cyril Hrubis
2024-07-31 19:30     ` Petr Vorel [this message]
2024-08-01  9:00       ` Cyril Hrubis
2024-08-01  9:14         ` Petr Vorel
2024-10-18  7:50           ` Hongchen Zhang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240731193051.GA1428673@pevik \
    --to=pvorel@suse.cz \
    --cc=chrubis@suse.cz \
    --cc=ltp@lists.linux.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox