Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'for-linus-5.12b-rc5-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip

Pull xen fixes from Juergen Gross:
"This contains a small series with a more elegant fix of a problem
which was originally fixed in rc2"

* tag 'for-linus-5.12b-rc5-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
Revert "xen: fix p2m size in dom0 for disabled memory hotplug case"
xen/x86: make XEN_BALLOON_MEMORY_HOTPLUG_LIMIT depend on MEMORY_HOTPLUG

+18 -21
-12
arch/x86/include/asm/xen/page.h
··· 87 87 #endif 88 88 89 89 /* 90 - * The maximum amount of extra memory compared to the base size. The 91 - * main scaling factor is the size of struct page. At extreme ratios 92 - * of base:extra, all the base memory can be filled with page 93 - * structures for the extra memory, leaving no space for anything 94 - * else. 95 - * 96 - * 10x seems like a reasonable balance between scaling flexibility and 97 - * leaving a practically usable system. 98 - */ 99 - #define XEN_EXTRA_MEM_RATIO (10) 100 - 101 - /* 102 90 * Helper functions to write or read unsigned long values to/from 103 91 * memory, when the access may fault. 104 92 */
+2 -5
arch/x86/xen/p2m.c
··· 98 98 unsigned long xen_max_p2m_pfn __read_mostly; 99 99 EXPORT_SYMBOL_GPL(xen_max_p2m_pfn); 100 100 101 - #ifdef CONFIG_XEN_BALLOON_MEMORY_HOTPLUG_LIMIT 102 - #define P2M_LIMIT CONFIG_XEN_BALLOON_MEMORY_HOTPLUG_LIMIT 101 + #ifdef CONFIG_XEN_MEMORY_HOTPLUG_LIMIT 102 + #define P2M_LIMIT CONFIG_XEN_MEMORY_HOTPLUG_LIMIT 103 103 #else 104 104 #define P2M_LIMIT 0 105 105 #endif ··· 416 416 xen_p2m_last_pfn = xen_max_p2m_pfn; 417 417 418 418 p2m_limit = (phys_addr_t)P2M_LIMIT * 1024 * 1024 * 1024 / PAGE_SIZE; 419 - if (!p2m_limit && IS_ENABLED(CONFIG_XEN_UNPOPULATED_ALLOC)) 420 - p2m_limit = xen_start_info->nr_pages * XEN_EXTRA_MEM_RATIO; 421 - 422 419 vm.flags = VM_ALLOC; 423 420 vm.size = ALIGN(sizeof(unsigned long) * max(xen_max_p2m_pfn, p2m_limit), 424 421 PMD_SIZE * PMDS_PER_MID_PAGE);
+14 -2
arch/x86/xen/setup.c
··· 59 59 } xen_remap_buf __initdata __aligned(PAGE_SIZE); 60 60 static unsigned long xen_remap_mfn __initdata = INVALID_P2M_ENTRY; 61 61 62 + /* 63 + * The maximum amount of extra memory compared to the base size. The 64 + * main scaling factor is the size of struct page. At extreme ratios 65 + * of base:extra, all the base memory can be filled with page 66 + * structures for the extra memory, leaving no space for anything 67 + * else. 68 + * 69 + * 10x seems like a reasonable balance between scaling flexibility and 70 + * leaving a practically usable system. 71 + */ 72 + #define EXTRA_MEM_RATIO (10) 73 + 62 74 static bool xen_512gb_limit __initdata = IS_ENABLED(CONFIG_XEN_512GB); 63 75 64 76 static void __init xen_parse_512gb(void) ··· 790 778 extra_pages += max_pages - max_pfn; 791 779 792 780 /* 793 - * Clamp the amount of extra memory to a XEN_EXTRA_MEM_RATIO 781 + * Clamp the amount of extra memory to a EXTRA_MEM_RATIO 794 782 * factor the base size. 795 783 * 796 784 * Make sure we have no memory above max_pages, as this area 797 785 * isn't handled by the p2m management. 798 786 */ 799 - extra_pages = min3(XEN_EXTRA_MEM_RATIO * min(max_pfn, PFN_DOWN(MAXMEM)), 787 + extra_pages = min3(EXTRA_MEM_RATIO * min(max_pfn, PFN_DOWN(MAXMEM)), 800 788 extra_pages, max_pages - max_pfn); 801 789 i = 0; 802 790 addr = xen_e820_table.entries[0].addr;
+2 -2
drivers/xen/Kconfig
··· 50 50 51 51 SUBSYSTEM=="memory", ACTION=="add", RUN+="/bin/sh -c '[ -f /sys$devpath/state ] && echo online > /sys$devpath/state'" 52 52 53 - config XEN_BALLOON_MEMORY_HOTPLUG_LIMIT 53 + config XEN_MEMORY_HOTPLUG_LIMIT 54 54 int "Hotplugged memory limit (in GiB) for a PV guest" 55 55 default 512 56 56 depends on XEN_HAVE_PVMMU 57 - depends on XEN_BALLOON_MEMORY_HOTPLUG 57 + depends on MEMORY_HOTPLUG 58 58 help 59 59 Maxmium amount of memory (in GiB) that a PV guest can be 60 60 expanded to when using memory hotplug.