All of lore.kernel.org
 help / color / mirror / Atom feed
From: Keshav Darak <keshav_darak@yahoo.com>
To: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: xen-devel@lists.xensource.com
Subject: Re: PATCH: Hugepage support for Domains booting with 4KB pages
Date: Tue, 22 Mar 2011 11:05:14 -0700 (PDT)	[thread overview]
Message-ID: <970792.33869.qm@web59602.mail.ac4.yahoo.com> (raw)


Konrad,

Thanks for reviewing the patch.

>> We have implemented hugepage support for guests in following manner
>> 
>> In
>>  our implementation we added a parameter hugepage_num which is specified
>>  in the config file of the DomU. It is the number of hugepages that the 
>> guest is guaranteed to receive whenever the kernel asks for hugepage by 
>> using its boot time parameter or reserving after booting (eg. Using echo
>>  XX > /proc/sys/vm/nr_hugepages). During creation of the domain we 
>> reserve MFN's for these hugepages and store them in the list. The 

>There is bootup option for normal Linux kernels to set that up. Was
>that something you could use?

ya, it can be used too, to allocate the hugepages.

>> 
>> static inline int arch_prepare_hugepage(struct page *page)
>> {
>>index f46c340..00c489a 100644
>>--- a/arch/x86/mm/hugetlbpage.c
>>+++ b/arch/x86/mm/hugetlbpage.c
>>@@ -147,8 +147,7 @@ pte_t *huge_pte_alloc(struct mm_struct *mm,
>>             pte = (pte_t *) pmd_alloc(mm, pud, addr);
>>         }
>>     }
>>-    BUG_ON(pte && !pte_none(*pte) && !pte_huge(*pte));
>>-
>>+    BUG_ON(pte && !pte_none(*pte) && !((*pte).pte & (_AT(pteval_t, 1)<<7)));

>Ugh. That is horrible.

>why can't you use 'pte_huge' ? Is it b/c of this
> * (We should never see kernel mappings with _PAGE_PSE set,
> * but we could see hugetlbfs mappings, I think.).
> */

Here actually we don't known the exact reason, but when pte_huge was used the BUG_ON was called even though the PSE bit was set, so we had to rewrite the BUG_ON testing the 7th bit.there could be better ways to do it, But we couldn't find the exact reasons why was it(pte_huge) returning 0 even when the pte was a huge_pte.    


we will try to resolve other issues with the patch as soon as possible. 

--
Keshav Darak
Kaustubh Kabra
Ashwin Vasani
Aditya Gadre




             reply	other threads:[~2011-03-22 18:05 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-22 18:05 Keshav Darak [this message]
  -- strict thread matches above, loose matches on Subject: below --
2011-03-21 21:01 PATCH: Hugepage support for Domains booting with 4KB pages Keshav Darak
2011-03-21 21:31 ` Keir Fraser
2011-03-22 12:36   ` Keshav Darak
2011-03-22 14:07     ` Keir Fraser
2011-03-20 22:34 Keshav Darak
2011-03-22 16:49 ` Konrad Rzeszutek Wilk

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=970792.33869.qm@web59602.mail.ac4.yahoo.com \
    --to=keshav_darak@yahoo.com \
    --cc=konrad.wilk@oracle.com \
    --cc=xen-devel@lists.xensource.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.