All of lore.kernel.org
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH 1/2] syscalls/msgstress03: fix fork failure on small memory systems
Date: Wed, 23 Jun 2021 11:39:04 +0200	[thread overview]
Message-ID: <8dd7fb6b-c1d4-819c-9013-f19589f89eb3@canonical.com> (raw)
In-Reply-To: <60D2FEFC.8030706@fujitsu.com>

On 23/06/2021 11:28, xuyang2018.jy@fujitsu.com wrote:
> Hi Krzysztof
>> Running syscalls/msgstress03 on a system with less than ~4 GB of RAM fails:
>>
>>      msgstress03    1  TFAIL  :  msgstress03.c:155: 	Fork failed (may be OK if under stress)
>>
>> In dmesg:
>>
>>      LTP: starting msgstress03
>>      cgroup: fork rejected by pids controller in /user.slice/user-1000.slice/session-1.scope
>>
>> The reason is cgroups pid limit set by systemd user.slice.  The limit is
>> set for login session, also for root user.  For example on 2 GB RAM
>> machine it is set as:
>>      /sys/fs/cgroup/pids/user.slice/user-0.slice/pids.max:5207
> This file only exists on cgroupv1 and cgroupv2 should use
> /sys/fs/cgroup/user.slice/user-0.slice/pids.max.

I can use both paths.

> 
> Also if some embedded system doesn't have systemd, do we have a generic 
> way or fallback way to calculate the pid max?

This slice is set by systemd, so no-systemd systems are out of scope
because:
1. They will not be affected by this.
2. The limits there might be set by other init manager so other patch
should come in. Making a generic solution for unknown-init-managers is a
much bigger task and not necessarily needed,


Best regards,
Krzysztof

  reply	other threads:[~2021-06-23  9:39 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-22 11:14 [LTP] [PATCH 1/2] syscalls/msgstress03: fix fork failure on small memory systems Krzysztof Kozlowski
2021-06-22 11:14 ` [LTP] [PATCH 2/2] syscalls/msgstress04: " Krzysztof Kozlowski
2021-06-23  9:28 ` [LTP] [PATCH 1/2] syscalls/msgstress03: " xuyang2018.jy
2021-06-23  9:39   ` Krzysztof Kozlowski [this message]
2021-06-23 10:36 ` Cyril Hrubis
2021-06-23 11:27   ` Krzysztof Kozlowski
2021-06-23 11:18     ` 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=8dd7fb6b-c1d4-819c-9013-f19589f89eb3@canonical.com \
    --to=krzysztof.kozlowski@canonical.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.