Displaying 20 results from an estimated 327 matches for "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_nom...
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
...h bit in the bitmap corresponds to a page of PAGE_SIZE.
> @@ -542,42 +574,210 @@ static void update_balloon_size_func(struct work_struct *work)
> queue_work(system_freezable_wq, work);
> }
>
> -static int init_vqs(struct virtio_balloon *vb)
> +static bool virtio_balloon_send_free_pages(void *opaque, unsigned long pfn,
> + unsigned long nr_pages)
> +{
> + struct virtio_balloon *vb = (struct virtio_balloon *)opaque;
> + void *addr = (void *)pfn_to_kaddr(pfn);
> + uint32_t len = nr_pages << PAGE_SHIFT;
> +
> + if (vb->report_free_page_stop)
>...
2017 Oct 01
2
[PATCH v16 5/5] virtio-balloon: VIRTIO_BALLOON_F_CTRL_VQ
...h bit in the bitmap corresponds to a page of PAGE_SIZE.
> @@ -542,42 +574,210 @@ static void update_balloon_size_func(struct work_struct *work)
> queue_work(system_freezable_wq, work);
> }
>
> -static int init_vqs(struct virtio_balloon *vb)
> +static bool virtio_balloon_send_free_pages(void *opaque, unsigned long pfn,
> + unsigned long nr_pages)
> +{
> + struct virtio_balloon *vb = (struct virtio_balloon *)opaque;
> + void *addr = (void *)pfn_to_kaddr(pfn);
> + uint32_t len = nr_pages << PAGE_SHIFT;
> +
> + if (vb->report_free_page_stop)
>...
2017 Oct 02
0
[PATCH v16 5/5] virtio-balloon: VIRTIO_BALLOON_F_CTRL_VQ
On Sunday, October 1, 2017 11:19 AM, Michael S. Tsirkin wrote:
> On Sat, Sep 30, 2017 at 12:05:54PM +0800, Wei Wang wrote:
> > +static void ctrlq_send_cmd(struct virtio_balloon *vb,
> > + struct virtio_balloon_ctrlq_cmd *cmd,
> > + bool inbuf)
> > +{
> > + struct virtqueue *vq = vb->ctrl_vq;
> > +
> > + ctrlq_add_cmd(vq, cmd, inbuf);
>
2017 Oct 10
2
[PATCH v16 5/5] virtio-balloon: VIRTIO_BALLOON_F_CTRL_VQ
On Mon, Oct 02, 2017 at 04:38:01PM +0000, Wang, Wei W wrote:
> On Sunday, October 1, 2017 11:19 AM, Michael S. Tsirkin wrote:
> > On Sat, Sep 30, 2017 at 12:05:54PM +0800, Wei Wang wrote:
> > > +static void ctrlq_send_cmd(struct virtio_balloon *vb,
> > > + struct virtio_balloon_ctrlq_cmd *cmd,
> > > + bool inbuf)
> > > +{
> > > + struct
2017 Oct 10
2
[PATCH v16 5/5] virtio-balloon: VIRTIO_BALLOON_F_CTRL_VQ
On Mon, Oct 02, 2017 at 04:38:01PM +0000, Wang, Wei W wrote:
> On Sunday, October 1, 2017 11:19 AM, Michael S. Tsirkin wrote:
> > On Sat, Sep 30, 2017 at 12:05:54PM +0800, Wei Wang wrote:
> > > +static void ctrlq_send_cmd(struct virtio_balloon *vb,
> > > + struct virtio_balloon_ctrlq_cmd *cmd,
> > > + bool inbuf)
> > > +{
> > > + struct
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 attr...
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,1...
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 page...
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(struct...
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
>>> I'll need to think about this.
>>> We need to remember that the whole HINT thing is not a mandate for 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,
>
> Do you refer to "If host corrupts memory it's
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
On 17.04.20 10:50, Michael S. Tsirkin wrote:
> On Fri, Apr 17, 2020 at 09:49:03AM +0200, David Hildenbrand wrote:
>> On 17.04.20 08:28, Michael S. Tsirkin wrote:
>>> On Thu, Apr 16, 2020 at 04:52:42PM -0700, Alexander Duyck wrote:
>>>> On Thu, Apr 16, 2020 at 3:13 PM Michael S. Tsirkin <mst at redhat.com> wrote:
>>>>>
>>>>> On Thu,
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