Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1623481
| From | Wei Wang <wei.w.wang@intel.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v9 3/5] mm: function to offer a page block on the free list |
| Date | 2017-04-14 04:30 +0200 |
| Message-ID | <tvZ9M-3BM-7@gated-at.bofh.it> (permalink) |
| References | <tvJy1-14D-5@gated-at.bofh.it> <tvJy2-14D-25@gated-at.bofh.it> <tvTe3-7YO-23@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 04/14/2017 04:02 AM, Andrew Morton wrote:
> On Thu, 13 Apr 2017 17:35:06 +0800 Wei Wang <wei.w.wang@intel.com> wrote:
>
>> Add a function to find a page block on the free list specified by the
>> caller. Pages from the page block may be used immediately after the
>> function returns. The caller is responsible for detecting or preventing
>> the use of such pages.
>>
>> ...
>>
>> --- a/mm/page_alloc.c
>> +++ b/mm/page_alloc.c
>> @@ -4498,6 +4498,93 @@ void show_free_areas(unsigned int filter)
>> show_swap_cache_info();
>> }
>>
>> +/**
>> + * Heuristically get a page block in the system that is unused.
>> + * It is possible that pages from the page block are used immediately after
>> + * inquire_unused_page_block() returns. It is the caller's responsibility
>> + * to either detect or prevent the use of such pages.
>> + *
>> + * The free list to check: zone->free_area[order].free_list[migratetype].
>> + *
>> + * If the caller supplied page block (i.e. **page) is on the free list, offer
>> + * the next page block on the list to the caller. Otherwise, offer the first
>> + * page block on the list.
>> + *
>> + * Return 0 when a page block is found on the caller specified free list.
>> + */
>> +int inquire_unused_page_block(struct zone *zone, unsigned int order,
>> + unsigned int migratetype, struct page **page)
>> +{
> Perhaps we can wrap this in the appropriate ifdef so the kernels which
> won't be using virtio-balloon don't carry the added overhead.
>
>
OK. What do you think if we add this:
#if defined(CONFIG_VIRTIO_BALLOON) || defined(CONFIG_VIRTIO_BALLOON_MODULE)
Best,
Wei
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v9 0/5] Extend virtio-balloon for fast (de)inflating & fast live migration Wei Wang <wei.w.wang@intel.com> - 2017-04-13 11:50 +0200
[PATCH v9 5/5] virtio-balloon: VIRTIO_BALLOON_F_MISC_VQ Wei Wang <wei.w.wang@intel.com> - 2017-04-13 11:50 +0200
Re: [PATCH v9 5/5] virtio-balloon: VIRTIO_BALLOON_F_MISC_VQ "Michael S. Tsirkin" <mst@redhat.com> - 2017-04-13 19:10 +0200
[PATCH v9 3/5] mm: function to offer a page block on the free list Wei Wang <wei.w.wang@intel.com> - 2017-04-13 11:50 +0200
Re: [PATCH v9 3/5] mm: function to offer a page block on the free list Andrew Morton <akpm@linux-foundation.org> - 2017-04-13 22:10 +0200
Re: [PATCH v9 3/5] mm: function to offer a page block on the free list Wei Wang <wei.w.wang@intel.com> - 2017-04-14 04:30 +0200
Re: [PATCH v9 3/5] mm: function to offer a page block on the free list Matthew Wilcox <willy@infradead.org> - 2017-04-14 05:00 +0200
Re: [PATCH v9 3/5] mm: function to offer a page block on the free list Wei Wang <wei.w.wang@intel.com> - 2017-04-14 11:00 +0200
[PATCH v9 2/5] virtio-balloon: VIRTIO_BALLOON_F_BALLOON_CHUNKS Wei Wang <wei.w.wang@intel.com> - 2017-04-13 11:50 +0200
Re: [PATCH v9 2/5] virtio-balloon: VIRTIO_BALLOON_F_BALLOON_CHUNKS "Michael S. Tsirkin" <mst@redhat.com> - 2017-04-13 18:40 +0200
Re: [PATCH v9 2/5] virtio-balloon: VIRTIO_BALLOON_F_BALLOON_CHUNKS Matthew Wilcox <willy@infradead.org> - 2017-04-13 19:10 +0200
Re: [virtio-dev] Re: [PATCH v9 2/5] virtio-balloon: VIRTIO_BALLOON_F_BALLOON_CHUNKS Wei Wang <wei.w.wang@intel.com> - 2017-04-14 10:40 +0200
Re: [virtio-dev] Re: [PATCH v9 2/5] virtio-balloon: VIRTIO_BALLOON_F_BALLOON_CHUNKS "Michael S. Tsirkin" <mst@redhat.com> - 2017-04-14 23:40 +0200
Re: [virtio-dev] Re: [PATCH v9 2/5] virtio-balloon: VIRTIO_BALLOON_F_BALLOON_CHUNKS Wei Wang <wei.w.wang@intel.com> - 2017-04-17 05:40 +0200
Re: [PATCH v9 0/5] Extend virtio-balloon for fast (de)inflating & fast live migration Matthew Wilcox <willy@infradead.org> - 2017-04-13 22:50 +0200
Re: [PATCH v9 0/5] Extend virtio-balloon for fast (de)inflating & fast live migration "Michael S. Tsirkin" <mst@redhat.com> - 2017-04-14 04:00 +0200
Re: [PATCH v9 0/5] Extend virtio-balloon for fast (de)inflating & fast live migration Wei Wang <wei.w.wang@intel.com> - 2017-04-14 04:30 +0200
Re: [PATCH v9 0/5] Extend virtio-balloon for fast (de)inflating & fast live migration "Michael S. Tsirkin" <mst@redhat.com> - 2017-04-14 05:00 +0200
Re: [PATCH v9 0/5] Extend virtio-balloon for fast (de)inflating & fast live migration Matthew Wilcox <willy@infradead.org> - 2017-04-14 11:50 +0200
Re: [PATCH v9 0/5] Extend virtio-balloon for fast (de)inflating & fast live migration "Michael S. Tsirkin" <mst@redhat.com> - 2017-04-14 16:30 +0200
csiph-web