This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


[Xen-devel] Re: Linux balloon driver stops accepting target_kb for a lon

To: "Dan Magenheimer" <dan.magenheimer@xxxxxxxxxx>
Subject: [Xen-devel] Re: Linux balloon driver stops accepting target_kb for a long time
From: "Jan Beulich" <JBeulich@xxxxxxxxxx>
Date: Tue, 24 Aug 2010 08:45:10 +0100
Cc: jeremy@xxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxx, Keir Fraser <Keir.Fraser@xxxxxxxxxxxxx>
Delivery-date: Tue, 24 Aug 2010 00:45:57 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <af1cf3f8-2df8-496e-83a0-4d6407ab7e4f@default>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <af1cf3f8-2df8-496e-83a0-4d6407ab7e4f@default>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
>>> On 24.08.10 at 00:45, Dan Magenheimer <dan.magenheimer@xxxxxxxxxx> wrote:
> 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?

How could this be a problem? Calling schedule() is a yield, not an
indefinite sleep, and hence the loop will resume as soon as there's
no higher priority runnable task anymore for a long enough time
(obviously very much less than 30 minutes, unless something
really odd is running on your box).

Furthermore, besides the obvious option of inserting some debug
code, I think SysRq-t would also allow you to check whether
balloon_process() indeed doesn't exit over a period of minutes.


Xen-devel mailing list