From: Anthony Liguori <anthony@codemonkey.ws>
To: Alexander Graf <alex@csgraf.de>
Cc: kvm-devel <kvm-devel@lists.sourceforge.net>,
Avi Kivity <avi@qumranet.com>
Subject: Re: hugetlbfs not working
Date: Thu, 27 Mar 2008 11:07:02 -0500 [thread overview]
Message-ID: <47EBC626.4010801@codemonkey.ws> (raw)
In-Reply-To: <80C24060-EF44-44C5-96E2-C629F0A52EBD@csgraf.de>
Alexander Graf wrote:
> On Mar 27, 2008, at 4:19 PM, Avi Kivity wrote:
>
>
>> Alexander Graf wrote:
>>
>>> Hi,
>>>
>>> I'm currently trying to get hugetlbfs working on the current git
>>> version and am quite puzzled to see it not working. It appears as
>>> if the ftruncate call fails:
>>>
>>> open("/dev/hugetlbfs//kvm.vI3G8z", O_RDWR|O_CREAT|O_EXCL, 0600) = 7
>>> unlink("/dev/hugetlbfs//kvm.vI3G8z") = 0
>>> ftruncate(7, 157286400) = -1 EINVAL (Invalid
>>> argument)
>>> dup(2) = 8
>>> fcntl(8, F_GETFL) = 0x8001 (flags O_WRONLY|
>>> O_LARGEFILE)
>>> close(8) = 0
>>> write(2, "ftruncate: Invalid argument\n", 28ftruncate: Invalid
>>> argument
>>> ) = 28
>>> close(7) = 0
>>>
>>> My host kernel is a 2.6.22.
>>>
>>> Is this supposed to work? The first version did not have the
>>> ftruncate call, so maybe it doesn't work at all with hugetlbfs?
>>>
>>>
>> Are you on i386 non-pae? that has 4MB pages, while you're asking
>> for for 37.5 4MB pages.
>>
>> Try adding 2MB to the requested memory size.
>>
>
> I'm on x86_64 and /proc/meminfo tells me:
>
> HugePages_Total: 1435
> HugePages_Free: 1435
> HugePages_Rsvd: 0
> Hugepagesize: 2048 kB
>
> I also reserved all available huge pages:
>
> % cat /proc/sys/vm/nr_hugepages
> 1435
>
> Changing the guest memory size using -m does not help.
>
If you don't bail when ftruncate fails, does it work as expected for
you? Perhaps older versions of hugetlbfs didn't support truncate.
Regards,
Anthony Liguori
> Alex
>
> -------------------------------------------------------------------------
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
> _______________________________________________
> kvm-devel mailing list
> kvm-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/kvm-devel
>
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
next prev parent reply other threads:[~2008-03-27 16:07 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-27 15:10 hugetlbfs not working Alexander Graf
2008-03-27 15:19 ` Avi Kivity
2008-03-27 15:30 ` Alexander Graf
2008-03-27 16:07 ` Anthony Liguori [this message]
2008-03-27 16:09 ` Avi Kivity
2008-03-27 16:35 ` Marcelo Tosatti
2008-03-27 21:55 ` Marcelo Tosatti
[not found] ` <47EC9302.40103@qumranet.com>
2008-03-31 17:01 ` Marcelo Tosatti
2008-03-31 17:17 ` Avi Kivity
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=47EBC626.4010801@codemonkey.ws \
--to=anthony@codemonkey.ws \
--cc=alex@csgraf.de \
--cc=avi@qumranet.com \
--cc=kvm-devel@lists.sourceforge.net \
/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