[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <62ecda34-316d-6d79-cf86-d4b43f08d3dc@I-love.SAKURA.ne.jp>
Date: Wed, 24 May 2017 07:04:53 +0900
From: Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp>
To: Kefeng Wang <wangkefeng.wang@...wei.com>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, zhongjiang <zhongjiang@...wei.com>,
Qiuxishi <qiuxishi@...wei.com>,
Yisheng Xie <xieyisheng1@...wei.com>
Subject: Re: [Question] Mlocked count will not be decreased
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;
}
----------
Powered by blists - more mailing lists