linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
To: Kefeng Wang <wangkefeng.wang@huawei.com>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	zhongjiang <zhongjiang@huawei.com>,
	Qiuxishi <qiuxishi@huawei.com>,
	Yisheng Xie <xieyisheng1@huawei.com>
Subject: Re: [Question] Mlocked count will not be decreased
Date: Wed, 24 May 2017 07:04:53 +0900	[thread overview]
Message-ID: <62ecda34-316d-6d79-cf86-d4b43f08d3dc@I-love.SAKURA.ne.jp> (raw)
In-Reply-To: <a61701d8-3dce-51a2-5eaf-14de84425640@huawei.com>

Kefeng Wang wrote:
> Hi All,
> 
> Mlocked in meminfo will be increasing with an small testcase, and never be released in mainline,
> here is a testcase[1] to reproduce the issue, but the centos7.2/7.3 will not increase.
> 
> Is it normal?

I confirmed your problem also occurs in Linux 4.11 using below testcase.
MemFree is not decreasing while Mlocked is increasing.
Thus, it seems to be statistics accounting bug.

----------
#include <sys/mman.h>
#include <stdlib.h>
#include <unistd.h>

int main(int argc, char ** argv)
{
	int i;
	for (i = 0; i < 128; i++)
		if (fork() == 0) {
			malloc(1048576);
			while (1) {
				mlockall(MCL_CURRENT | MCL_FUTURE);
				munlockall();
			}
		}
	return 0;
}
----------

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2017-05-23 22:05 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-23 14:41 Kefeng Wang
2017-05-23 22:04 ` Tetsuo Handa [this message]
2017-05-24  8:32 ` Yisheng Xie
2017-05-24  8:57   ` Kefeng Wang
2017-05-24 10:32   ` Vlastimil Babka
2017-05-24 10:42     ` Vlastimil Babka
2017-05-24 10:49     ` Xishi Qiu
2017-05-24 11:38     ` Xishi Qiu
2017-05-24 11:52       ` Vlastimil Babka
2017-05-24 12:10         ` Xishi Qiu
2017-05-24 13:16           ` Vlastimil Babka
2017-05-25  1:16             ` Xishi Qiu
2017-05-25  6:12               ` Vlastimil Babka
2017-05-25  1:00         ` Yisheng Xie

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=62ecda34-316d-6d79-cf86-d4b43f08d3dc@I-love.SAKURA.ne.jp \
    --to=penguin-kernel@i-love.sakura.ne.jp \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=qiuxishi@huawei.com \
    --cc=wangkefeng.wang@huawei.com \
    --cc=xieyisheng1@huawei.com \
    --cc=zhongjiang@huawei.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