From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH v3 1/2] syscalls/fcntl30: clean up && add more range test
Date: Mon, 24 Feb 2020 15:20:34 +0100 [thread overview]
Message-ID: <20200224142034.GA2210@rei> (raw)
In-Reply-To: <8d1a7c73-7122-2c3d-6a73-024bed066966@cn.fujitsu.com>
Hi!
> > I was playing with the test and it seems that the kernel allocation may
> > fail even for much smaller sizes for various reasons. I guess that
> > memory framentation on long running systems may be the culprit here
> > because kmalloc() allocates physically continuous memory.
> >
> > I guess that the safest bet here would be limiting the maximal size we
> > try to resize the pipe and succeed to something as 8MB which would be
> > something as 32 pages to allocate.
> >
> Agree.
> > At the same time I would just define the size we expect to fail with
> > ENOMEM to 1<<30 and that would save us from this architecture specific
> > trickery that will probably fail on stranger architectures anyway.
> On 64kb page size, it will over 1 <<30 for ENOMEM error .I think we can
> test MAX_SIZE+pg_size(< 1<<31) for ENOMEM error. If beyond 1<<31,
> expect EINVAL error.
Hmm, maybe we can just double the size in a loop until we hit either
ENOMEM or EINVAL then and fail the test if we hit them too soon.
--
Cyril Hrubis
chrubis@suse.cz
next prev parent reply other threads:[~2020-02-24 14:20 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-22 9:47 [LTP] [PATCH v2 1/2] syscalls/fcntl30: clean up && add more range test Yang Xu
2020-01-22 9:47 ` [LTP] [PATCH v2 2/2] syscalls/fcntl37: add error test for fcntl with F_SETPIPE_SZ Yang Xu
2020-01-27 16:27 ` Cyril Hrubis
2020-02-05 13:50 ` Yang Xu
2020-01-27 16:20 ` [LTP] [PATCH v2 1/2] syscalls/fcntl30: clean up && add more range test Cyril Hrubis
2020-02-05 13:46 ` Yang Xu
2020-02-21 14:16 ` Cyril Hrubis
2020-02-06 6:04 ` [LTP] [PATCH v3 " Yang Xu
2020-02-06 6:04 ` [LTP] [PATCH v3 2/2] syscalls/fcntl37: add error test for fcntl with F_SETPIPE_SZ Yang Xu
2020-03-17 15:24 ` Cyril Hrubis
2020-02-21 16:03 ` [LTP] [PATCH v3 1/2] syscalls/fcntl30: clean up && add more range test Cyril Hrubis
2020-02-24 2:41 ` Yang Xu
2020-02-24 14:20 ` Cyril Hrubis [this message]
2020-02-25 10:20 ` Yang Xu
2020-02-28 9:41 ` Yang Xu
2020-03-18 11:02 ` Cyril Hrubis
2020-03-19 5:10 ` Yang Xu
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=20200224142034.GA2210@rei \
--to=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 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.