[LTP] [RFC PATCH] fallocate05: increase the fallocate and defallocate size
Li Wang
liwang@redhat.com
Wed Sep 22 11:53:53 CEST 2021
On Wed, Sep 22, 2021 at 4:21 PM Cyril Hrubis <chrubis@suse.cz> wrote:
> Hi!
> > > This change appears seems to be causing fallocate05 test to reliably
> > > trigger OOM (out of memory) on my test machine, which has only 256MB
> > > RAM.
> > >
> >
> > Thanks for reporting the failure. We purposely increase the size of
> > fallocate
> > to reduce interference from metadata changing. But not clear how much
> > size should be a proper value for a small system.
> >
> > Can you try with decrease the number of FALLOCATE_BLOCKS?
> >
> > i.e.
> >
> > #define FALLOCATE_BLOCKS 64
> > #define DEALLOCATE_BLOCKS 16
> >
> > Or, what about other multiple sizes, test result?
>
> Looking at the test I do not think there is a reason to allocate more
> than a two or four blocks for the buffer. We just need to write() to the
> fallocated area in a loop one block at a time until it's full. I do not
> think that it's a good idea to pass ~100MB buffer to a single write()
> and expect it to succeed anyways.
>
Sounds practical.
Btw, If we don't create such a larger buffer area, then we have to
count the loop times must as equal to bufsize/blocksize. Otherwise,
we can't guarantee the test behavior is correct.
--
Regards,
Li Wang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linux.it/pipermail/ltp/attachments/20210922/35c43f12/attachment.htm>
More information about the ltp
mailing list