From: Petr Vorel <pvorel@suse.cz>
To: Li Wang <liwang@redhat.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH] mmap_24-1: update code comments
Date: Mon, 12 May 2025 15:26:29 +0200 [thread overview]
Message-ID: <20250512132629.GA213602@pevik> (raw)
In-Reply-To: <20250509123410.22406-1-liwang@redhat.com>
Hi Li,
> Follow-up: mmap_24-1: Change vm.max_map_count if needed
Thanks!
...
> +++ b/testcases/open_posix_testsuite/conformance/interfaces/mmap/24-1.c
> @@ -7,15 +7,23 @@
> * source tree.
> *
> * The mmap() function shall fail if:
> - * [ENOMEM] MAP_FIXED was specified, and the range [addr,addr+len)
> + * [ENOMEM] MAP_FIXED was specified, and the range [addr, addr+len)
> * exceeds that allowed for the address space of a process;
> - * or, if MAP_FIXED was not specified and
> - * there is insufficient room in the address space to effect the mapping.
> + * or, if MAP_FIXED was not specified and there is insufficient room
> + * in the address space to effect the mapping;
> + * or, if the process exceeds the maximum number of allowed memory mappings
> + * (as defined by /proc/sys/vm/max_map_count).
> *
> * Test Steps:
> - * 1. In a very long loop, keep mapping a shared memory object,
> - * until there this insufficient room in the address space;
> - * 3. Should get ENOMEM.
> + * 1. In a very long loop, continuously map a shared memory object without
> + * unmapping previous ones.
> + * 2. The loop continues until mmap() fails with ENOMEM.
> + *
> + * Note:
> + * This failure may occur due to either exhausting the process's
> + * virtual address space, or hitting the system-wide limit on
> + * the number of memory mappings (especially on systems with large RAM).
> + *
nit: please remove before commit this blank line.
Reviewed-by: Petr Vorel <pvorel@suse.cz>
Kind regards,
Petr
> */
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2025-05-12 13:26 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-09 11:32 [LTP] [PATCH v2] mmap_24-1: Change vm.max_map_count if needed Martin Doucha
2025-05-09 12:08 ` Li Wang via ltp
2025-05-12 13:28 ` Petr Vorel
2025-05-09 12:34 ` [LTP] [PATCH] mmap_24-1: update code comments Li Wang via ltp
2025-05-09 13:28 ` Martin Doucha
2025-05-12 13:26 ` Petr Vorel [this message]
2025-05-12 14:35 ` Li Wang via ltp
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=20250512132629.GA213602@pevik \
--to=pvorel@suse.cz \
--cc=liwang@redhat.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox