From: Petr Vorel <pvorel@suse.cz>
To: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH 1/1] tst_pids.c: fix fork failure on small memory systems
Date: Tue, 7 Feb 2023 14:42:22 +0100 [thread overview]
Message-ID: <Y+JVPi5jo++joA/g@pevik> (raw)
In-Reply-To: <20230207124008.1788759-1-ycliang@andestech.com>
Hi Leo,
> Running syscalls/msgstress03 on a system with less than ~1 GB of RAM fails:
> msgstress03 1 TFAIL : msgstress03.c:163: Fork failed (may be OK if under stress)
> The reason is that besides /proc/sys/kernel/pid_max, /proc/sys/kernel/threads-max
> is another factor determining how many processes a system could create.
> Use the smaller number between pid_max and threads-max as the nprocs.
Makes sense.
Reviewed-by: Petr Vorel <pvorel@suse.cz>
BTW IMHO it'd be better to rewrite
f = popen("ps -eT | wc -l", "r");
to list count of /proc/[0-9]*/ in plain C (TODO for us).
Kind regards,
Petr
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2023-02-07 13:42 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-07 12:40 [LTP] [PATCH 1/1] tst_pids.c: fix fork failure on small memory systems Leo Yu-Chi Liang
2023-02-07 13:42 ` Petr Vorel [this message]
2023-02-07 16:33 ` Jan Stancek
2023-02-09 13:35 ` Leo Liang
2023-02-09 13:49 ` Petr Vorel
2023-02-09 13:05 ` Cyril Hrubis
2023-02-09 13:36 ` Leo Liang
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=Y+JVPi5jo++joA/g@pevik \
--to=pvorel@suse.cz \
--cc=ltp@lists.linux.it \
--cc=ycliang@andestech.com \
/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