search for: free_page

Displaying 20 results from an estimated 326 matches for "free_page".

Did you mean: free_pages
2011 Feb 11
1
[PATCH 1/3]: Staging: hv: Use native page allocation/free functions
...80,8 +180,9 @@ int vmbus_open(struct vmbus_channel *newchannel, u32 send_ringbuffer_size, newchannel->channel_callback_context = context; /* Allocate the ring buffer */ - out = osd_page_alloc((send_ringbuffer_size + recv_ringbuffer_size) - >> PAGE_SHIFT); + out = (void *)__get_free_pages(GFP_KERNEL|__GFP_ZERO, + get_order(send_ringbuffer_size + recv_ringbuffer_size)); + if (!out) return -ENOMEM; @@ -300,8 +301,8 @@ Cleanup: errorout: ringbuffer_cleanup(&newchannel->outbound); ringbuffer_cleanup(&newchannel->inbound); - osd_page_free(out, (send_ringbuffer...
2011 Feb 11
1
[PATCH 1/3]: Staging: hv: Use native page allocation/free functions
...80,8 +180,9 @@ int vmbus_open(struct vmbus_channel *newchannel, u32 send_ringbuffer_size, newchannel->channel_callback_context = context; /* Allocate the ring buffer */ - out = osd_page_alloc((send_ringbuffer_size + recv_ringbuffer_size) - >> PAGE_SHIFT); + out = (void *)__get_free_pages(GFP_KERNEL|__GFP_ZERO, + get_order(send_ringbuffer_size + recv_ringbuffer_size)); + if (!out) return -ENOMEM; @@ -300,8 +301,8 @@ Cleanup: errorout: ringbuffer_cleanup(&newchannel->outbound); ringbuffer_cleanup(&newchannel->inbound); - osd_page_free(out, (send_ringbuffer...
2020 Sep 15
0
[PATCH 15/18] dma-mapping: add a new dma_alloc_pages API
...100644 --- a/arch/alpha/kernel/pci_iommu.c +++ b/arch/alpha/kernel/pci_iommu.c @@ -952,5 +952,7 @@ const struct dma_map_ops alpha_pci_ops = { .dma_supported = alpha_pci_supported, .mmap = dma_common_mmap, .get_sgtable = dma_common_get_sgtable, + .alloc_pages = dma_common_alloc_pages, + .free_pages = dma_common_free_pages, }; EXPORT_SYMBOL(alpha_pci_ops); diff --git a/arch/arm/mm/dma-mapping-nommu.c b/arch/arm/mm/dma-mapping-nommu.c index 287ef898a55e11..43c6d66b6e733a 100644 --- a/arch/arm/mm/dma-mapping-nommu.c +++ b/arch/arm/mm/dma-mapping-nommu.c @@ -176,6 +176,8 @@ static void arm_no...
2016 Mar 03
2
[RFC kernel 0/2]A PV solution for KVM live migration optimization
The current QEMU live migration implementation mark the all the guest's RAM pages as dirtied in the ram bulk stage, all these pages will be processed and that takes quit a lot of CPU cycles. >From guest's point of view, it doesn't care about the content in free pages. We can make use of this fact and skip processing the free pages in the ram bulk stage, it can save a lot CPU cycles
2016 Mar 03
2
[RFC kernel 0/2]A PV solution for KVM live migration optimization
The current QEMU live migration implementation mark the all the guest's RAM pages as dirtied in the ram bulk stage, all these pages will be processed and that takes quit a lot of CPU cycles. >From guest's point of view, it doesn't care about the content in free pages. We can make use of this fact and skip processing the free pages in the ram bulk stage, it can save a lot CPU cycles
2012 Nov 23
1
[PATCH] libxl - fix a variable underflow in libxl_wait_for_free_memory
...: error: libxl_dom.c:430:libxl__build_pv: xc_dom_boot_mem_init failed: Device or resource busy libxl: error: libxl_create.c:901:domcreate_rebuild_done: cannot (re-)build domain: -3 The variable-underflow happens when freemem_slack is larger then info.free_pages*4, because the solution of this operation is converted implicit to a unsigned int to match the type of memory_kb. The problem is fixed by a proper casting. Signed-off-by: Ronny Hegewald <Ronny.Hegewald@online.de> --- xen-4.3-20121121/tools/libxl/libxl.c.org 2012-11-22 03:34:00.000000000...
2017 Oct 01
2
[PATCH v16 5/5] virtio-balloon: VIRTIO_BALLOON_F_CTRL_VQ
...In other words, the control related commands of each > feature will be sent via the ctrl_vq, meanwhile each feature may have > its own vq used as a data plane. > > Free page report is the the first new feature controlled via ctrl_vq, > and a new cmd class, VIRTIO_BALLOON_CTRLQ_CLASS_FREE_PAGE, is added. > Currently, this feature has two cmds: > VIRTIO_BALLOON_FREE_PAGE_F_START: This cmd is sent from host to guest > to start the free page report work. > VIRTIO_BALLOON_FREE_PAGE_F_STOP: This cmd is bidirectional. The guest > would send the cmd to the host to indicate the re...
2017 Oct 01
2
[PATCH v16 5/5] virtio-balloon: VIRTIO_BALLOON_F_CTRL_VQ
...In other words, the control related commands of each > feature will be sent via the ctrl_vq, meanwhile each feature may have > its own vq used as a data plane. > > Free page report is the the first new feature controlled via ctrl_vq, > and a new cmd class, VIRTIO_BALLOON_CTRLQ_CLASS_FREE_PAGE, is added. > Currently, this feature has two cmds: > VIRTIO_BALLOON_FREE_PAGE_F_START: This cmd is sent from host to guest > to start the free page report work. > VIRTIO_BALLOON_FREE_PAGE_F_STOP: This cmd is bidirectional. The guest > would send the cmd to the host to indicate the re...
2017 Oct 02
0
[PATCH v16 5/5] virtio-balloon: VIRTIO_BALLOON_F_CTRL_VQ
...int class, cmd, len; > > + > > + msg = (struct virtio_balloon_ctrlq_cmd *)virtqueue_get_buf(vq, &len); > > + if (unlikely(!msg)) > > + return; > > + > > + /* The outbuf is sent by the host for recycling, so just return. */ > > + if (msg == &vb->free_page_cmd_out) > > + return; > > + > > + class = virtio32_to_cpu(vb->vdev, msg->class); > > + cmd = virtio32_to_cpu(vb->vdev, msg->cmd); > > + > > + switch (class) { > > + case VIRTIO_BALLOON_CTRLQ_CLASS_FREE_PAGE: > > + if (cmd == VIRTIO_BAL...
2017 Oct 10
2
[PATCH v16 5/5] virtio-balloon: VIRTIO_BALLOON_F_CTRL_VQ
...; + > > > + msg = (struct virtio_balloon_ctrlq_cmd *)virtqueue_get_buf(vq, &len); > > > + if (unlikely(!msg)) > > > + return; > > > + > > > + /* The outbuf is sent by the host for recycling, so just return. */ > > > + if (msg == &vb->free_page_cmd_out) > > > + return; > > > + > > > + class = virtio32_to_cpu(vb->vdev, msg->class); > > > + cmd = virtio32_to_cpu(vb->vdev, msg->cmd); > > > + > > > + switch (class) { > > > + case VIRTIO_BALLOON_CTRLQ_CLASS_FREE_PAGE:...
2017 Oct 10
2
[PATCH v16 5/5] virtio-balloon: VIRTIO_BALLOON_F_CTRL_VQ
...; + > > > + msg = (struct virtio_balloon_ctrlq_cmd *)virtqueue_get_buf(vq, &len); > > > + if (unlikely(!msg)) > > > + return; > > > + > > > + /* The outbuf is sent by the host for recycling, so just return. */ > > > + if (msg == &vb->free_page_cmd_out) > > > + return; > > > + > > > + class = virtio32_to_cpu(vb->vdev, msg->class); > > > + cmd = virtio32_to_cpu(vb->vdev, msg->cmd); > > > + > > > + switch (class) { > > > + case VIRTIO_BALLOON_CTRLQ_CLASS_FREE_PAGE:...
2020 Aug 19
0
[PATCH 19/28] dma-mapping: replace DMA_ATTR_NON_CONSISTENT with dma_{alloc, free}_pages
...ice() needs +to be called, and before reading memory written by the device, +dma_sync_single_for_cpu(), just like for streaming DMA mappings that are +reused. :: void - dma_free_attrs(struct device *dev, size_t size, void *cpu_addr, - dma_addr_t dma_handle, unsigned long attrs) + dma_free_pages(struct device *dev, size_t size, void *cpu_addr, + dma_addr_t dma_handle, enum dma_data_direction dir) -Free memory allocated by the dma_alloc_attrs(). All common -parameters must be identical to those otherwise passed to dma_free_coherent, -and the attrs argument must be identical to the att...
2006 Jul 31
1
[PATCH 5/6] xen, tools: calculate nr_cpus via num_online_cpus
..."sockets_per_node", info.sockets_per_node, + "nr_cpus" , info.nr_cpus, "total_memory", pages_to_kib(info.total_pages), "free_memory", pages_to_kib(info.free_pages), "scrub_memory", pages_to_kib(info.scrub_pages), diff -r 51045f276c90 tools/python/xen/xend/XendNode.py --- a/tools/python/xen/xend/XendNode.py Mon Jul 31 10:48:48 2006 -0500 +++ b/tools/python/xen/xend/XendNode.py Mon Jul 31 10:49:10 2006 -0500 @@ -122,...
2020 Jun 19
0
[PATCH 15/16] mm/hmm/test: add self tests for THP migration
...+++++++++++ 2 files changed, 560 insertions(+), 55 deletions(-) diff --git a/lib/test_hmm.c b/lib/test_hmm.c index db5d2e8d7420..f4e2e8731366 100644 --- a/lib/test_hmm.c +++ b/lib/test_hmm.c @@ -92,6 +92,7 @@ struct dmirror_device { unsigned long calloc; unsigned long cfree; struct page *free_pages; + struct page *free_huge_pages; spinlock_t lock; /* protects the above */ }; @@ -443,6 +444,7 @@ static int dmirror_write(struct dmirror *dmirror, struct hmm_dmirror_cmd *cmd) } static bool dmirror_allocate_chunk(struct dmirror_device *mdevice, + bool is_huge, struct pag...
2020 Apr 21
2
[PATCH] nouveau/hmm: fix nouveau_dmem_chunk allocations
...uveau_dmem_migrate { struct nouveau_dmem { struct nouveau_drm *drm; - struct dev_pagemap pagemap; struct nouveau_dmem_migrate migrate; - struct list_head chunk_free; - struct list_head chunk_full; - struct list_head chunk_empty; + struct list_head chunks; struct mutex mutex; + struct page *free_pages; + spinlock_t lock; }; -static inline struct nouveau_dmem *page_to_dmem(struct page *page) +static struct nouveau_dmem_chunk *nouveau_page_to_chunk(struct page *page) +{ + return container_of(page->pgmap, struct nouveau_dmem_chunk, pagemap); +} + +static struct nouveau_drm *page_to_drm(struc...
2020 Nov 06
12
[PATCH v3 0/6] mm/hmm/nouveau: add THP migration to migrate_vma_*
This series adds support for transparent huge page migration to migrate_vma_*() and adds nouveau SVM and HMM selftests as consumers. Earlier versions were posted previously [1] and [2]. The patches apply cleanly to the linux-mm 5.10.0-rc2 tree. There are a lot of other THP patches being posted. I don't think there are any semantic conflicts but there may be some merge conflicts depending on
2020 Apr 17
2
[virtio-dev] Re: [PATCH] virtio-balloon: Disable free page hinting/reporting if page poison is disabled
...he page again. Here, I (hope) always the original page content is maintained via the 2-bitmap magic. Or am I missing something important? > >> and that's not what we currently implement in >> the hypervisor for speeding up migration. I still consider >> VIRTIO_BALLOON_F_FREE_PAGE_HINT as an alternative technique of >> temporarily inflating/deflating. > > Reporting is like that. But hinting isn't, simply because > by the time host gets the hint page may already be in use. > Blowing it out unconditionally would lead to easily > reproducible guest cra...
2007 Oct 19
4
[PATCH] nr_cpus calculation problem due to incorrect sockets_per_node
Testing on an 8-node 128-way NUMA machine has exposed a problem with Xen''s nr_cpus calculation. In this case, since Xen cuts off recognized CPUs at 32, the machine appears to have 16 CPUs on the first and second nodes and none on the remaining nodes. Given this asymmetry, the calculation of sockets_per_node (which is later used to calculate nr_cpus) is incorrect:
2020 Apr 17
2
[virtio-dev] Re: [PATCH] virtio-balloon: Disable free page hinting/reporting if page poison is disabled
...or host to > corrupt memory. It's just some info about page use guest > gives host. If host corrupts memory it's broken ... I don't think that's true, and that's not what we currently implement in the hypervisor for speeding up migration. I still consider VIRTIO_BALLOON_F_FREE_PAGE_HINT as an alternative technique of temporarily inflating/deflating. E.g., we don't migrate any of these pages in the hypervisor, so the content will be zeroed out on the migration target. If migration fails, the ld content will remain. You can call that "corrupting memory" - it's...
2020 Sep 02
10
[PATCH v2 0/7] mm/hmm/nouveau: add THP migration to migrate_vma_*
This series adds support for transparent huge page migration to migrate_vma_*() and adds nouveau SVM and HMM selftests as consumers. An earlier version was posted previously [1]. This version now supports splitting a THP midway in the migration process which led to a number of changes. The patches apply cleanly to the current linux-mm tree. Since there are a couple of patches in linux-mm from Dan