xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Jeremy Fitzhardinge <jeremy@goop.org>
To: M A Young <m.a.young@durham.ac.uk>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
	Dave McCracken <dcm@mccr.org>,
	Ian Campbell <Ian.Campbell@citrix.com>
Subject: Re: [PATCH] Balloon driver crash
Date: Tue, 08 Jun 2010 11:34:42 -0700	[thread overview]
Message-ID: <4C0E8D42.1010706@goop.org> (raw)
In-Reply-To: <alpine.LFD.2.00.1006081852440.5285@vega2.dur.ac.uk>

On 06/08/2010 11:08 AM, M A Young wrote:
> On Tue, 8 Jun 2010, Jeremy Fitzhardinge wrote:
>
>> On 06/08/2010 02:25 AM, M A Young wrote:
>>> This patch fixes an error in commit
>>> f4685d0ed041523d1bd5124c5872459681aca876
>>> "Add hugepage support to balloon driver" that was causing the balloon
>>> driver to crash when shrinking the memory used by Domain-0.
>>
>> Thanks.  But why haven't I seen this?
>
> Good question, but I think you only see the crash in a limited memory
> situation. I don't claim to be an expert in what is going on, but a
> few lines earlier you have the the loop
>
>         for (i = 0; i < nr_pages; i++) {
>                 if ((page = alloc_pages(GFP_BALLOON, balloon_order))
> == NULL) {
>                         nr_pages = i;
>                         need_sleep = 1;
>                         break;
>                 }
>
>                 pfn = page_to_pfn(page);
>                 frame_list[i] = pfn_to_mfn(pfn);
>
>                 scrub_page(page);
>         }
>
> If alloc_pages(GFP_BALLOON, balloon_order) is never NULL during the
> loop then page is left set to be one of the pages you are freeing.
> From then on PageHighMem(pfn_to_page(lpfn)) and PageHighMem(page)
> could easily the same and you will only have a problem if some of the
> pages you are freeing are PageHighMem and some aren't.
>
> If alloc_pages(GFP_BALLOON, balloon_order) is null somewhere in the
> loop (presumably because it can't find enough pages to free) then the
> process will crash.

I think the short answer is that I always run 64-bit dom0, so there's no
highmem...

    J

  reply	other threads:[~2010-06-08 18:34 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-03 13:37 Balloon driver crash M A Young
2010-06-03 19:37 ` M A Young
2010-06-03 20:36   ` Ian Campbell
2010-06-03 22:38     ` Dave McCracken
2010-06-07 19:29       ` M A Young
2010-06-08  7:56         ` Ian Campbell
2010-06-08  8:28           ` M A Young
2010-06-08  8:42             ` Ian Campbell
2010-06-08  9:25               ` [PATCH] " M A Young
2010-06-08 10:59                 ` Pasi Kärkkäinen
2010-06-08 11:07                   ` M A Young
2010-06-08 16:43                 ` Jeremy Fitzhardinge
2010-06-08 18:08                   ` M A Young
2010-06-08 18:34                     ` Jeremy Fitzhardinge [this message]
2010-06-08 22:48       ` Jeremy Fitzhardinge
2010-06-08 23:08         ` M A Young
2010-06-08 23:38           ` Jeremy Fitzhardinge

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=4C0E8D42.1010706@goop.org \
    --to=jeremy@goop.org \
    --cc=Ian.Campbell@citrix.com \
    --cc=dcm@mccr.org \
    --cc=m.a.young@durham.ac.uk \
    --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).