xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Dan Magenheimer <dan.magenheimer@oracle.com>
To: xen-devel@lists.xensource.com
Cc: jeremy@goop.org, Keir Fraser <Keir.Fraser@eu.citrix.com>,
	JBeulich@novell.com
Subject: Linux balloon driver stops accepting target_kb for a long time
Date: Mon, 23 Aug 2010 15:45:53 -0700 (PDT)	[thread overview]
Message-ID: <af1cf3f8-2df8-496e-83a0-4d6407ab7e4f@default> (raw)

Balloon experts --

I'm seeing a strange problem in either the balloon driver
or in the Xen code that provides the support for it... still
trying to narrow down which.

The problem appears when I am running in-kernel selfballooning
code and then only rarely... I'm not sure exactly what conditions
are required but for a long period of time (>30 minutes), writing
to target_kb inside a PV guest has no effect at all on the
memory size of the VM (as viewed inside the guest with "free -k")!
Under most conditions, writing to target_kb "immediately" changes
the memory size, but once in this state, no effect at all.
At the end of this long period of time, suddenly everything
is back to normal... and there's no obvious trigger that
signals the return to normalcy.

Note that though the problem is observed with selfballooning,
changing target_kb manually fails as well, so I suspect the
problem exists regardless of selfballooning but only
selfballooning is exercising the balloon sizing enough to
encounter the bug.

Reviewing code, one thing caught my attention.  In balloon_process(),
the balloon_mutex is down'ed then, under certain conditions
schedule() is called with the balloon_mutex still held and without
another timer set.  Any chance this could be a problem, especially
if another kernel thread invokes balloon_set_new_target()?
If so, what might finally kick the scheduled-out thread after
30 minutes to reset the balloon_timer and up the mutex?

If this is wrong, any other ideas what might be causing
this weird problem?

Thanks,
Dan

P.S. This is the Linux 2.6.18-based balloon driver (with latest
patches from xen-unstable), but I may see if I can reproduce it
on an upstream balloon driver as well.

             reply	other threads:[~2010-08-23 22:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-23 22:45 Dan Magenheimer [this message]
2010-08-24  7:45 ` Linux balloon driver stops accepting target_kb for a long time Jan Beulich
2010-08-24 22:38   ` Dan Magenheimer
2010-08-25  8:16     ` Jan Beulich

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=af1cf3f8-2df8-496e-83a0-4d6407ab7e4f@default \
    --to=dan.magenheimer@oracle.com \
    --cc=JBeulich@novell.com \
    --cc=Keir.Fraser@eu.citrix.com \
    --cc=jeremy@goop.org \
    --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;
as well as URLs for NNTP newsgroup(s).