ACPI fixmap overflow
In addition to running out of e820 entries on that large machine that Alex was referring to in [0] he is also running out of ACPI fixmap space while parsing MADT (the box has *lots* of processors). The quick-and-dirty solution is to increase NUM_FIXMAP_ACPI_PAGES but I wonder whether we should move to dynamic memory allocation.
-boris
[0]
https://lists.xenproject.org/archives/html/xen-devel/2016-11/msg01077.html
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 5 lines · Boris Ostrovsky
In addition to running out of e820 entries on that large machine that Alex was referring to in [0] he is also running out of ACPI fixmap space while parsing MADT (the box has *lots* of processors). The quick-and-dirty solution is to increase
NUM_FIXMAP_ACPI_PAGESbut I wonder whether we should move to dynamic memory allocation.
Why do we use fixmap anyway? It doesn't look too hard to reorder vm_init() slightly higher, and be able to use ioremap() for all APCI tables.
~Andrew
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 8 lines · Andrew Cooper
Quoted 5 lines · Boris Ostrovsky
In addition to running out of e820 entries on that large machine that Alex was referring to in [0] he is also running out of ACPI fixmap space while parsing MADT (the box has *lots* of processors). The quick-and-dirty solution is to increase
NUM_FIXMAP_ACPI_PAGESbut I wonder whether we should move to dynamic memory allocation.Why do we use fixmap anyway? It doesn't look too hard to reorder
vm_init()slightly higher, and be able to useioremap()for all APCI tables.
Hmm... Let me see how possible this is. Just moving it up won't work since heap allocator is initialized after ACPI tables.
-boris
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 11 lines · Boris Ostrovsky
Quoted 8 lines · Andrew Cooper
Quoted 5 lines · Boris Ostrovsky
In addition to running out of e820 entries on that large machine that Alex was referring to in [0] he is also running out of ACPI fixmap space while parsing MADT (the box has *lots* of processors). The quick-and-dirty solution is to increase
NUM_FIXMAP_ACPI_PAGESbut I wonder whether we should move to dynamic memory allocation.Why do we use fixmap anyway? It doesn't look too hard to reorder
vm_init()slightly higher, and be able to useioremap()for all APCI tables.Hmm... Let me see how possible this is. Just moving it up won't work since heap allocator is initialized after ACPI tables.
We have plenty of usable PTEs already allocated at boot, mainly from the init pagetables. Given a static __init vm_bitmap, a new boot-time-only vm range should be usable without any heap allocations at all.
~Andrew
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 8 lines · Andrew Cooper
Quoted 7 lines · Boris Ostrovsky
Quoted 6 lines · Andrew Cooper
Quoted 5 lines · Boris Ostrovsky
In addition to running out of e820 entries on that large machine that Alex was referring to in [0] he is also running out of ACPI fixmap space while parsing MADT (the box has *lots* of processors). The quick-and-dirty solution is to increase
NUM_FIXMAP_ACPI_PAGESbut I wonder whether we should move to dynamic memory allocation.
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
Why do we use fixmap anyway? It doesn't look too hard to reorder
vm_init()slightly higher, and be able to useioremap()for all APCI tables.Hmm... Let me see how possible this is. Just moving it up won't work since heap allocator is initialized after ACPI tables.
We have plenty of usable PTEs already allocated at boot, mainly from the init pagetables. Given a static
__initvm_bitmap, a new boot-time-only vm range should be usable without any heap allocations at all.
Wouldn't that (using pre-allocated PTEs), in a way, be equivalent to increasing fixmap size?
-boris
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 12 lines
Quoted 1 line
Quoted 1 line · On 15.11.16 at 21:51, <[email protected]> wrote:
Quoted 10 lines · Andrew Cooper
Quoted 9 lines · Boris Ostrovsky
Quoted 8 lines · Andrew Cooper
Quoted 5 lines · Boris Ostrovsky
In addition to running out of e820 entries on that large machine that Alex was referring to in [0] he is also running out of ACPI fixmap space while parsing MADT (the box has *lots* of processors). The quick-and-dirty solution is to increase
NUM_FIXMAP_ACPI_PAGESbut I wonder whether we should move to dynamic memory allocation.Why do we use fixmap anyway? It doesn't look too hard to reorder
vm_init()slightly higher, and be able to useioremap()for all APCI tables.
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
Hmm... Let me see how possible this is. Just moving it up won't work since heap allocator is initialized after ACPI tables.
We have plenty of usable PTEs already allocated at boot, mainly from the init pagetables. Given a static
__initvm_bitmap, a new boot-time-only vm range should be usable without any heap allocations at all.Wouldn't that (using pre-allocated PTEs), in a way, be equivalent to increasing fixmap size?
Indeed. For the time being I think growing the fixmap should be fine. Clearly it being a fixed 4 pages has been wrong for a long time - there's no point in it being smaller than MAX_LOCAL_APIC x2apic entries, plus min(MAX_LOCAL_APIC, 256) lapic ones, plus MAX_IO_APICS ioapic ones etc.
Otoh the actual parsing of MADT happens after the heap allocator has been initialized. The only earlier use is via acpi_table_init() -> check_multiple_madt(); acpi_initialize_tables() doesn't appear to map full tables. And check_multiple_madt() not being able to map the full table would not prevent boot from continuing afaics. So Andrew's suggestion to switch to dynamic mapping earlier would still seem to be possible (and then preferred). In fact acpi_boot_init() already gets called after vm_init(), so switching acpi_os_map_memory() to use dynamic mappings when
Quoted 1 line
=
SYS_STATE_bootshould already work today (on x86 at least,
not sure about ARM).
Jan
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 34 lines · Jan Beulich
Quoted 12 lines
Quoted 1 line
Quoted 1 line · On 15.11.16 at 21:51, <[email protected]> wrote:
Quoted 10 lines · Andrew Cooper
Quoted 9 lines · Boris Ostrovsky
Quoted 8 lines · Andrew Cooper
Quoted 5 lines · Boris Ostrovsky
In addition to running out of e820 entries on that large machine that Alex was referring to in [0] he is also running out of ACPI fixmap space while parsing MADT (the box has *lots* of processors). The quick-and-dirty solution is to increase
NUM_FIXMAP_ACPI_PAGESbut I wonder whether we should move to dynamic memory allocation.Why do we use fixmap anyway? It doesn't look too hard to reorder
vm_init()slightly higher, and be able to useioremap()for all APCI tables.Quoted 7 lines
Quoted 5 lines
Quoted 2 lines
Hmm... Let me see how possible this is. Just moving it up won't work since heap allocator is initialized after ACPI tables.
We have plenty of usable PTEs already allocated at boot, mainly from the init pagetables. Given a static
__initvm_bitmap, a new boot-time-only vm range should be usable without any heap allocations at all.Wouldn't that (using pre-allocated PTEs), in a way, be equivalent to increasing fixmap size?
Indeed. For the time being I think growing the fixmap should be fine. Clearly it being a fixed 4 pages has been wrong for a long time - there's no point in it being smaller than
MAX_LOCAL_APICx2apic entries, plusmin(MAX_LOCAL_APIC, 256)lapic ones, plusMAX_IO_APICSioapic ones etc.Otoh the actual parsing of MADT happens after the heap allocator has been initialized. The only earlier use is via
acpi_table_init()->check_multiple_madt();acpi_initialize_tables()doesn't appear to map full tables. Andcheck_multiple_madt()not being able to map the full table would not prevent boot from continuing afaics. So Andrew's suggestion to switch to dynamic mapping earlier would still seem to be possible (and then preferred). In factacpi_boot_init()already gets called aftervm_init(), so switchingacpi_os_map_memory()to use dynamic mappings when
Quoted 2 lines
Quoted 1 line
=
SYS_STATE_bootshould already work today (on x86 at least,not sure about ARM).
Yes, switching to ioremap on SYS_STATE_boot seems to work. I asked Alex to test this on OVM (which is 4.4-based).
-boris
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 35 lines · Boris Ostrovsky
Quoted 34 lines · Jan Beulich
Quoted 12 lines
Quoted 1 line
Quoted 1 line · On 15.11.16 at 21:51, <[email protected]> wrote:
Quoted 10 lines · Andrew Cooper
Quoted 9 lines · Boris Ostrovsky
Quoted 8 lines · Andrew Cooper
Quoted 5 lines · Boris Ostrovsky
In addition to running out of e820 entries on that large machine that Alex was referring to in [0] he is also running out of ACPI fixmap space while parsing MADT (the box has *lots* of processors). The quick-and-dirty solution is to increase
NUM_FIXMAP_ACPI_PAGESbut I wonder whether we should move to dynamic memory allocation.Why do we use fixmap anyway? It doesn't look too hard to reorder
vm_init()slightly higher, and be able to useioremap()for all APCI tables.Quoted 7 lines
Quoted 5 lines
Quoted 2 lines
Hmm... Let me see how possible this is. Just moving it up won't work since heap allocator is initialized after ACPI tables.
We have plenty of usable PTEs already allocated at boot, mainly from the init pagetables. Given a static
__initvm_bitmap, a new boot-time-only vm range should be usable without any heap allocations at all.Wouldn't that (using pre-allocated PTEs), in a way, be equivalent to increasing fixmap size?
Indeed. For the time being I think growing the fixmap should be fine. Clearly it being a fixed 4 pages has been wrong for a long time - there's no point in it being smaller than
MAX_LOCAL_APICx2apic entries, plusmin(MAX_LOCAL_APIC, 256)lapic ones, plusMAX_IO_APICSioapic ones etc.Otoh the actual parsing of MADT happens after the heap allocator has been initialized. The only earlier use is via
acpi_table_init()->check_multiple_madt();acpi_initialize_tables()doesn't appear to map full tables. Andcheck_multiple_madt()not being able to map the full table would not prevent boot from continuing afaics. So Andrew's suggestion to switch to dynamic mapping earlier would still seem to be possible (and then preferred). In factacpi_boot_init()already gets called aftervm_init(), so switchingacpi_os_map_memory()to use dynamic mappings when
Quoted 5 lines
Quoted 2 lines
Quoted 1 line
=
SYS_STATE_bootshould already work today (on x86 at least,not sure about ARM).
Yes, switching to ioremap on
SYS_STATE_bootseems to work. I asked Alex to test this on OVM (which is 4.4-based).
FYI, I'm going to get this done a little later today. I'll let you know how it worked out this evening!
- Alex
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel