xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Wei Yang <richard.weiyang@gmail.com>
To: David Hildenbrand <david@redhat.com>
Cc: Juergen Gross <jgross@suse.com>,
	xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org,
	Boris Ostrovsky <boris.ostrovsky@oracle.com>,
	Stefano Stabellini <sstabellini@kernel.org>,
	stable@vger.kernel.org,
	Marek Marczykowski-G??recki <marmarek@invisiblethingslab.com>,
	Wei Yang <richard.weiyang@gmail.com>,
	Michal Hocko <mhocko@kernel.org>
Subject: Re: [PATCH] xen/balloon: fix page onlining when populating new zone
Date: Fri, 8 Apr 2022 23:16:36 +0000	[thread overview]
Message-ID: <20220408231636.dz3spgicntflr7wu@master> (raw)
In-Reply-To: <f423e210-3e28-73f8-1082-869ef680b9b0@redhat.com>

On Thu, Apr 07, 2022 at 11:00:33AM +0200, David Hildenbrand wrote:
>On 07.04.22 10:50, Juergen Gross wrote:
>> On 07.04.22 10:23, David Hildenbrand wrote:
>>> On 06.04.22 15:32, Juergen Gross wrote:
>>>> When onlining a new memory page in a guest the Xen balloon driver is
>>>> adding it to the ballooned pages instead making it available to be
>>>> used immediately. This is meant to enable to add a new upper memory
>>>> limit to a guest via hotplugging memory, without having to assign the
>>>> new memory in one go.
>>>>
>>>> In case the upper memory limit will be raised above 4G, the new memory
>>>> will populate the ZONE_NORMAL memory zone, which wasn't populated
>>>> before. The newly populated zone won't be added to the list of zones
>>>> looked at by the page allocator though, as only zones with available
>>>> memory are being added, and the memory isn't yet available as it is
>>>> ballooned out.
>>>
>>> I think we just recently discussed these corner cases on the -mm list.
>> 
>> Indeed.
>> 
>>> The issue is having effectively populated zones without manages pages
>>> because everything is inflated in a balloon.
>> 
>> Correct.
>> 
>>> That can theoretically also happen when managing to fully inflate the
>>> balloon in one zone and then, somehow, the zones get rebuilt.
>> 
>> I think you are right. I didn't think of that scenario.
>> 
>>> build_zonerefs_node() documents "Add all populated zones of a node to
>>> the zonelist" but checks for managed zones, which is wrong.
>>>
>>> See https://lkml.kernel.org/r/20220201070044.zbm3obsoimhz3xd3@master
>> 
>> I found commit 6aa303defb7454 which introduced this test. I thought
>> it was needed due to the problem this commit tried to solve. Maybe I
>> was wrong and that commit shouldn't have changed the condition when
>> building the zonelist, but just the ones in the allocation paths.
>
>In regard to kswapd, that is currently being worked on via
>
>https://lkml.kernel.org/r/20220329010901.1654-2-richard.weiyang@gmail.com
>

Thanks, David

Do you think it is the right time to repost the original fix?

>-- 
>Thanks,
>
>David / dhildenb

-- 
Wei Yang
Help you, Help me


      reply	other threads:[~2022-04-08 23:16 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-06 13:32 [PATCH] xen/balloon: fix page onlining when populating new zone Juergen Gross
2022-04-06 23:31 ` kernel test robot
2022-04-07  2:06 ` kernel test robot
2022-04-07  5:09 ` kernel test robot
2022-04-07  8:23 ` David Hildenbrand
2022-04-07  8:50   ` Juergen Gross
2022-04-07  9:00     ` David Hildenbrand
2022-04-08 23:16       ` Wei Yang [this message]

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=20220408231636.dz3spgicntflr7wu@master \
    --to=richard.weiyang@gmail.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=david@redhat.com \
    --cc=jgross@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marmarek@invisiblethingslab.com \
    --cc=mhocko@kernel.org \
    --cc=sstabellini@kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=xen-devel@lists.xenproject.org \
    /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).