Re: [PATCH v1 2/3] virtio-balloon: deflate up to oom_pages on OOM

From
Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Date
2017-10-22 04:11:13
Michael S. Tsirkin wrote:
On Fri, Oct 20, 2017 at 07:54:25PM +0800, Wei Wang wrote:
quoted
The current implementation only deflates 256 pages even when a user
specifies more than that via the oom_pages module param. This patch
enables the deflating of up to oom_pages pages if there are enough
inflated pages.
This seems reasonable. Does this by itself help?
At least
quoted
-	num_freed_pages = leak_balloon(vb, oom_pages);
+
+	/* Don't deflate more than the number of inflated pages */
+	while (npages && atomic64_read(&vb->num_pages))
+		npages -= leak_balloon(vb, npages);
don't we need to abort if leak_balloon() returned 0 for some reason?
Thread (1 message) 1 message, 1 author, last reply 2017-10-22
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help