linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Ian Campbell <Ian.Campbell@eu.citrix.com>
To: Daniel Kiper <dkiper@net-space.pl>
Cc: "akpm@linux-foundation.org" <akpm@linux-foundation.org>,
	"andi.kleen@intel.com" <andi.kleen@intel.com>,
	"haicheng.li@linux.intel.com" <haicheng.li@linux.intel.com>,
	"fengguang.wu@intel.com" <fengguang.wu@intel.com>,
	"jeremy@goop.org" <jeremy@goop.org>,
	"konrad.wilk@oracle.com" <konrad.wilk@oracle.com>,
	Dan Magenheimer <dan.magenheimer@oracle.com>,
	"v.tolstov@selfip.ru" <v.tolstov@selfip.ru>,
	"pasik@iki.fi" <pasik@iki.fi>,
	"dave@linux.vnet.ibm.com" <dave@linux.vnet.ibm.com>,
	"wdauchy@gmail.com" <wdauchy@gmail.com>,
	"rientjes@google.com" <rientjes@google.com>,
	"xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>
Subject: Re: [PATCH R4 4/7] xen/balloon: Protect against CPU exhaust by event/x process
Date: Mon, 14 Mar 2011 15:04:49 +0000	[thread overview]
Message-ID: <1300115089.17339.2183.camel@zakaz.uk.xensource.com> (raw)
In-Reply-To: <20110308214824.GE27331@router-fw-old.local.net-space.pl>

On Tue, 2011-03-08 at 21:48 +0000, Daniel Kiper wrote:
> Protect against CPU exhaust by event/x process during
> errors by adding some delays in scheduling next event
> and retry count limit.

The addition of a default retry count limit reverses the change made in
bc2c0303226ec716854d3c208c7f84fe7aa35cd7. That change was made to allow
system wide ballooning daemons to work as expected and I don't think a
strong argument has been made for undoing it here.

I think the exponential back-off element of this patch is probably all
that is needed to avoid using too much CPU.

We are talking about polling at most once a second (backing off pretty
quickly to once every 32s with this patch) -- is that really enough to
"exhaust" the CPU running event/x?

Also this patch seems to make the driver quite chatty:

> +	pr_info("xen_balloon: Retry count: %lu/%lu\n", balloon_stats.retry_count,
> +			balloon_stats.max_retry_count);

Not needed. The balloon driver is a best effort background thing, it
doesn't need to be spamming the system logs each time something doesn't
go quite right first time, it should just continue on silently in the
background. It should only be logging if something goes catastrophically
wrong (in which case pr_info isn't really sufficient).

> +	if (rc <= 0) {
> +		pr_info("xen_balloon: %s: Cannot allocate memory\n", __func__);

Likewise.

> +			pr_info("xen_balloon: %s: Cannot allocate memory\n", __func__);

And again.

Ian.

--
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>

  reply	other threads:[~2011-03-14 15:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-08 21:48 Daniel Kiper
2011-03-14 15:04 ` Ian Campbell [this message]
2011-03-15 15:17   ` Daniel Kiper
2011-03-15 15:47     ` Ian Campbell

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=1300115089.17339.2183.camel@zakaz.uk.xensource.com \
    --to=ian.campbell@eu.citrix.com \
    --cc=akpm@linux-foundation.org \
    --cc=andi.kleen@intel.com \
    --cc=dan.magenheimer@oracle.com \
    --cc=dave@linux.vnet.ibm.com \
    --cc=dkiper@net-space.pl \
    --cc=fengguang.wu@intel.com \
    --cc=haicheng.li@linux.intel.com \
    --cc=jeremy@goop.org \
    --cc=konrad.wilk@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=pasik@iki.fi \
    --cc=rientjes@google.com \
    --cc=v.tolstov@selfip.ru \
    --cc=wdauchy@gmail.com \
    --cc=xen-devel@lists.xensource.com \
    /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