summaryrefslogtreecommitdiff
path: root/include/linux/balloon_compaction.h
diff options
context:
space:
mode:
authorNadav Amit <namit@vmware.com>2019-04-25 04:54:42 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-05-24 20:19:17 +0200
commit418a3ab1e7785799193c0f8628cd0f01c00a03ae (patch)
treed861dba41aab6ec9d35e6fc798cfe8cdaed5fcfb /include/linux/balloon_compaction.h
parent687685a3f246756a2a8c0d45820be42066ffce05 (diff)
mm/balloon_compaction: List interfaces
Introduce interfaces for ballooning enqueueing and dequeueing of a list of pages. These interfaces reduce the overhead of storing and restoring IRQs by batching the operations. In addition they do not panic if the list of pages is empty. Cc: Jason Wang <jasowang@redhat.com> Cc: linux-mm@kvack.org Cc: virtualization@lists.linux-foundation.org Acked-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Xavier Deguillard <xdeguillard@vmware.com> Signed-off-by: Nadav Amit <namit@vmware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/balloon_compaction.h')
-rw-r--r--include/linux/balloon_compaction.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/balloon_compaction.h b/include/linux/balloon_compaction.h
index f31521dcb09a..338aa27e4773 100644
--- a/include/linux/balloon_compaction.h
+++ b/include/linux/balloon_compaction.h
@@ -64,6 +64,10 @@ extern struct page *balloon_page_alloc(void);
extern void balloon_page_enqueue(struct balloon_dev_info *b_dev_info,
struct page *page);
extern struct page *balloon_page_dequeue(struct balloon_dev_info *b_dev_info);
+extern size_t balloon_page_list_enqueue(struct balloon_dev_info *b_dev_info,
+ struct list_head *pages);
+extern size_t balloon_page_list_dequeue(struct balloon_dev_info *b_dev_info,
+ struct list_head *pages, size_t n_req_pages);
static inline void balloon_devinfo_init(struct balloon_dev_info *balloon)
{