public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Leo Liang <ycliang@andestech.com>
To: Petr Vorel <pvorel@suse.cz>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH 1/1] tst_pids.c: fix fork failure on small memory systems
Date: Thu, 9 Feb 2023 13:35:39 +0000	[thread overview]
Message-ID: <Y+T2qzXrZcGK/EQt@ubuntu01> (raw)
In-Reply-To: <Y+JVPi5jo++joA/g@pevik>

Hi Petr,

On Tue, Feb 07, 2023 at 02:42:22PM +0100, Petr Vorel wrote:
> 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).
>

Thanks for the review!
I could send a v2 to add this as well.

Best regards,
Leo

> Kind regards,
> Petr

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

  parent reply	other threads:[~2023-02-09 13:36 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
2023-02-07 16:33   ` Jan Stancek
2023-02-09 13:35   ` Leo Liang [this message]
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+T2qzXrZcGK/EQt@ubuntu01 \
    --to=ycliang@andestech.com \
    --cc=ltp@lists.linux.it \
    --cc=pvorel@suse.cz \
    /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