Thread (4 messages) 4 messages, 2 authors, 2011-02-12

Re: [Xen-devel] Re: [PATCH R3 5/7] xen/balloon: Protect against CPU exhaust by event/x proces

From: Konrad Rzeszutek Wilk <hidden>
Date: 2011-02-10 17:11:30
Also in: lkml, xen-devel

On Thu, Feb 10, 2011 at 10:51:42AM -0500, Konrad Rzeszutek Wilk wrote:
On Thu, Feb 03, 2011 at 05:28:51PM +0100, Daniel Kiper wrote:
quoted
Protect against CPU exhaust by event/x process during
errors by adding some delays in scheduling next event.

Signed-off-by: Daniel Kiper <redacted>
---
 drivers/xen/balloon.c |   99 +++++++++++++++++++++++++++++++++++++++---------
 1 files changed, 80 insertions(+), 19 deletions(-)
diff --git a/drivers/xen/balloon.c b/drivers/xen/balloon.c
index 4223f64..ed103d4 100644
--- a/drivers/xen/balloon.c
+++ b/drivers/xen/balloon.c
@@ -66,6 +66,20 @@
 
 #define BALLOON_CLASS_NAME "xen_memory"
 
+/*
+ * balloon_process() state:
+ *
+ * BP_ERROR: error, go to sleep,
+ * BP_DONE: done or nothing to do,
+ * BP_HUNGRY: hungry.
+ */
+
+enum bp_state {
+	BP_ERROR,
BP_EAGAIN?

So if we fail to increase the first hour, we would keep on trying to
increase forever (with a 32 second delay between each call). Do you
think it makes sense (as a future patch, not tied in with this patchset)
to printout a printk(KERN_INFO that we have been trying to increase
for the last X hours, seconds and have not gone anywhere (and perhaps
stop trying to allocate more memory?).
Duh, you did that in the next patch with the mh_policy.

--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help