All of lore.kernel.org
 help / color / mirror / Atom feed
* RE: address space reorganization
@ 2005-04-14  2:26 Ian Pratt
  2005-04-14  3:08 ` Jacob Gorm Hansen
  0 siblings, 1 reply; 14+ messages in thread
From: Ian Pratt @ 2005-04-14  2:26 UTC (permalink / raw)
  To: Jacob Gorm Hansen, Keir Fraser; +Cc: xen-devel, Gerd Knorr

> > We need generally to think about how flexible we want to be in 
> > allowing migration between different machine 
> configurations. Shoudl we 
> > require identical h/w specs, or allow differences in I/O 
> devices, CPU 
> > and/or memory? We will already have to be careful about downgrading 
> > cpu specs when we migrate (e.g., Linux locks onto using multimedia 
> > instructions for software raid that are unavailable post-migrate).
> 
> Why not treat the functions that use special mm-instructions 
> (like the software RAID code) as critical sections that 
> cannot overlap with migration, and then have the guestOS 
> re-calibrate its use of these features upon arrival?

That works OK for the kernel, but you might have user space apps that
have adapted their behviour based on what the've found in /proc/cpuinfo.

A particularly nasty case is apps or libraries that go at 'cpuid'
directly, as we can't trap that instruction. I guess VMware have the
same problem, as I don't believe they translate ring 3 code.

As regards your proposed critical region, we already effectively do
this.  We don't recalibrate stuff after a migration yet though (some of
the tests are quite slow, so I'm not sure you'd want to do them all
anyhow).

Ian

^ permalink raw reply	[flat|nested] 14+ messages in thread
* RE: address space reorganization
@ 2005-04-14 19:03 Ian Pratt
  2005-04-19 19:52 ` Chris Wedgwood
  0 siblings, 1 reply; 14+ messages in thread
From: Ian Pratt @ 2005-04-14 19:03 UTC (permalink / raw)
  To: Rik van Riel, Kip Macy; +Cc: xen-devel, Jacob Gorm Hansen

 
> > One would hope, but just because a customer has lots of 
> money to spend 
> > on hardware doesn't mean that he is rowing with both oars. 
> This is a 
> > supportability issue. The xen{source} folks would do themselves a 
> > favor by trapping a guest's use of unsupported instructions and 
> > logging it. That would make it easy enough to track down if a 
> > customer's apps stop working when using migration.
> 
> Good idea, trapping unsupported instructions and printing out 
> the category the instruction belongs to (eg. SSE2) will make 
> things a lot easier to track.  I like this idea a lot...

Yep, although we can't trap the cpuid, we can trap the use of e.g. SSE2.

We have to be a bit careful though, to prevent DoS of the Xen console.
We'd need to rate limit such messages. Patches welcome :-)

Ian

^ permalink raw reply	[flat|nested] 14+ messages in thread
* address space reorganization
@ 2005-04-13 17:59 Gerd Knorr
  2005-04-13 19:29 ` Keir Fraser
  0 siblings, 1 reply; 14+ messages in thread
From: Gerd Knorr @ 2005-04-13 17:59 UTC (permalink / raw)
  To: xen-devel

  Hi,

On my devel machine xen comes up fine with PAE paging
enabled.  Well, it boots not that far yet, it stops at the
end of paging_init() right now.  The address space issues
need fixing now before I can attempt to boot domain 0 with
PAE ...

At the moment the xen virtual address space (top 64 MB)
looks like this:

  0xffc0  |  4 MB  |  ioremap area
  0xff80  |  4 MB  |  mapping cache
  0xff40  |  4 MB  |  per domain mapping (gdt, ...)
  0xff00  |  4 MB  |  shadow linear page tables
  0xfec0  |  4 MB  |  linear page tables
  0xfd40  | 24 MB  |  frame table
  0xfd00  |  4 MB  |  MPT (rw)
  0xfc40  | 12 MB  |  low mem, xen code, xen heap
  0xfc00  |  4 MB  |  MPT (ro)

For PAE we'll have to change:

  * linear page tables and linear shadow tables need 8 MB
    each (because pte size is doubled with PAE).
  * frame table needs to grow, the size depends on the
    amount of memory we are willing to support (total),
    for 16 GB it would be 96 MB.
  * MPT might need more space, depending on how much memory
    we are willing to support (per domain).  With a 4GB
    per-domain limit the current 4 MB size would be fine.
    [ side note: the shadow code seems to reuse the MPT
      address space for something else in some cases, not
      sure which implications this has ]
  * not sure about xen's heap.  What this is used for?
    Might we need more space here as well to support large
    amounts of memory?

If we touch the address space anyway we might fix some other
issues along the way.  Ian mentioned he wants to move the
ioremap area to the bottom.  I guess next to the ro MPT
table, so it's easy to grant domains read-only access to
ACPI tables?

Is it possible (and/or useful) to make the address layout
dynamic?  So the size of the frametable can be adjusted at
boot time depending on the amount of memory installed in the
machine?  That would imply the ro MPT doesn't have a fixed
address any more, not sure this is possible ...

In any case I'd try to make the memory layout as fixed as
possible, i.e. move the fixed size stuff to the top, below
the data structures which are not fixed-size, at the bottom
the ro MPT + ioremap area for r/o domain access, i.e.
something like this:

[ fixed size ]
    0xff00  | 16 MB  |  low mem, xen code, xen heap
    0xfec0  |  4 MB  |  mapping cache
    0xfe80  |  4 MB  |  per domain mapping (gdt, ...)

[ Hmm, debatable whenever make that fixed-size or not.
  It would waste some address space in the non-pae case,
  on the other hand the memory layout would be identical
  for both pae and non-pae. ]
    0xfe00  |  8 MB  |  shadow linear page tables
    0xfd80  |  8 MB  |  linear page tables
    0xfbc0  |  4 MB  |  MPT (rw)

[ not fixed size ]
    0xfc00  | 24 MB  |  frame table (larger for PAE ...)

[ r/o access for domains ]
    0xfb80  |  4 MB  |  MPT (ro)
    0xfb40  |  4 MB  |  ioremap area

Comments?  Anything else to consider when touching the
address layout anyway?

  Gerd

PS: my current patches are @ http://dl.bytesex.org/patches/xen/

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

end of thread, other threads:[~2005-04-19 19:52 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-14  2:26 address space reorganization Ian Pratt
2005-04-14  3:08 ` Jacob Gorm Hansen
2005-04-14  3:14   ` Kip Macy
2005-04-14  3:38     ` Jacob Gorm Hansen
2005-04-14 16:00       ` Adam Heath
2005-04-14 17:54     ` Rik van Riel
2005-04-14 18:15       ` Kip Macy
2005-04-14 18:20         ` Rik van Riel
  -- strict thread matches above, loose matches on Subject: below --
2005-04-14 19:03 Ian Pratt
2005-04-19 19:52 ` Chris Wedgwood
2005-04-13 17:59 Gerd Knorr
2005-04-13 19:29 ` Keir Fraser
2005-04-14  1:45   ` Keir Fraser
2005-04-14  2:18     ` Jacob Gorm Hansen

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.