All of lore.kernel.org
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH] mem/overcommit_memory.c: Fix "CommitLimit < Committed_AS" error in some situations
Date: Mon, 3 Dec 2018 21:27:56 +0100	[thread overview]
Message-ID: <20181203202755.GA8919@x230> (raw)
In-Reply-To: <1539938660-18786-1-git-send-email-yangx.jy@cn.fujitsu.com>

Hi Xiao,

> By default, system with overcommit_memory=2 will ensure "CommitLimit >=
> Committed_AS" when setting overcommit_ratio.  But we change overcommit_ratio
> to a random value forcely, so it's possible to decrease CommitLimit less
> than current Committed_AS when setting overcommit_ratio to a quite small
> value(e.g. 0).

> For example, there are 5G physical memory, 4G swap and 5G allocated memory
> (i.e. Committed_AS) on system, and then running overcommit_memory02(i.e.
> overcommit_memory -R 0) always triggers the "CommitLimit < Committed_AS"
> error:
> ----------------------------------------------------------------------
> mem.c:839: INFO: set overcommit_ratio to 0
> mem.c:839: INFO: set overcommit_memory to 2
> overcommit_memory.c:235: INFO: CommitLimit is 4194300, Committed_AS is 5405908
> overcommit_memory.c:237: BROK: Unexpected error: CommitLimit < Committed_AS
> ----------------------------------------------------------------------

> We try to skip test if setting a small value of overcommit_ratio results in
> "CommitLimit < Committed_AS".

> Fix: #215

> Signed-off-by: Xiao Yang <yangx.jy@cn.fujitsu.com>
Reviewed-by: Petr Vorel <pvorel@suse.cz>

> ---
>  .../kernel/mem/tunable/overcommit_memory.c    | 30 ++++++++++++-------
>  1 file changed, 20 insertions(+), 10 deletions(-)


Kind regards,
Petr

  reply	other threads:[~2018-12-03 20:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-19  8:44 [LTP] [PATCH] mem/overcommit_memory.c: Fix "CommitLimit < Committed_AS" error in some situations Xiao Yang
2018-12-03 20:27 ` Petr Vorel [this message]
2018-12-20 10:42   ` Cristian Marussi
2018-12-20 12:03     ` Petr Vorel

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=20181203202755.GA8919@x230 \
    --to=pvorel@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.