From: Jan Stancek <jstancek@redhat.com>
To: Satish Gedela <satish.gedela@lge.com>
Cc: ltp-list@lists.sourceforge.net
Subject: Re: [LTP] MAP_LOCKED issue in mmap with MAP_ANYNOMOUS
Date: Fri, 20 Mar 2015 04:11:11 -0400 (EDT) [thread overview]
Message-ID: <1848532869.446726.1426839071051.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <756183AD4F83414184BA6A0635785E70A55C4B3C@LGEVEXMBAPSVC1.LGE.NET>
----- Original Message -----
> From: "Satish Gedela" <satish.gedela@lge.com>
> To: ltp-list@lists.sourceforge.net
> Sent: Friday, 20 March, 2015 6:28:34 AM
> Subject: [LTP] MAP_LOCKED issue in mmap with MAP_ANYNOMOUS
>
> Dear all,
>
> I am newbie to open source, forgive me with text format
> I am trying to run LTP with kernel 3.16 on target board having cortex A9
> processor ,
> Facing issue with below test case:
> Test script name: "memcg_function_test.sh"
> Test case description: "Test mmap(locked) + alloc_mem > limit_in_bytes"
>
> Analysis: memcg_function_test.sh -----> test_proc_kill
> ------->memcg_lib.sh
> -------->memcg_process
> memcg_process
> ------>ltp/testcases/kernel/controllers/memcg/functional/memcg_process.c
>
> mmap_lock1 () function is calling in memcg_process.c and
> it calls mmap function with flags MAP_PRIVATE | MAP_ANYNOMOUS | MAP_LOCKED
> {noformat}
> p = mmap(NULL, memsize, PROT_WRITE | PROT_READ,
> MAP_PRIVATE | MAP_LOCKED, 0, 0);
> {noformat}
>
> but man page of mmap is mentioned as:
> {noformat}
> MAP_ANONYMOUS
> The mapping is not backed by any file; its contents are
> initialized to zero. The fd and offset arguments are
> ignored; however, some implementations require fd to be -1 if
> MAP_ANONYMOUS (or MAP_ANON) is specified, and portable
> applications should ensure this. The use of MAP_ANONYMOUS in
> conjunction with MAP_SHARED is only supported on Linux
> since kernel 2.4.
> {noformat}
>
> In my case, we are trying to lock the pages with flags MAP_PRIVATE |
> MAP_ANYNOMOUS | MAP_LOCKED and it is failing.
Hi,
failing how? EINVAL or something else?
Do you see mmap14 failing as well? If so, can you run it via strace?
Regards,
Jan
> and with MAP_SHARED | MAP_ANYNOMOUS | MAP_LOCKED , it is failing
> but with MAP_PRIVATE | MAP_LOCKED and
> with MAP_SHARED | MAP_LOCKED it is working.
>
> Is there any changes made to kernel or
> test case has to update with MAP_SHARED instead of MAP_PRIVATE flag.
>
> Thank you in advance.
> Regards
> Satish.G
>
>
>
>
>
>
>
>
>
>
>
>
>
> ------------------------------------------------------------------------------
> Dive into the World of Parallel Programming The Go Parallel Website,
> sponsored
> by Intel and developed in partnership with Slashdot Media, is your hub for
> all
> things parallel software development, from weekly thought leadership blogs to
> news, videos, case studies, tutorials and more. Take a look and join the
> conversation now. http://goparallel.sourceforge.net/
> _______________________________________________
> Ltp-list mailing list
> Ltp-list@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ltp-list
>
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
next prev parent reply other threads:[~2015-03-20 8:11 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-20 5:28 [LTP] MAP_LOCKED issue in mmap with MAP_ANYNOMOUS Satish Gedela
2015-03-20 8:11 ` Jan Stancek [this message]
2015-03-20 11:42 ` Satish Gedela
2015-03-20 13:13 ` Jan Stancek
2015-03-20 14:06 ` Carmelo Amoroso
2015-03-22 6:43 ` Mike Frysinger
2015-03-23 6:53 ` 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=1848532869.446726.1426839071051.JavaMail.zimbra@redhat.com \
--to=jstancek@redhat.com \
--cc=ltp-list@lists.sourceforge.net \
--cc=satish.gedela@lge.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