All of lore.kernel.org
 help / color / mirror / Atom feed
* Hugepages don't work on the Xen Linux git tree
@ 2010-04-20  2:27 Dave McCracken
  2010-04-20 18:17 ` Jeremy Fitzhardinge
  0 siblings, 1 reply; 2+ messages in thread
From: Dave McCracken @ 2010-04-20  2:27 UTC (permalink / raw)
  Cc: Jeremy Fitzhardinge, Xen Developers List


I hadn't actually tested mainline Linux or the Xen Linux git tree in awhile, 
since we're focusing on RedHat released versions.  When I actually tried to 
use it today it fell over dead as soon as I tried to map a hugepage.

The current method for mapping hugepages does not work at all with Xen.  We 
have set_huge_pte_at() in arch/x86/include/asm/hugetlb.h which does a 
set_pte_at(), but passes it a pmd pointer and a pmd entry.  This will succeed 
on a native Linux kernel, but after passing through the paravirt vector to 
xen_set_pte_at(), it fails miserably.  It expects 
HYPERVISOR_update_va_mapping() to do the right thing and it doesn't.

The fix I have in older kernels is for set_huge_pte_at() to call set_pmd() 
instead.  However, in this brave new world of paravirt vectors, should I 
instead set up a vector for it?  What is the architecturally right thing to 
do?  However we decide to do it, expect a patch for it shortly afterward.

Thanks,
Dave McCracken

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Hugepages don't work on the Xen Linux git tree
  2010-04-20  2:27 Hugepages don't work on the Xen Linux git tree Dave McCracken
@ 2010-04-20 18:17 ` Jeremy Fitzhardinge
  0 siblings, 0 replies; 2+ messages in thread
From: Jeremy Fitzhardinge @ 2010-04-20 18:17 UTC (permalink / raw)
  To: Dave McCracken; +Cc: Xen Developers List

On 04/19/2010 07:27 PM, Dave McCracken wrote:
> The fix I have in older kernels is for set_huge_pte_at() to call set_pmd() 
> instead.  However, in this brave new world of paravirt vectors, should I 
> instead set up a vector for it?  What is the architecturally right thing to 
> do?  However we decide to do it, expect a patch for it shortly afterward.
>   

Yeah, its a bit awkward.  A huge pte is semantically a pte, but
structurally a pmd, so which should it be?  The perhaps "cleanest" fix
might be to add a set of huge pte operators, but I don't think that's
really justified given that this is a fairly specific, narrow case.

I think on balance the best thing is to make set_huge_pte_at() call
set_pmd().

    J

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-04-20 18:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-20  2:27 Hugepages don't work on the Xen Linux git tree Dave McCracken
2010-04-20 18:17 ` Jeremy Fitzhardinge

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.