All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: Li Wang <liwang@redhat.com>
Cc: LTP List <ltp@lists.linux.it>
Subject: Re: [LTP] [RFC PATCH] fallocate05: increase the fallocate and defallocate size
Date: Thu, 23 Sep 2021 15:09:59 +0200	[thread overview]
Message-ID: <YUx8p515ro8Y/Z8l@yuki> (raw)
In-Reply-To: <CAEemH2f0+SL6pizzNs4syontAD5SeKmXFbVchRs=oXM-oEsEzw@mail.gmail.com>

Hi!
> Or, another way I can think of, is to cancel the tmpfs size limitation
> when MemFree is less than the twofold size to be mounted.

This would fail horribly if the machine has all RAM used but there is
plenty in buffers that should be freed.

I guess that we should really add tst_available_ram() function that
would print either MemAvailable or sum of MemFree + MemCached. And of
course we shouldn't eat more than half of that in the tests.

> --- a/lib/tst_test.c
> +++ b/lib/tst_test.c
> @@ -895,6 +895,9 @@ static const char *limit_tmpfs_mount_size(const char
> *mnt_data,
>         if (strcmp(fs_type, "tmpfs"))
>                 return mnt_data;
> 
> +       if ((SAFE_READ_MEMINFO("MemFree:") / 1024) < (tdev.size * 2))
> +               return mnt_data;

I guess that we should as well skip the tmpfs completely if we think
that the size is too small as well.

>         if (mnt_data)
>                 snprintf(buf, buf_size, "%s,size=%luM", mnt_data,
> tdev.size);
>         else
> 
> 
> -- 
> Regards,
> Li Wang

-- 
Cyril Hrubis
chrubis@suse.cz

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

  reply	other threads:[~2021-09-23 13:09 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-17 10:46 [LTP] [RFC PATCH] fallocate05: increase the fallocate and defallocate size Li Wang
2021-09-07  2:40 ` Li Wang
2021-09-07  2:40   ` Li Wang
2021-09-07  8:00     ` Jan Stancek
2021-09-07  8:00       ` Jan Stancek
2021-09-08  1:21         ` Li Wang
2021-09-08  1:21           ` Li Wang
2021-09-21 20:33 ` Ralph Siemsen
2021-09-22  5:03   ` Li Wang
2021-09-22  8:21     ` Cyril Hrubis
2021-09-22  9:53       ` Li Wang
2021-09-22  9:56         ` Cyril Hrubis
2021-09-22 10:34           ` Li Wang
2021-09-22 14:32             ` Cyril Hrubis
2021-09-22 16:52               ` Ralph Siemsen
2021-09-23  3:00                 ` Li Wang
2021-09-23  6:29                   ` Li Wang
2021-09-23 13:09                     ` Cyril Hrubis [this message]
2021-09-24  4:27                       ` Li Wang
2021-09-23 14:33                 ` Cyril Hrubis
2021-09-24  1:49                   ` Ralph Siemsen
2021-09-24  4:18                     ` Li Wang
2021-09-24 15:11                       ` Ralph Siemsen
2021-09-24 18:26                         ` Cyril Hrubis
2021-09-24 20:26                           ` Ralph Siemsen
2021-09-25  2:16                             ` Ralph Siemsen
2021-09-26  7:17                             ` Li Wang
2021-09-26  7:40                               ` Li Wang
2021-09-26  7:39                           ` Li Wang
2021-09-27  1:37                             ` Ralph Siemsen
2021-09-24  6:49                   ` Li Wang
2021-09-24  9:33                     ` Cyril Hrubis
2021-09-23  6:39       ` Li Wang
2021-09-23 13:10         ` Cyril Hrubis

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=YUx8p515ro8Y/Z8l@yuki \
    --to=chrubis@suse.cz \
    --cc=liwang@redhat.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.