From: Eric B Munson <emunson@mgebm.net>
To: CAI Qian <caiqian@redhat.com>
Cc: Michal Hocko <mhocko@suse.cz>, linux-mm <linux-mm@kvack.org>
Subject: Re: [RFC] /sys/kernel/mm/hugepages/hugepages-1048576kB/nr_overcommit_hugepages
Date: Tue, 4 Jan 2011 10:21:18 -0700 [thread overview]
Message-ID: <20110104172118.GB3190@mgebm.net> (raw)
In-Reply-To: <1343872597.121624.1294136506889.JavaMail.root@zmail06.collab.prod.int.phx2.redhat.com>
[-- Attachment #1: Type: text/plain, Size: 2417 bytes --]
On Tue, 04 Jan 2011, CAI Qian wrote:
>
> > > 3) overcommit 2gb hugepages.
> > > mmap(NULL, 18446744071562067968, PROT_READ|PROT_WRITE, MAP_SHARED,
> > > 3, 0) = -1 ENOMEM (Cannot allocate memory)
> >
> > Hmm, you are trying to reserve/mmap a lot of memory (17179869182 1GB
> > huge pages).
> That is strange - the test code merely did this,
> addr = mmap(ADDR, 2<<30, PROTECTION, FLAGS, fd, 0);
>
> Do you know if overcommit was designed for 1GB pages? At least, read this
> from Documentation/kernel-parameters.txt,
>
> hugepagesz=
> ...
> Note that 1GB pages can only be allocated at boot time
> using hugepages= and not freed afterwards.
>
> How does it allow to be overcommitted for only being able to allocate at
> boot time?
It does not, huge page sizes that have to be allocated at boot can not be
overcommitted as the pool size cannot change after boot.
>
> > > Also, nr_overcommit_hugepages was overwritten with such a strange
> > > value after overcommit failure. Should we just remove this file from
> > > sysfs for simplicity?
I don't think having pagesize+arch specific logic here is going to scale (we
would need to check for 16GB pages on ppc64 as well because they have the same
restrictions as 1GB pages on x86_64) but 1GB pages might be fine to overcommit
on ia64. Perhaps the documentation needs to change to call this out specifically.
> >
> > This is strange. The value is set only in hugetlb_overcommit_handler
> > which is a sysctl handler.
> >
> > Are you sure that you are not changing the value by the /sys interface
> > somewhere (there is no check for the value so you can set what-ever
> > value you like)? I fail to see any mmap code path which would change
> > this value.
> I could double-check here, but it is not important if the fact is that
> overcommit is not supported for 1GB pages.
>
> > Btw. which kernel version are you using.
> mmotm 2010-12-02-16-34 version 2.6.37-rc4-mm1+. This problem is also present
> in 2.6.18.
>
> Thanks.
>
> CAI Qian
>
> --
> 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/ .
> Fight unfair telecom policy in Canada: sign http://dissolvethecrtc.ca/
> Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
>
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 490 bytes --]
prev parent reply other threads:[~2011-01-04 17:21 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1060163918.101411.1293793346203.JavaMail.root@zmail06.collab.prod.int.phx2.redhat.com>
2010-12-31 11:08 ` CAI Qian
2011-01-04 9:56 ` Michal Hocko
2011-01-04 10:21 ` CAI Qian
2011-01-04 10:52 ` Michal Hocko
2011-01-05 4:52 ` CAI Qian
2011-01-05 8:43 ` Michal Hocko
2011-01-05 8:54 ` CAI Qian
2011-01-05 9:51 ` Michal Hocko
2011-01-05 15:36 ` CAI Qian
2011-01-05 15:59 ` Michal Hocko
2011-01-05 16:42 ` CAI Qian
2011-01-05 16:44 ` Michal Hocko
2011-01-05 17:00 ` CAI Qian
2011-01-05 20:59 ` Andrew Morton
2011-01-06 10:04 ` PATCH: hugetlb: handle NODEMASK_ALLOC failure correctly Michal Hocko
2011-01-06 20:38 ` Andrew Morton
2011-01-06 22:23 ` Michal Hocko
2011-01-04 17:21 ` Eric B Munson [this message]
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=20110104172118.GB3190@mgebm.net \
--to=emunson@mgebm.net \
--cc=caiqian@redhat.com \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.cz \
/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