All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wei Wang <wei.w.wang@intel.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: virtio-dev@lists.oasis-open.org, linux-kernel@vger.kernel.org,
	qemu-devel@nongnu.org, virtualization@lists.linux-foundation.org,
	kvm@vger.kernel.org, linux-mm@kvack.org, mst@redhat.com,
	david@redhat.com, dave.hansen@intel.com,
	cornelia.huck@de.ibm.com, mgorman@techsingularity.net,
	aarcange@redhat.com, amit.shah@redhat.com, pbonzini@redhat.com,
	liliang.opensource@gmail.com
Subject: Re: [PATCH v9 3/5] mm: function to offer a page block on the free list
Date: Fri, 14 Apr 2017 10:30:27 +0800	[thread overview]
Message-ID: <58F03443.9040202@intel.com> (raw)
In-Reply-To: <20170413130217.2316b0394192d8677f5ddbdf@linux-foundation.org>

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

WARNING: multiple messages have this Message-ID (diff)
From: Wei Wang <wei.w.wang@intel.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: virtio-dev@lists.oasis-open.org, linux-kernel@vger.kernel.org,
	qemu-devel@nongnu.org, virtualization@lists.linux-foundation.org,
	kvm@vger.kernel.org, linux-mm@kvack.org, mst@redhat.com,
	david@redhat.com, dave.hansen@intel.com,
	cornelia.huck@de.ibm.com, mgorman@techsingularity.net,
	aarcange@redhat.com, amit.shah@redhat.com, pbonzini@redhat.com,
	liliang.opensource@gmail.com
Subject: Re: [PATCH v9 3/5] mm: function to offer a page block on the free list
Date: Fri, 14 Apr 2017 10:30:27 +0800	[thread overview]
Message-ID: <58F03443.9040202@intel.com> (raw)
In-Reply-To: <20170413130217.2316b0394192d8677f5ddbdf@linux-foundation.org>

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

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

WARNING: multiple messages have this Message-ID (diff)
From: Wei Wang <wei.w.wang@intel.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: virtio-dev@lists.oasis-open.org, linux-kernel@vger.kernel.org,
	qemu-devel@nongnu.org, virtualization@lists.linux-foundation.org,
	kvm@vger.kernel.org, linux-mm@kvack.org, mst@redhat.com,
	david@redhat.com, dave.hansen@intel.com,
	cornelia.huck@de.ibm.com, mgorman@techsingularity.net,
	aarcange@redhat.com, amit.shah@redhat.com, pbonzini@redhat.com,
	liliang.opensource@gmail.com
Subject: Re: [Qemu-devel] [PATCH v9 3/5] mm: function to offer a page block on the free list
Date: Fri, 14 Apr 2017 10:30:27 +0800	[thread overview]
Message-ID: <58F03443.9040202@intel.com> (raw)
In-Reply-To: <20170413130217.2316b0394192d8677f5ddbdf@linux-foundation.org>

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

  reply	other threads:[~2017-04-14  2:30 UTC|newest]

Thread overview: 134+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-13  9:35 [PATCH v9 0/5] Extend virtio-balloon for fast (de)inflating & fast live migration Wei Wang
2017-04-13  9:35 ` [Qemu-devel] " Wei Wang
2017-04-13  9:35 ` Wei Wang
2017-04-13  9:35 ` [PATCH v9 1/5] virtio-balloon: deflate via a page list Wei Wang
2017-04-13  9:35   ` [Qemu-devel] " Wei Wang
2017-04-13  9:35   ` Wei Wang
2017-04-13  9:35 ` Wei Wang
2017-04-13  9:35 ` [PATCH v9 2/5] virtio-balloon: VIRTIO_BALLOON_F_BALLOON_CHUNKS Wei Wang
2017-04-13  9:35 ` Wei Wang
2017-04-13  9:35   ` [Qemu-devel] " Wei Wang
2017-04-13  9:35   ` Wei Wang
2017-04-13 16:34   ` Michael S. Tsirkin
2017-04-13 16:34     ` [Qemu-devel] " Michael S. Tsirkin
2017-04-13 16:34     ` Michael S. Tsirkin
2017-04-13 17:03     ` Matthew Wilcox
2017-04-13 17:03       ` [Qemu-devel] " Matthew Wilcox
2017-04-13 17:03       ` Matthew Wilcox
2017-04-13 17:03     ` Matthew Wilcox
2017-04-14  8:37     ` [virtio-dev] " Wei Wang
2017-04-14  8:37     ` Wei Wang
2017-04-14  8:37       ` [Qemu-devel] [virtio-dev] " Wei Wang
2017-04-14  8:37       ` Wei Wang
2017-04-14  8:37       ` Wei Wang
2017-04-14 21:38       ` Michael S. Tsirkin
2017-04-14 21:38         ` [Qemu-devel] [virtio-dev] " Michael S. Tsirkin
2017-04-14 21:38         ` Michael S. Tsirkin
2017-04-14 21:38         ` Michael S. Tsirkin
2017-04-17  3:35         ` Wei Wang
2017-04-17  3:35         ` Wei Wang
2017-04-17  3:35           ` [Qemu-devel] [virtio-dev] " Wei Wang
2017-04-17  3:35           ` Wei Wang
2017-04-17  3:35           ` Wei Wang
2017-04-26 11:03           ` Wang, Wei W
2017-04-26 11:03           ` Wang, Wei W
2017-04-26 11:03             ` [Qemu-devel] [virtio-dev] " Wang, Wei W
2017-04-26 11:03             ` Wang, Wei W
2017-04-26 11:03             ` Wang, Wei W
2017-04-26 23:20             ` Michael S. Tsirkin
2017-04-26 23:20             ` Michael S. Tsirkin
2017-04-26 23:20               ` [Qemu-devel] " Michael S. Tsirkin
2017-04-26 23:20               ` Michael S. Tsirkin
2017-04-27  6:31               ` Wei Wang
2017-04-27  6:31               ` Wei Wang
2017-04-27  6:31                 ` [Qemu-devel] " Wei Wang
2017-04-27  6:31                 ` Wei Wang
2017-05-05 22:25                 ` Michael S. Tsirkin
2017-05-05 22:25                   ` [Qemu-devel] [virtio-dev] " Michael S. Tsirkin
2017-05-05 22:25                   ` Michael S. Tsirkin
2017-05-05 22:25                   ` Michael S. Tsirkin
2017-05-07  4:19                   ` Wang, Wei W
2017-05-07  4:19                     ` [Qemu-devel] [virtio-dev] " Wang, Wei W
2017-05-07  4:19                     ` Wang, Wei W
2017-05-07  4:19                     ` Wang, Wei W
2017-05-08 17:40                     ` Michael S. Tsirkin
2017-05-08 17:40                       ` [Qemu-devel] [virtio-dev] " Michael S. Tsirkin
2017-05-08 17:40                       ` Michael S. Tsirkin
2017-05-08 17:40                       ` Michael S. Tsirkin
2017-05-09  2:45                       ` Wei Wang
2017-05-09  2:45                         ` [Qemu-devel] " Wei Wang
2017-05-09  2:45                         ` Wei Wang
2017-05-09  2:45                       ` Wei Wang
2017-05-08 17:40                     ` Michael S. Tsirkin
2017-05-07  4:19                   ` Wang, Wei W
2017-05-05 22:25                 ` Michael S. Tsirkin
2017-04-14 21:38       ` Michael S. Tsirkin
2017-04-13 16:34   ` Michael S. Tsirkin
2017-04-13  9:35 ` [PATCH v9 3/5] mm: function to offer a page block on the free list Wei Wang
2017-04-13  9:35 ` Wei Wang
2017-04-13  9:35   ` [Qemu-devel] " Wei Wang
2017-04-13  9:35   ` Wei Wang
2017-04-13 20:02   ` Andrew Morton
2017-04-13 20:02     ` [Qemu-devel] " Andrew Morton
2017-04-13 20:02     ` Andrew Morton
2017-04-13 20:02     ` Andrew Morton
2017-04-14  2:30     ` Wei Wang [this message]
2017-04-14  2:30       ` [Qemu-devel] " Wei Wang
2017-04-14  2:30       ` Wei Wang
2017-04-14  2:58       ` Matthew Wilcox
2017-04-14  2:58       ` Matthew Wilcox
2017-04-14  2:58         ` [Qemu-devel] " Matthew Wilcox
2017-04-14  2:58         ` Matthew Wilcox
2017-04-14  8:58         ` Wei Wang
2017-04-14  8:58         ` Wei Wang
2017-04-14  8:58           ` [Qemu-devel] " Wei Wang
2017-04-14  8:58           ` Wei Wang
2017-04-14  2:30     ` Wei Wang
2017-04-13  9:35 ` [PATCH v9 4/5] mm: export symbol of next_zone and first_online_pgdat Wei Wang
2017-04-13  9:35 ` Wei Wang
2017-04-13  9:35   ` [Qemu-devel] " Wei Wang
2017-04-13  9:35   ` Wei Wang
2017-04-13  9:35 ` [PATCH v9 5/5] virtio-balloon: VIRTIO_BALLOON_F_MISC_VQ Wei Wang
2017-04-13  9:35   ` [Qemu-devel] " Wei Wang
2017-04-13  9:35   ` Wei Wang
2017-04-13 17:08   ` Michael S. Tsirkin
2017-04-13 17:08   ` Michael S. Tsirkin
2017-04-13 17:08     ` [Qemu-devel] " Michael S. Tsirkin
2017-04-13 17:08     ` Michael S. Tsirkin
2017-04-27  6:33     ` Wei Wang
2017-04-27  6:33     ` Wei Wang
2017-04-27  6:33       ` [Qemu-devel] " Wei Wang
2017-04-27  6:33       ` Wei Wang
2017-05-05 22:21       ` Michael S. Tsirkin
2017-05-05 22:21       ` Michael S. Tsirkin
2017-05-05 22:21         ` [Qemu-devel] " Michael S. Tsirkin
2017-05-05 22:21         ` Michael S. Tsirkin
2017-05-07  4:20         ` Wang, Wei W
2017-05-07  4:20         ` Wang, Wei W
2017-05-07  4:20           ` [Qemu-devel] " Wang, Wei W
2017-05-07  4:20           ` Wang, Wei W
2017-04-13  9:35 ` Wei Wang
2017-04-13 20:44 ` [PATCH v9 0/5] Extend virtio-balloon for fast (de)inflating & fast live migration Matthew Wilcox
2017-04-13 20:44   ` [Qemu-devel] " Matthew Wilcox
2017-04-13 20:44   ` Matthew Wilcox
2017-04-13 20:44   ` Matthew Wilcox
2017-04-14  1:50   ` Michael S. Tsirkin
2017-04-14  1:50   ` Michael S. Tsirkin
2017-04-14  1:50     ` [Qemu-devel] " Michael S. Tsirkin
2017-04-14  1:50     ` Michael S. Tsirkin
2017-04-14  2:28     ` Wei Wang
2017-04-14  2:28     ` Wei Wang
2017-04-14  2:28       ` [Qemu-devel] " Wei Wang
2017-04-14  2:28       ` Wei Wang
2017-04-14  2:57       ` Michael S. Tsirkin
2017-04-14  2:57       ` Michael S. Tsirkin
2017-04-14  2:57         ` [Qemu-devel] " Michael S. Tsirkin
2017-04-14  2:57         ` Michael S. Tsirkin
2017-04-14  9:47     ` Matthew Wilcox
2017-04-14  9:47       ` [Qemu-devel] " Matthew Wilcox
2017-04-14  9:47       ` Matthew Wilcox
2017-04-14 14:22       ` Michael S. Tsirkin
2017-04-14 14:22         ` [Qemu-devel] " Michael S. Tsirkin
2017-04-14 14:22         ` Michael S. Tsirkin
2017-04-14 14:22       ` Michael S. Tsirkin
2017-04-14  9:47     ` Matthew Wilcox

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=58F03443.9040202@intel.com \
    --to=wei.w.wang@intel.com \
    --cc=aarcange@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=amit.shah@redhat.com \
    --cc=cornelia.huck@de.ibm.com \
    --cc=dave.hansen@intel.com \
    --cc=david@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=liliang.opensource@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@techsingularity.net \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=virtio-dev@lists.oasis-open.org \
    --cc=virtualization@lists.linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.