Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1648150
| From | Kefeng Wang <wangkefeng.wang@huawei.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [Question] Mlocked count will not be decreased |
| Date | 2017-05-23 16:50 +0200 |
| Message-ID | <tKjih-4vy-9@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
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?
Thanks,
Kefeng
[1] testcase
linux:~ # cat test_mlockall.sh
grep Mlocked /proc/meminfo
for j in `seq 0 10`
do
for i in `seq 4 15`
do
./p_mlockall >> log &
done
sleep 0.2
done
grep Mlocked /proc/meminfo
linux:~ # cat p_mlockall.c
#include <sys/mman.h>
#include <stdlib.h>
#include <stdio.h>
#define SPACE_LEN 4096
int main(int argc, char ** argv)
{
int ret;
void *adr = malloc(SPACE_LEN);
if (!adr)
return -1;
ret = mlockall(MCL_CURRENT | MCL_FUTURE);
printf("mlcokall ret = %d\n", ret);
ret = munlockall();
printf("munlcokall ret = %d\n", ret);
free(adr);
return 0;
}
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[Question] Mlocked count will not be decreased Kefeng Wang <wangkefeng.wang@huawei.com> - 2017-05-23 16:50 +0200
Re: [Question] Mlocked count will not be decreased Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> - 2017-05-24 00:10 +0200
Re: [Question] Mlocked count will not be decreased Yisheng Xie <xieyisheng1@huawei.com> - 2017-05-24 10:40 +0200
Re: [Question] Mlocked count will not be decreased Kefeng Wang <wangkefeng.wang@huawei.com> - 2017-05-24 11:00 +0200
Re: [Question] Mlocked count will not be decreased Vlastimil Babka <vbabka@suse.cz> - 2017-05-24 12:40 +0200
Re: [Question] Mlocked count will not be decreased Vlastimil Babka <vbabka@suse.cz> - 2017-05-24 12:50 +0200
Re: [Question] Mlocked count will not be decreased Xishi Qiu <qiuxishi@huawei.com> - 2017-05-24 13:00 +0200
Re: [Question] Mlocked count will not be decreased Xishi Qiu <qiuxishi@huawei.com> - 2017-05-24 13:50 +0200
Re: [Question] Mlocked count will not be decreased Vlastimil Babka <vbabka@suse.cz> - 2017-05-24 14:00 +0200
Re: [Question] Mlocked count will not be decreased Xishi Qiu <qiuxishi@huawei.com> - 2017-05-24 14:20 +0200
Re: [Question] Mlocked count will not be decreased Vlastimil Babka <vbabka@suse.cz> - 2017-05-24 15:20 +0200
csiph-web