diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2019-03-06 13:31:36 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-03-06 13:31:36 -0500 |
| commit | 8dcd175bc3d50b78413c56d5b17d4bddd77412ef (patch) | |
| tree | 2c2fb25759b43f2e73830f07ef3b444d76825280 /drivers | |
| parent | afe6fe7036c6efdcb46cabc64bec9b6e4a005210 (diff) | |
| parent | fff04900ea79915939ef6a3aad78fca6511a3034 (diff) | |
Merge branch 'akpm' (patches from Andrew)
Merge misc updates from Andrew Morton:
- a few misc things
- ocfs2 updates
- most of MM
* emailed patches from Andrew Morton <akpm@linux-foundation.org>: (159 commits)
tools/testing/selftests/proc/proc-self-syscall.c: remove duplicate include
proc: more robust bulk read test
proc: test /proc/*/maps, smaps, smaps_rollup, statm
proc: use seq_puts() everywhere
proc: read kernel cpu stat pointer once
proc: remove unused argument in proc_pid_lookup()
fs/proc/thread_self.c: code cleanup for proc_setup_thread_self()
fs/proc/self.c: code cleanup for proc_setup_self()
proc: return exit code 4 for skipped tests
mm,mremap: bail out earlier in mremap_to under map pressure
mm/sparse: fix a bad comparison
mm/memory.c: do_fault: avoid usage of stale vm_area_struct
writeback: fix inode cgroup switching comment
mm/huge_memory.c: fix "orig_pud" set but not used
mm/hotplug: fix an imbalance with DEBUG_PAGEALLOC
mm/memcontrol.c: fix bad line in comment
mm/cma.c: cma_declare_contiguous: correct err handling
mm/page_ext.c: fix an imbalance with kmemleak
mm/compaction: pass pgdat to too_many_isolated() instead of zone
mm: remove zone_lru_lock() function, access ->lru_lock directly
...
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/block/mtip32xx/mtip32xx.c | 5 | ||||
| -rw-r--r-- | drivers/char/agp/efficeon-agp.c | 2 | ||||
| -rw-r--r-- | drivers/dma/dmaengine.c | 4 | ||||
| -rw-r--r-- | drivers/gpu/drm/i915/i915_utils.h | 6 | ||||
| -rw-r--r-- | drivers/hv/hv_balloon.c | 21 | ||||
| -rw-r--r-- | drivers/infiniband/hw/hfi1/affinity.c | 3 | ||||
| -rw-r--r-- | drivers/infiniband/hw/hfi1/init.c | 3 | ||||
| -rw-r--r-- | drivers/iommu/dmar.c | 5 | ||||
| -rw-r--r-- | drivers/iommu/intel-iommu.c | 3 | ||||
| -rw-r--r-- | drivers/misc/sgi-xp/xpc_uv.c | 3 | ||||
| -rw-r--r-- | drivers/misc/vmw_balloon.c | 32 | ||||
| -rw-r--r-- | drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 5 | ||||
| -rw-r--r-- | drivers/xen/balloon.c | 18 |
13 files changed, 81 insertions, 29 deletions
diff --git a/drivers/block/mtip32xx/mtip32xx.c b/drivers/block/mtip32xx/mtip32xx.c index 88e8440e75c3..2f3ee4d6af82 100644 --- a/drivers/block/mtip32xx/mtip32xx.c +++ b/drivers/block/mtip32xx/mtip32xx.c | |||
| @@ -40,6 +40,7 @@ | |||
| 40 | #include <linux/export.h> | 40 | #include <linux/export.h> |
| 41 | #include <linux/debugfs.h> | 41 | #include <linux/debugfs.h> |
| 42 | #include <linux/prefetch.h> | 42 | #include <linux/prefetch.h> |
| 43 | #include <linux/numa.h> | ||
| 43 | #include "mtip32xx.h" | 44 | #include "mtip32xx.h" |
| 44 | 45 | ||
| 45 | #define HW_CMD_SLOT_SZ (MTIP_MAX_COMMAND_SLOTS * 32) | 46 | #define HW_CMD_SLOT_SZ (MTIP_MAX_COMMAND_SLOTS * 32) |
| @@ -4018,9 +4019,9 @@ static int get_least_used_cpu_on_node(int node) | |||
| 4018 | /* Helper for selecting a node in round robin mode */ | 4019 | /* Helper for selecting a node in round robin mode */ |
| 4019 | static inline int mtip_get_next_rr_node(void) | 4020 | static inline int mtip_get_next_rr_node(void) |
| 4020 | { | 4021 | { |
| 4021 | static int next_node = -1; | 4022 | static int next_node = NUMA_NO_NODE; |
| 4022 | 4023 | ||
| 4023 | if (next_node == -1) { | 4024 | if (next_node == NUMA_NO_NODE) { |
| 4024 | next_node = first_online_node; | 4025 | next_node = first_online_node; |
| 4025 | return next_node; | 4026 | return next_node; |
| 4026 | } | 4027 | } |
diff --git a/drivers/char/agp/efficeon-agp.c b/drivers/char/agp/efficeon-agp.c index 7f88490b5479..c53f0f9ef5b0 100644 --- a/drivers/char/agp/efficeon-agp.c +++ b/drivers/char/agp/efficeon-agp.c | |||
| @@ -163,7 +163,6 @@ static int efficeon_free_gatt_table(struct agp_bridge_data *bridge) | |||
| 163 | unsigned long page = efficeon_private.l1_table[index]; | 163 | unsigned long page = efficeon_private.l1_table[index]; |
| 164 | if (page) { | 164 | if (page) { |
| 165 | efficeon_private.l1_table[index] = 0; | 165 | efficeon_private.l1_table[index] = 0; |
| 166 | ClearPageReserved(virt_to_page((char *)page)); | ||
| 167 | free_page(page); | 166 | free_page(page); |
| 168 | freed++; | 167 | freed++; |
| 169 | } | 168 | } |
| @@ -219,7 +218,6 @@ static int efficeon_create_gatt_table(struct agp_bridge_data *bridge) | |||
| 219 | efficeon_free_gatt_table(agp_bridge); | 218 | efficeon_free_gatt_table(agp_bridge); |
| 220 | return -ENOMEM; | 219 | return -ENOMEM; |
| 221 | } | 220 | } |
| 222 | SetPageReserved(virt_to_page((char *)page)); | ||
| 223 | 221 | ||
| 224 | for (offset = 0; offset < PAGE_SIZE; offset += clflush_chunk) | 222 | for (offset = 0; offset < PAGE_SIZE; offset += clflush_chunk) |
| 225 | clflush((char *)page+offset); | 223 | clflush((char *)page+offset); |
diff --git a/drivers/dma/dmaengine.c b/drivers/dma/dmaengine.c index f1a441ab395d..3a11b1092e80 100644 --- a/drivers/dma/dmaengine.c +++ b/drivers/dma/dmaengine.c | |||
| @@ -63,6 +63,7 @@ | |||
| 63 | #include <linux/acpi_dma.h> | 63 | #include <linux/acpi_dma.h> |
| 64 | #include <linux/of_dma.h> | 64 | #include <linux/of_dma.h> |
| 65 | #include <linux/mempool.h> | 65 | #include <linux/mempool.h> |
| 66 | #include <linux/numa.h> | ||
| 66 | 67 | ||
| 67 | static DEFINE_MUTEX(dma_list_mutex); | 68 | static DEFINE_MUTEX(dma_list_mutex); |
| 68 | static DEFINE_IDA(dma_ida); | 69 | static DEFINE_IDA(dma_ida); |
| @@ -386,7 +387,8 @@ EXPORT_SYMBOL(dma_issue_pending_all); | |||
| 386 | static bool dma_chan_is_local(struct dma_chan *chan, int cpu) | 387 | static bool dma_chan_is_local(struct dma_chan *chan, int cpu) |
| 387 | { | 388 | { |
| 388 | int node = dev_to_node(chan->device->dev); | 389 | int node = dev_to_node(chan->device->dev); |
| 389 | return node == -1 || cpumask_test_cpu(cpu, cpumask_of_node(node)); | 390 | return node == NUMA_NO_NODE || |
| 391 | cpumask_test_cpu(cpu, cpumask_of_node(node)); | ||
| 390 | } | 392 | } |
| 391 | 393 | ||
| 392 | /** | 394 | /** |
diff --git a/drivers/gpu/drm/i915/i915_utils.h b/drivers/gpu/drm/i915/i915_utils.h index 9726df37c4c4..540e20eb032c 100644 --- a/drivers/gpu/drm/i915/i915_utils.h +++ b/drivers/gpu/drm/i915/i915_utils.h | |||
| @@ -123,12 +123,6 @@ static inline u64 ptr_to_u64(const void *ptr) | |||
| 123 | 123 | ||
| 124 | #include <linux/list.h> | 124 | #include <linux/list.h> |
| 125 | 125 | ||
| 126 | static inline int list_is_first(const struct list_head *list, | ||
| 127 | const struct list_head *head) | ||
| 128 | { | ||
| 129 | return head->next == list; | ||
| 130 | } | ||
| 131 | |||
| 132 | static inline void __list_del_many(struct list_head *head, | 126 | static inline void __list_del_many(struct list_head *head, |
| 133 | struct list_head *first) | 127 | struct list_head *first) |
| 134 | { | 128 | { |
diff --git a/drivers/hv/hv_balloon.c b/drivers/hv/hv_balloon.c index 7c6349a50ef1..dd475f3bcc8a 100644 --- a/drivers/hv/hv_balloon.c +++ b/drivers/hv/hv_balloon.c | |||
| @@ -681,8 +681,13 @@ static struct notifier_block hv_memory_nb = { | |||
| 681 | /* Check if the particular page is backed and can be onlined and online it. */ | 681 | /* Check if the particular page is backed and can be onlined and online it. */ |
| 682 | static void hv_page_online_one(struct hv_hotadd_state *has, struct page *pg) | 682 | static void hv_page_online_one(struct hv_hotadd_state *has, struct page *pg) |
| 683 | { | 683 | { |
| 684 | if (!has_pfn_is_backed(has, page_to_pfn(pg))) | 684 | if (!has_pfn_is_backed(has, page_to_pfn(pg))) { |
| 685 | if (!PageOffline(pg)) | ||
| 686 | __SetPageOffline(pg); | ||
| 685 | return; | 687 | return; |
| 688 | } | ||
| 689 | if (PageOffline(pg)) | ||
| 690 | __ClearPageOffline(pg); | ||
| 686 | 691 | ||
| 687 | /* This frame is currently backed; online the page. */ | 692 | /* This frame is currently backed; online the page. */ |
| 688 | __online_page_set_limits(pg); | 693 | __online_page_set_limits(pg); |
| @@ -771,7 +776,7 @@ static void hv_mem_hot_add(unsigned long start, unsigned long size, | |||
| 771 | } | 776 | } |
| 772 | } | 777 | } |
| 773 | 778 | ||
| 774 | static void hv_online_page(struct page *pg) | 779 | static void hv_online_page(struct page *pg, unsigned int order) |
| 775 | { | 780 | { |
| 776 | struct hv_hotadd_state *has; | 781 | struct hv_hotadd_state *has; |
| 777 | unsigned long flags; | 782 | unsigned long flags; |
| @@ -780,10 +785,11 @@ static void hv_online_page(struct page *pg) | |||
| 780 | spin_lock_irqsave(&dm_device.ha_lock, flags); | 785 | spin_lock_irqsave(&dm_device.ha_lock, flags); |
| 781 | list_for_each_entry(has, &dm_device.ha_region_list, list) { | 786 | list_for_each_entry(has, &dm_device.ha_region_list, list) { |
| 782 | /* The page belongs to a different HAS. */ | 787 | /* The page belongs to a different HAS. */ |
| 783 | if ((pfn < has->start_pfn) || (pfn >= has->end_pfn)) | 788 | if ((pfn < has->start_pfn) || |
| 789 | (pfn + (1UL << order) > has->end_pfn)) | ||
| 784 | continue; | 790 | continue; |
| 785 | 791 | ||
| 786 | hv_page_online_one(has, pg); | 792 | hv_bring_pgs_online(has, pfn, 1UL << order); |
| 787 | break; | 793 | break; |
| 788 | } | 794 | } |
| 789 | spin_unlock_irqrestore(&dm_device.ha_lock, flags); | 795 | spin_unlock_irqrestore(&dm_device.ha_lock, flags); |
| @@ -1201,6 +1207,7 @@ static void free_balloon_pages(struct hv_dynmem_device *dm, | |||
| 1201 | 1207 | ||
| 1202 | for (i = 0; i < num_pages; i++) { | 1208 | for (i = 0; i < num_pages; i++) { |
| 1203 | pg = pfn_to_page(i + start_frame); | 1209 | pg = pfn_to_page(i + start_frame); |
| 1210 | __ClearPageOffline(pg); | ||
| 1204 | __free_page(pg); | 1211 | __free_page(pg); |
| 1205 | dm->num_pages_ballooned--; | 1212 | dm->num_pages_ballooned--; |
| 1206 | } | 1213 | } |
| @@ -1213,7 +1220,7 @@ static unsigned int alloc_balloon_pages(struct hv_dynmem_device *dm, | |||
| 1213 | struct dm_balloon_response *bl_resp, | 1220 | struct dm_balloon_response *bl_resp, |
| 1214 | int alloc_unit) | 1221 | int alloc_unit) |
| 1215 | { | 1222 | { |
| 1216 | unsigned int i = 0; | 1223 | unsigned int i, j; |
| 1217 | struct page *pg; | 1224 | struct page *pg; |
| 1218 | 1225 | ||
| 1219 | if (num_pages < alloc_unit) | 1226 | if (num_pages < alloc_unit) |
| @@ -1245,6 +1252,10 @@ static unsigned int alloc_balloon_pages(struct hv_dynmem_device *dm, | |||
| 1245 | if (alloc_unit != 1) | 1252 | if (alloc_unit != 1) |
| 1246 | split_page(pg, get_order(alloc_unit << PAGE_SHIFT)); | 1253 | split_page(pg, get_order(alloc_unit << PAGE_SHIFT)); |
| 1247 | 1254 | ||
| 1255 | /* mark all pages offline */ | ||
| 1256 | for (j = 0; j < (1 << get_order(alloc_unit << PAGE_SHIFT)); j++) | ||
| 1257 | __SetPageOffline(pg + j); | ||
| 1258 | |||
| 1248 | bl_resp->range_count++; | 1259 | bl_resp->range_count++; |
| 1249 | bl_resp->range_array[i].finfo.start_page = | 1260 | bl_resp->range_array[i].finfo.start_page = |
| 1250 | page_to_pfn(pg); | 1261 | page_to_pfn(pg); |
diff --git a/drivers/infiniband/hw/hfi1/affinity.c b/drivers/infiniband/hw/hfi1/affinity.c index 2baf38cc1e23..4fe662c3bbc1 100644 --- a/drivers/infiniband/hw/hfi1/affinity.c +++ b/drivers/infiniband/hw/hfi1/affinity.c | |||
| @@ -48,6 +48,7 @@ | |||
| 48 | #include <linux/cpumask.h> | 48 | #include <linux/cpumask.h> |
| 49 | #include <linux/module.h> | 49 | #include <linux/module.h> |
| 50 | #include <linux/interrupt.h> | 50 | #include <linux/interrupt.h> |
| 51 | #include <linux/numa.h> | ||
| 51 | 52 | ||
| 52 | #include "hfi.h" | 53 | #include "hfi.h" |
| 53 | #include "affinity.h" | 54 | #include "affinity.h" |
| @@ -777,7 +778,7 @@ void hfi1_dev_affinity_clean_up(struct hfi1_devdata *dd) | |||
| 777 | _dev_comp_vect_cpu_mask_clean_up(dd, entry); | 778 | _dev_comp_vect_cpu_mask_clean_up(dd, entry); |
| 778 | unlock: | 779 | unlock: |
| 779 | mutex_unlock(&node_affinity.lock); | 780 | mutex_unlock(&node_affinity.lock); |
| 780 | dd->node = -1; | 781 | dd->node = NUMA_NO_NODE; |
| 781 | } | 782 | } |
| 782 | 783 | ||
| 783 | /* | 784 | /* |
diff --git a/drivers/infiniband/hw/hfi1/init.c b/drivers/infiniband/hw/hfi1/init.c index 7835eb52e7c5..441b06e2a154 100644 --- a/drivers/infiniband/hw/hfi1/init.c +++ b/drivers/infiniband/hw/hfi1/init.c | |||
| @@ -54,6 +54,7 @@ | |||
| 54 | #include <linux/printk.h> | 54 | #include <linux/printk.h> |
| 55 | #include <linux/hrtimer.h> | 55 | #include <linux/hrtimer.h> |
| 56 | #include <linux/bitmap.h> | 56 | #include <linux/bitmap.h> |
| 57 | #include <linux/numa.h> | ||
| 57 | #include <rdma/rdma_vt.h> | 58 | #include <rdma/rdma_vt.h> |
| 58 | 59 | ||
| 59 | #include "hfi.h" | 60 | #include "hfi.h" |
| @@ -1303,7 +1304,7 @@ static struct hfi1_devdata *hfi1_alloc_devdata(struct pci_dev *pdev, | |||
| 1303 | dd->unit = ret; | 1304 | dd->unit = ret; |
| 1304 | list_add(&dd->list, &hfi1_dev_list); | 1305 | list_add(&dd->list, &hfi1_dev_list); |
| 1305 | } | 1306 | } |
| 1306 | dd->node = -1; | 1307 | dd->node = NUMA_NO_NODE; |
| 1307 | 1308 | ||
| 1308 | spin_unlock_irqrestore(&hfi1_devs_lock, flags); | 1309 | spin_unlock_irqrestore(&hfi1_devs_lock, flags); |
| 1309 | idr_preload_end(); | 1310 | idr_preload_end(); |
diff --git a/drivers/iommu/dmar.c b/drivers/iommu/dmar.c index 58dc70bffd5b..9c49300e9fb7 100644 --- a/drivers/iommu/dmar.c +++ b/drivers/iommu/dmar.c | |||
| @@ -39,6 +39,7 @@ | |||
| 39 | #include <linux/dmi.h> | 39 | #include <linux/dmi.h> |
| 40 | #include <linux/slab.h> | 40 | #include <linux/slab.h> |
| 41 | #include <linux/iommu.h> | 41 | #include <linux/iommu.h> |
| 42 | #include <linux/numa.h> | ||
| 42 | #include <asm/irq_remapping.h> | 43 | #include <asm/irq_remapping.h> |
| 43 | #include <asm/iommu_table.h> | 44 | #include <asm/iommu_table.h> |
| 44 | 45 | ||
| @@ -477,7 +478,7 @@ static int dmar_parse_one_rhsa(struct acpi_dmar_header *header, void *arg) | |||
| 477 | int node = acpi_map_pxm_to_node(rhsa->proximity_domain); | 478 | int node = acpi_map_pxm_to_node(rhsa->proximity_domain); |
| 478 | 479 | ||
| 479 | if (!node_online(node)) | 480 | if (!node_online(node)) |
| 480 | node = -1; | 481 | node = NUMA_NO_NODE; |
| 481 | drhd->iommu->node = node; | 482 | drhd->iommu->node = node; |
| 482 | return 0; | 483 | return 0; |
| 483 | } | 484 | } |
| @@ -1062,7 +1063,7 @@ static int alloc_iommu(struct dmar_drhd_unit *drhd) | |||
| 1062 | iommu->msagaw = msagaw; | 1063 | iommu->msagaw = msagaw; |
| 1063 | iommu->segment = drhd->segment; | 1064 | iommu->segment = drhd->segment; |
| 1064 | 1065 | ||
| 1065 | iommu->node = -1; | 1066 | iommu->node = NUMA_NO_NODE; |
| 1066 | 1067 | ||
| 1067 | ver = readl(iommu->reg + DMAR_VER_REG); | 1068 | ver = readl(iommu->reg + DMAR_VER_REG); |
| 1068 | pr_info("%s: reg_base_addr %llx ver %d:%d cap %llx ecap %llx\n", | 1069 | pr_info("%s: reg_base_addr %llx ver %d:%d cap %llx ecap %llx\n", |
diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index 78188bf7e90d..39a33dec4d0b 100644 --- a/drivers/iommu/intel-iommu.c +++ b/drivers/iommu/intel-iommu.c | |||
| @@ -47,6 +47,7 @@ | |||
| 47 | #include <linux/dma-contiguous.h> | 47 | #include <linux/dma-contiguous.h> |
| 48 | #include <linux/dma-direct.h> | 48 | #include <linux/dma-direct.h> |
| 49 | #include <linux/crash_dump.h> | 49 | #include <linux/crash_dump.h> |
| 50 | #include <linux/numa.h> | ||
| 50 | #include <asm/irq_remapping.h> | 51 | #include <asm/irq_remapping.h> |
| 51 | #include <asm/cacheflush.h> | 52 | #include <asm/cacheflush.h> |
| 52 | #include <asm/iommu.h> | 53 | #include <asm/iommu.h> |
| @@ -1716,7 +1717,7 @@ static struct dmar_domain *alloc_domain(int flags) | |||
| 1716 | return NULL; | 1717 | return NULL; |
| 1717 | 1718 | ||
| 1718 | memset(domain, 0, sizeof(*domain)); | 1719 | memset(domain, 0, sizeof(*domain)); |
| 1719 | domain->nid = -1; | 1720 | domain->nid = NUMA_NO_NODE; |
| 1720 | domain->flags = flags; | 1721 | domain->flags = flags; |
| 1721 | domain->has_iotlb_device = false; | 1722 | domain->has_iotlb_device = false; |
| 1722 | INIT_LIST_HEAD(&domain->devices); | 1723 | INIT_LIST_HEAD(&domain->devices); |
diff --git a/drivers/misc/sgi-xp/xpc_uv.c b/drivers/misc/sgi-xp/xpc_uv.c index 0441abe87880..9e443df44b3b 100644 --- a/drivers/misc/sgi-xp/xpc_uv.c +++ b/drivers/misc/sgi-xp/xpc_uv.c | |||
| @@ -22,6 +22,7 @@ | |||
| 22 | #include <linux/module.h> | 22 | #include <linux/module.h> |
| 23 | #include <linux/err.h> | 23 | #include <linux/err.h> |
| 24 | #include <linux/slab.h> | 24 | #include <linux/slab.h> |
| 25 | #include <linux/numa.h> | ||
| 25 | #include <asm/uv/uv_hub.h> | 26 | #include <asm/uv/uv_hub.h> |
| 26 | #if defined CONFIG_X86_64 | 27 | #if defined CONFIG_X86_64 |
| 27 | #include <asm/uv/bios.h> | 28 | #include <asm/uv/bios.h> |
| @@ -61,7 +62,7 @@ static struct xpc_heartbeat_uv *xpc_heartbeat_uv; | |||
| 61 | XPC_NOTIFY_MSG_SIZE_UV) | 62 | XPC_NOTIFY_MSG_SIZE_UV) |
| 62 | #define XPC_NOTIFY_IRQ_NAME "xpc_notify" | 63 | #define XPC_NOTIFY_IRQ_NAME "xpc_notify" |
| 63 | 64 | ||
| 64 | static int xpc_mq_node = -1; | 65 | static int xpc_mq_node = NUMA_NO_NODE; |
| 65 | 66 | ||
| 66 | static struct xpc_gru_mq_uv *xpc_activate_mq_uv; | 67 | static struct xpc_gru_mq_uv *xpc_activate_mq_uv; |
| 67 | static struct xpc_gru_mq_uv *xpc_notify_mq_uv; | 68 | static struct xpc_gru_mq_uv *xpc_notify_mq_uv; |
diff --git a/drivers/misc/vmw_balloon.c b/drivers/misc/vmw_balloon.c index f8240b87df22..869ec842729e 100644 --- a/drivers/misc/vmw_balloon.c +++ b/drivers/misc/vmw_balloon.c | |||
| @@ -557,6 +557,36 @@ vmballoon_page_in_frames(enum vmballoon_page_size_type page_size) | |||
| 557 | } | 557 | } |
| 558 | 558 | ||
| 559 | /** | 559 | /** |
| 560 | * vmballoon_mark_page_offline() - mark a page as offline | ||
| 561 | * @page: pointer for the page. | ||
| 562 | * @page_size: the size of the page. | ||
| 563 | */ | ||
| 564 | static void | ||
| 565 | vmballoon_mark_page_offline(struct page *page, | ||
| 566 | enum vmballoon_page_size_type page_size) | ||
| 567 | { | ||
| 568 | int i; | ||
| 569 | |||
| 570 | for (i = 0; i < vmballoon_page_in_frames(page_size); i++) | ||
| 571 | __SetPageOffline(page + i); | ||
| 572 | } | ||
| 573 | |||
| 574 | /** | ||
| 575 | * vmballoon_mark_page_online() - mark a page as online | ||
| 576 | * @page: pointer for the page. | ||
| 577 | * @page_size: the size of the page. | ||
| 578 | */ | ||
| 579 | static void | ||
| 580 | vmballoon_mark_page_online(struct page *page, | ||
| 581 | enum vmballoon_page_size_type page_size) | ||
| 582 | { | ||
| 583 | int i; | ||
| 584 | |||
| 585 | for (i = 0; i < vmballoon_page_in_frames(page_size); i++) | ||
| 586 | __ClearPageOffline(page + i); | ||
| 587 | } | ||
| 588 | |||
| 589 | /** | ||
| 560 | * vmballoon_send_get_target() - Retrieve desired balloon size from the host. | 590 | * vmballoon_send_get_target() - Retrieve desired balloon size from the host. |
| 561 | * | 591 | * |
| 562 | * @b: pointer to the balloon. | 592 | * @b: pointer to the balloon. |
| @@ -612,6 +642,7 @@ static int vmballoon_alloc_page_list(struct vmballoon *b, | |||
| 612 | ctl->page_size); | 642 | ctl->page_size); |
| 613 | 643 | ||
| 614 | if (page) { | 644 | if (page) { |
| 645 | vmballoon_mark_page_offline(page, ctl->page_size); | ||
| 615 | /* Success. Add the page to the list and continue. */ | 646 | /* Success. Add the page to the list and continue. */ |
| 616 | list_add(&page->lru, &ctl->pages); | 647 | list_add(&page->lru, &ctl->pages); |
| 617 | continue; | 648 | continue; |
| @@ -850,6 +881,7 @@ static void vmballoon_release_page_list(struct list_head *page_list, | |||
| 850 | 881 | ||
| 851 | list_for_each_entry_safe(page, tmp, page_list, lru) { | 882 | list_for_each_entry_safe(page, tmp, page_list, lru) { |
| 852 | list_del(&page->lru); | 883 | list_del(&page->lru); |
| 884 | vmballoon_mark_page_online(page, page_size); | ||
| 853 | __free_pages(page, vmballoon_page_order(page_size)); | 885 | __free_pages(page, vmballoon_page_order(page_size)); |
| 854 | } | 886 | } |
| 855 | 887 | ||
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c index a4e7584a50cb..e100054a3765 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | |||
| @@ -27,6 +27,7 @@ | |||
| 27 | #include <linux/bpf.h> | 27 | #include <linux/bpf.h> |
| 28 | #include <linux/bpf_trace.h> | 28 | #include <linux/bpf_trace.h> |
| 29 | #include <linux/atomic.h> | 29 | #include <linux/atomic.h> |
| 30 | #include <linux/numa.h> | ||
| 30 | #include <scsi/fc/fc_fcoe.h> | 31 | #include <scsi/fc/fc_fcoe.h> |
| 31 | #include <net/udp_tunnel.h> | 32 | #include <net/udp_tunnel.h> |
| 32 | #include <net/pkt_cls.h> | 33 | #include <net/pkt_cls.h> |
| @@ -6418,7 +6419,7 @@ int ixgbe_setup_tx_resources(struct ixgbe_ring *tx_ring) | |||
| 6418 | { | 6419 | { |
| 6419 | struct device *dev = tx_ring->dev; | 6420 | struct device *dev = tx_ring->dev; |
| 6420 | int orig_node = dev_to_node(dev); | 6421 | int orig_node = dev_to_node(dev); |
| 6421 | int ring_node = -1; | 6422 | int ring_node = NUMA_NO_NODE; |
| 6422 | int size; | 6423 | int size; |
| 6423 | 6424 | ||
| 6424 | size = sizeof(struct ixgbe_tx_buffer) * tx_ring->count; | 6425 | size = sizeof(struct ixgbe_tx_buffer) * tx_ring->count; |
| @@ -6512,7 +6513,7 @@ int ixgbe_setup_rx_resources(struct ixgbe_adapter *adapter, | |||
| 6512 | { | 6513 | { |
| 6513 | struct device *dev = rx_ring->dev; | 6514 | struct device *dev = rx_ring->dev; |
| 6514 | int orig_node = dev_to_node(dev); | 6515 | int orig_node = dev_to_node(dev); |
| 6515 | int ring_node = -1; | 6516 | int ring_node = NUMA_NO_NODE; |
| 6516 | int size; | 6517 | int size; |
| 6517 | 6518 | ||
| 6518 | size = sizeof(struct ixgbe_rx_buffer) * rx_ring->count; | 6519 | size = sizeof(struct ixgbe_rx_buffer) * rx_ring->count; |
diff --git a/drivers/xen/balloon.c b/drivers/xen/balloon.c index ceb5048de9a7..39b229f9e256 100644 --- a/drivers/xen/balloon.c +++ b/drivers/xen/balloon.c | |||
| @@ -369,14 +369,20 @@ static enum bp_state reserve_additional_memory(void) | |||
| 369 | return BP_ECANCELED; | 369 | return BP_ECANCELED; |
| 370 | } | 370 | } |
| 371 | 371 | ||
| 372 | static void xen_online_page(struct page *page) | 372 | static void xen_online_page(struct page *page, unsigned int order) |
| 373 | { | 373 | { |
| 374 | __online_page_set_limits(page); | 374 | unsigned long i, size = (1 << order); |
| 375 | unsigned long start_pfn = page_to_pfn(page); | ||
| 376 | struct page *p; | ||
| 375 | 377 | ||
| 378 | pr_debug("Online %lu pages starting at pfn 0x%lx\n", size, start_pfn); | ||
| 376 | mutex_lock(&balloon_mutex); | 379 | mutex_lock(&balloon_mutex); |
| 377 | 380 | for (i = 0; i < size; i++) { | |
| 378 | __balloon_append(page); | 381 | p = pfn_to_page(start_pfn + i); |
| 379 | 382 | __online_page_set_limits(p); | |
| 383 | __SetPageOffline(p); | ||
| 384 | __balloon_append(p); | ||
| 385 | } | ||
| 380 | mutex_unlock(&balloon_mutex); | 386 | mutex_unlock(&balloon_mutex); |
| 381 | } | 387 | } |
| 382 | 388 | ||
| @@ -441,6 +447,7 @@ static enum bp_state increase_reservation(unsigned long nr_pages) | |||
| 441 | xenmem_reservation_va_mapping_update(1, &page, &frame_list[i]); | 447 | xenmem_reservation_va_mapping_update(1, &page, &frame_list[i]); |
| 442 | 448 | ||
| 443 | /* Relinquish the page back to the allocator. */ | 449 | /* Relinquish the page back to the allocator. */ |
| 450 | __ClearPageOffline(page); | ||
| 444 | free_reserved_page(page); | 451 | free_reserved_page(page); |
| 445 | } | 452 | } |
| 446 | 453 | ||
| @@ -467,6 +474,7 @@ static enum bp_state decrease_reservation(unsigned long nr_pages, gfp_t gfp) | |||
| 467 | state = BP_EAGAIN; | 474 | state = BP_EAGAIN; |
| 468 | break; | 475 | break; |
| 469 | } | 476 | } |
| 477 | __SetPageOffline(page); | ||
| 470 | adjust_managed_page_count(page, -1); | 478 | adjust_managed_page_count(page, -1); |
| 471 | xenmem_reservation_scrub_page(page); | 479 | xenmem_reservation_scrub_page(page); |
| 472 | list_add(&page->lru, &pages); | 480 | list_add(&page->lru, &pages); |
