search for: is_memory_resource_reserv

Displaying 2 results from an estimated 2 matches for "is_memory_resource_reserv".

2010 Aug 12
13
[PATCH] GSoC 2010 - Memory hotplug support for Xen guests - third fully working version
...; + .domid = DOMID_SELF > > + }; > > + unsigned long flags, i, pfn; > > + > > + if (nr_pages > ARRAY_SIZE(frame_list)) > > + nr_pages = ARRAY_SIZE(frame_list); > > + > > + spin_lock_irqsave(&balloon_lock, flags); > > + > > + if (!is_memory_resource_reserved()) { > > + > > + /* > > + * Look for first unused memory region starting at page > > + * boundary. Skip last memory section created at boot time > > + * becuase it may contains unused memory pages with PG_reserved > > + * bit not set (online_pages requ...
2010 Aug 06
5
[PATCH] GSoC 2010 - Memory hotplug support for Xen guests - second fully working version - once again
...N_MEMORY_HOTPLUG -#include <linux/memory.h> -#endif - #define PAGES2KB(_p) ((_p)<<(PAGE_SHIFT-10)) #define BALLOON_CLASS_NAME "xen_memory" @@ -199,6 +197,196 @@ static inline unsigned long current_target(void) { return balloon_stats.target_pages; } + +static inline u64 is_memory_resource_reserved(void) +{ + return balloon_stats.hotplug_start_paddr; +} + +/* we are OK calling __meminit stuff here - we have CONFIG_MEMORY_HOTPLUG */ +static int __ref xen_add_memory(int nid, u64 start, u64 size) +{ + pg_data_t *pgdat = NULL; + int new_pgdat = 0, ret; + + lock_system_sleep(); + + if (!node_onl...