From: Rusty Russell <rusty@rustcorp.com.au>
To: Josh Triplett <josh@joshtriplett.org>,
Andrew Morton <akpm@linux-foundation.org>
Cc: Randy Dunlap <rdunlap@infradead.org>,
mm-commits@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-mm@kvack.org, linux-fsdevel@vger.kernel.org,
linux-next@vger.kernel.org, virtio-dev@lists.oasis-open.org,
"Michael S. Tsirkin" <mst@redhat.com>
Subject: Re: mmotm 2014-03-10-15-35 uploaded (virtio_balloon)
Date: Mon, 17 Mar 2014 14:02:31 +1030 [thread overview]
Message-ID: <877g7tts8g.fsf@rustcorp.com.au> (raw)
In-Reply-To: <20140311214014.GA18708@leaf>
Josh Triplett <josh@joshtriplett.org> writes:
> On Tue, Mar 11, 2014 at 12:31:33PM -0700, Andrew Morton wrote:
> I'd love to do that, but as far as I can tell, VIRTIO_BALLOON has gone
> out of its way to support !CONFIG_BALLOON_COMPACTION.
>
> Could someone who works on VIRTIO_BALLOON provide some details here
> about the distinction?
Balloon gives pages back to the host. If you want to do compaction,
we'll try to help you, but it's independent.
The normal way to do this would be to put a dummy inline version of
balloon_page_enqueue etc in the header. If you look at how the virtio
balloon code looked before e22504296d4f64fbbbd741602ab47ee874649c18
you'll see what it should do, eg:
#ifndef CONFIG_BALLOON_COMPACTION
struct balloon_dev_info {
struct list_head pages; /* Pages enqueued & handled to Host */
};
static inline struct page *balloon_page_enqueue(struct balloon_dev_info *b_dev_info)
{
struct page *page = alloc_page(GFP_HIGHUSER | __GFP_NORETRY |
__GFP_NOMEMALLOC | __GFP_NOWARN)
if (page)
list_add(&page->lru, &b_dev_info->pages);
return page;
}
static inline struct page *balloon_page_dequeue(struct balloon_dev_info *b_dev_info)
{
struct page *page;
page = list_first_entry(&b_dev_info->pages, struct page, lru);
list_del(&page->lru);
return page;
}
static inline void balloon_page_free(struct page *page)
{
__free_page(page);
}
#else
...
Cheers,
Rusty.
--
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>
prev parent reply other threads:[~2014-03-17 3:32 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-10 22:37 mmotm 2014-03-10-15-35 uploaded akpm
2014-03-11 17:04 ` mmotm 2014-03-10-15-35 uploaded (media/pci/ttpci/av7110) Randy Dunlap
2014-03-11 17:12 ` mmotm 2014-03-10-15-35 uploaded (virtio_balloon) Randy Dunlap
2014-03-11 18:03 ` Andrew Morton
2014-03-11 19:20 ` Josh Triplett
2014-03-11 19:31 ` Andrew Morton
2014-03-11 21:40 ` Josh Triplett
2014-03-17 3:32 ` Rusty Russell [this message]
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=877g7tts8g.fsf@rustcorp.com.au \
--to=rusty@rustcorp.com.au \
--cc=akpm@linux-foundation.org \
--cc=josh@joshtriplett.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-next@vger.kernel.org \
--cc=mm-commits@vger.kernel.org \
--cc=mst@redhat.com \
--cc=rdunlap@infradead.org \
--cc=virtio-dev@lists.oasis-open.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).