Displaying 20 results from an estimated 121 matches for "walk_free_mem_block".
2018 Jan 25
2
[PATCH v24 2/2] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT
...;> + spin_lock_irqsave(&vb->stop_update_lock, flags);
>> + vb->start_cmd_id = cpu_to_virtio32(vb->vdev,
>> + VIRTIO_BALLOON_FREE_PAGE_REPORT_STOP_ID);
>> + spin_unlock_irqrestore(&vb->stop_update_lock, flags);
>> +
>> + walk_free_mem_block(vb, 0, &virtio_balloon_send_free_pages);
>> Can you teach walk_free_mem_block to return the && of all
>> return calls, so caller knows whether it completed?
>
> There will be two cases that can cause walk_free_mem_block to return without completing:
> 1) host reque...
2018 Mar 26
4
[PATCH v29 1/4] mm: support reporting free page blocks
...t; + list_for_each_entry(page, list, lru) {
> + pfn = page_to_pfn(page);
> + ret = report_pfn_range(opaque, pfn, 1 << order);
> + if (ret)
> + break;
> + }
> + spin_unlock_irqrestore(&zone->lock, flags);
> +
> + return ret;
> +}
> +
> +/**
> + * walk_free_mem_block - Walk through the free page blocks in the system
> + * @opaque: the context passed from the caller
> + * @min_order: the minimum order of free lists to check
> + * @report_pfn_range: the callback to report the pfn range of the free pages
> + *
> + * If the callback returns a non-zer...
2018 Mar 26
4
[PATCH v29 1/4] mm: support reporting free page blocks
...t; + list_for_each_entry(page, list, lru) {
> + pfn = page_to_pfn(page);
> + ret = report_pfn_range(opaque, pfn, 1 << order);
> + if (ret)
> + break;
> + }
> + spin_unlock_irqrestore(&zone->lock, flags);
> +
> + return ret;
> +}
> +
> +/**
> + * walk_free_mem_block - Walk through the free page blocks in the system
> + * @opaque: the context passed from the caller
> + * @min_order: the minimum order of free lists to check
> + * @report_pfn_range: the callback to report the pfn range of the free pages
> + *
> + * If the callback returns a non-zer...
2017 Nov 17
3
[virtio-dev] Re: [PATCH v17 6/6] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_VQ
...+static void report_free_page(struct work_struct *work)
>>> +{
>>> + struct virtio_balloon *vb;
>>> +
>>> + vb = container_of(work, struct virtio_balloon,
>>> report_free_page_work);
>>> + report_free_page_cmd_id(vb);
>>> + walk_free_mem_block(vb, 0, &virtio_balloon_send_free_pages);
>>> + /*
>>> + * The last few free page blocks that were added may not reach the
>>> + * batch size, but need a kick to notify the device to handle
>>> them.
>>> + */
>>> + virtqueu...
2017 Nov 17
3
[virtio-dev] Re: [PATCH v17 6/6] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_VQ
...+static void report_free_page(struct work_struct *work)
>>> +{
>>> + struct virtio_balloon *vb;
>>> +
>>> + vb = container_of(work, struct virtio_balloon,
>>> report_free_page_work);
>>> + report_free_page_cmd_id(vb);
>>> + walk_free_mem_block(vb, 0, &virtio_balloon_send_free_pages);
>>> + /*
>>> + * The last few free page blocks that were added may not reach the
>>> + * batch size, but need a kick to notify the device to handle
>>> them.
>>> + */
>>> + virtqueu...
2018 Jan 25
4
[PATCH v24 1/2] mm: support reporting free page blocks
...077dd 100644
> --- a/include/linux/mm.h
> +++ b/include/linux/mm.h
> @@ -1938,6 +1938,12 @@ extern void free_area_init_node(int nid, unsigned long * zones_size,
> unsigned long zone_start_pfn, unsigned long *zholes_size);
> extern void free_initmem(void);
>
> +extern void walk_free_mem_block(void *opaque,
> + int min_order,
> + bool (*report_pfn_range)(void *opaque,
> + unsigned long pfn,
> + unsigned long num));
> +
> /*
> * Free reserved pages within range [PAGE_ALIGN(start), end & PAGE_MASK)
> * into the buddy system. The freed pa...
2018 Jan 25
4
[PATCH v24 1/2] mm: support reporting free page blocks
...077dd 100644
> --- a/include/linux/mm.h
> +++ b/include/linux/mm.h
> @@ -1938,6 +1938,12 @@ extern void free_area_init_node(int nid, unsigned long * zones_size,
> unsigned long zone_start_pfn, unsigned long *zholes_size);
> extern void free_initmem(void);
>
> +extern void walk_free_mem_block(void *opaque,
> + int min_order,
> + bool (*report_pfn_range)(void *opaque,
> + unsigned long pfn,
> + unsigned long num));
> +
> /*
> * Free reserved pages within range [PAGE_ALIGN(start), end & PAGE_MASK)
> * into the buddy system. The freed pa...
2018 Jan 24
3
[PATCH v24 2/2] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT
...cate a new request can be queued.
> + */
> + spin_lock_irqsave(&vb->stop_update_lock, flags);
> + vb->start_cmd_id = cpu_to_virtio32(vb->vdev,
> + VIRTIO_BALLOON_FREE_PAGE_REPORT_STOP_ID);
> + spin_unlock_irqrestore(&vb->stop_update_lock, flags);
> +
> + walk_free_mem_block(vb, 0, &virtio_balloon_send_free_pages);
Can you teach walk_free_mem_block to return the && of all
return calls, so caller knows whether it completed?
> +
> + /* End by sending the stop id to the host with an outbuf */
> + send_cmd_id(vb, &vb->stop_cmd_id);
> +}
&g...
2018 Jan 24
3
[PATCH v24 2/2] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT
...cate a new request can be queued.
> + */
> + spin_lock_irqsave(&vb->stop_update_lock, flags);
> + vb->start_cmd_id = cpu_to_virtio32(vb->vdev,
> + VIRTIO_BALLOON_FREE_PAGE_REPORT_STOP_ID);
> + spin_unlock_irqrestore(&vb->stop_update_lock, flags);
> +
> + walk_free_mem_block(vb, 0, &virtio_balloon_send_free_pages);
Can you teach walk_free_mem_block to return the && of all
return calls, so caller knows whether it completed?
> +
> + /* End by sending the stop id to the host with an outbuf */
> + send_cmd_id(vb, &vb->stop_cmd_id);
> +}
&g...
2018 Jan 25
0
[PATCH v24 2/2] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT
...cate a new request can be queued.
> + */
> + spin_lock_irqsave(&vb->stop_update_lock, flags);
> + vb->start_cmd_id = cpu_to_virtio32(vb->vdev,
> + VIRTIO_BALLOON_FREE_PAGE_REPORT_STOP_ID);
> + spin_unlock_irqrestore(&vb->stop_update_lock, flags);
> +
> + walk_free_mem_block(vb, 0, &virtio_balloon_send_free_pages);
> Can you teach walk_free_mem_block to return the && of all
> return calls, so caller knows whether it completed?
There will be two cases that can cause walk_free_mem_block to return
without completing:
1) host requests to stop in advance...
2017 Nov 18
1
[virtio-dev] Re: [PATCH v17 6/6] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_VQ
...> > > > > + struct virtio_balloon *vb;
> > > > > +
> > > > > + vb = container_of(work, struct virtio_balloon,
> > > > > report_free_page_work);
> > > > > + report_free_page_cmd_id(vb);
> > > > > + walk_free_mem_block(vb, 0, &virtio_balloon_send_free_pages);
> > > > > + /*
> > > > > + * The last few free page blocks that were added may not reach the
> > > > > + * batch size, but need a kick to notify the device to
> > > > > handle them.
&...
2017 Nov 18
1
[virtio-dev] Re: [PATCH v17 6/6] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_VQ
...> > > > > + struct virtio_balloon *vb;
> > > > > +
> > > > > + vb = container_of(work, struct virtio_balloon,
> > > > > report_free_page_work);
> > > > > + report_free_page_cmd_id(vb);
> > > > > + walk_free_mem_block(vb, 0, &virtio_balloon_send_free_pages);
> > > > > + /*
> > > > > + * The last few free page blocks that were added may not reach the
> > > > > + * batch size, but need a kick to notify the device to
> > > > > handle them.
&...
2018 Jan 25
3
[PATCH v25 1/2 RESEND] mm: support reporting free page blocks
...include/linux/mm.h
index ea818ff..e65ae2e 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -1938,6 +1938,12 @@ extern void free_area_init_node(int nid, unsigned long * zones_size,
unsigned long zone_start_pfn, unsigned long *zholes_size);
extern void free_initmem(void);
+extern int walk_free_mem_block(void *opaque,
+ int min_order,
+ int (*report_pfn_range)(void *opaque,
+ unsigned long pfn,
+ unsigned long num));
+
/*
* Free reserved pages within range [PAGE_ALIGN(start), end & PAGE_MASK)
* into the buddy system. The freed pages will be poisone...
2018 Jan 25
3
[PATCH v25 1/2 RESEND] mm: support reporting free page blocks
...include/linux/mm.h
index ea818ff..e65ae2e 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -1938,6 +1938,12 @@ extern void free_area_init_node(int nid, unsigned long * zones_size,
unsigned long zone_start_pfn, unsigned long *zholes_size);
extern void free_initmem(void);
+extern int walk_free_mem_block(void *opaque,
+ int min_order,
+ int (*report_pfn_range)(void *opaque,
+ unsigned long pfn,
+ unsigned long num));
+
/*
* Free reserved pages within range [PAGE_ALIGN(start), end & PAGE_MASK)
* into the buddy system. The freed pages will be poisone...
2017 Dec 01
3
[PATCH v18 10/10] virtio-balloon: don't report free pages when page poisoning is enabled
...; @@ -652,7 +652,9 @@ static void report_free_page(struct work_struct *work)
> /* Start by sending the obtained cmd id to the host with an outbuf */
> send_one_desc(vb, vb->free_page_vq, virt_to_phys(&vb->start_cmd_id),
> sizeof(uint32_t), false, true, false);
> - walk_free_mem_block(vb, 0, &virtio_balloon_send_free_pages);
> + if (!(page_poisoning_enabled() &&
> + !IS_ENABLED(CONFIG_PAGE_POISONING_NO_SANITY)))
> + walk_free_mem_block(vb, 0, &virtio_balloon_send_free_pages);
> /*
> * End by sending the stop id to the host with an outbuf....
2017 Dec 01
3
[PATCH v18 10/10] virtio-balloon: don't report free pages when page poisoning is enabled
...; @@ -652,7 +652,9 @@ static void report_free_page(struct work_struct *work)
> /* Start by sending the obtained cmd id to the host with an outbuf */
> send_one_desc(vb, vb->free_page_vq, virt_to_phys(&vb->start_cmd_id),
> sizeof(uint32_t), false, true, false);
> - walk_free_mem_block(vb, 0, &virtio_balloon_send_free_pages);
> + if (!(page_poisoning_enabled() &&
> + !IS_ENABLED(CONFIG_PAGE_POISONING_NO_SANITY)))
> + walk_free_mem_block(vb, 0, &virtio_balloon_send_free_pages);
> /*
> * End by sending the stop id to the host with an outbuf....
2018 Apr 10
0
[PATCH v29 1/4] mm: support reporting free page blocks
...= page_to_pfn(page);
> > + ret = report_pfn_range(opaque, pfn, 1 << order);
> > + if (ret)
> > + break;
> > + }
> > + spin_unlock_irqrestore(&zone->lock, flags);
> > +
> > + return ret;
> > +}
> > +
> > +/**
> > + * walk_free_mem_block - Walk through the free page blocks in the system
> > + * @opaque: the context passed from the caller
> > + * @min_order: the minimum order of free lists to check
> > + * @report_pfn_range: the callback to report the pfn range of the free pages
> > + *
> > + * If the c...
2018 Mar 27
0
[PATCH v29 1/4] mm: support reporting free page blocks
...> + pfn = page_to_pfn(page);
>> + ret = report_pfn_range(opaque, pfn, 1 << order);
>> + if (ret)
>> + break;
>> + }
>> + spin_unlock_irqrestore(&zone->lock, flags);
>> +
>> + return ret;
>> +}
>> +
>> +/**
>> + * walk_free_mem_block - Walk through the free page blocks in the system
>> + * @opaque: the context passed from the caller
>> + * @min_order: the minimum order of free lists to check
>> + * @report_pfn_range: the callback to report the pfn range of the free pages
>> + *
>> + * If the callba...
2018 Jan 26
0
[PATCH v24 1/2] mm: support reporting free page blocks
...lude/linux/mm.h
>> +++ b/include/linux/mm.h
>> @@ -1938,6 +1938,12 @@ extern void free_area_init_node(int nid, unsigned long * zones_size,
>> unsigned long zone_start_pfn, unsigned long *zholes_size);
>> extern void free_initmem(void);
>>
>> +extern void walk_free_mem_block(void *opaque,
>> + int min_order,
>> + bool (*report_pfn_range)(void *opaque,
>> + unsigned long pfn,
>> + unsigned long num));
>> +
>> /*
>> * Free reserved pages within range [PAGE_ALIGN(start), end & PAGE_MASK)
>> *...
2017 Sep 30
0
[PATCH v16 4/5] mm: support reporting free page blocks
...nclude/linux/mm.h
index 46b9ac5..d9652c2 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -1835,6 +1835,12 @@ extern void free_area_init_node(int nid, unsigned long * zones_size,
unsigned long zone_start_pfn, unsigned long *zholes_size);
extern void free_initmem(void);
+extern void walk_free_mem_block(void *opaque,
+ int min_order,
+ bool (*report_pfn_range)(void *opaque,
+ unsigned long pfn,
+ unsigned long num));
+
/*
* Free reserved pages within range [PAGE_ALIGN(start), end & PAGE_MASK)
* into the buddy system. The freed pages will be poisoned with pattern
diff -...