Linux-HyperV Archive on lore.kernel.org
 help / color / Atom feed
From: Tianyu Lan <Tianyu.Lan@microsoft.com>
To: Dave Hansen <dave.hansen@intel.com>,
	"lantianyu1986@gmail.com" <lantianyu1986@gmail.com>,
	"dan.j.williams@intel.com" <dan.j.williams@intel.com>,
	"dave.hansen@linux.intel.com" <dave.hansen@linux.intel.com>,
	"mingo@kernel.org" <mingo@kernel.org>,
	"mpe@ellerman.id.au" <mpe@ellerman.id.au>,
	"pasha.tatashin@soleen.com" <pasha.tatashin@soleen.com>,
	"osalvador@suse.de" <osalvador@suse.de>,
	"richardw.yang@linux.intel.com" <richardw.yang@linux.intel.com>,
	"christophe.leroy@c-s.fr" <christophe.leroy@c-s.fr>,
	"bp@suse.de" <bp@suse.de>,
	"rdunlap@infradead.org" <rdunlap@infradead.org>,
	Michael Kelley <mikelley@microsoft.com>,
	KY Srinivasan <kys@microsoft.com>,
	"sashal@kernel.org" <sashal@kernel.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	vkuznets <vkuznets@redhat.com>,
	"linux-hyperv@vger.kernel.org" <linux-hyperv@vger.kernel.org>
Subject: RE: [PATCH] mm/resource: Move child to new resource when release mem region.
Date: Fri, 11 Oct 2019 14:53:06 +0000
Message-ID: <KL1P15301MB0261260E5DD0E3BA4FD80BC092970@KL1P15301MB0261.APCP153.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <77e08231-0687-8d8d-0faf-c490a8b510d4@intel.com>

On 10/10/2019 10:29 PM, Dave Hansen wrote:> On 10/10/19 12:28 AM, lantianyu1986@gmail.com wrote:
>> When release mem region, old mem region may be splited to
>> two regions. Current allocate new struct resource for high
>> end mem region but not move child resources whose ranges are
>> in the high end range to new resource. When adjust old mem
>> region's range, adjust_resource() detects child region's range
>> is out of new range and return error. Move child resources to
>> high end resource before adjusting old mem range.
> 
>  From the comment, it appears the old code intended to have the behavior
> that you are changing.  Could you explain _why_ this has become a
> problem for you?
Hi Dave:
    Thanks for your review. current code assumes that all children remain in
 the lower address entry for simplicity. For memory hot-remove, selecting
remove region via scanning system memory may hit case of child in the
higher address entry.

For example, the following output from /proc/iomem shows kernel code,
data and bss locate from 3a000000 to 3b5fffff and these resources are the
system ram resource's children. If the 39800000-39ffffff was selected as
remove range, the resource will be split into two ranges 00100000-397fffff
and 39800000-b87f1fff. Current code move kernel image related resources
under 00100000-397fffff resource. This will cause adjust_resource() return
error because children are not in the parent's range.

00100000-b87f1fff : System RAM
  3a000000-3ac00e80 : Kernel code
  3ac00e81-3b33883f : Kernel data
  3b4d3000-3b5fffff : Kernel bss




      reply index

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-10  7:28 lantianyu1986
2019-10-10 14:29 ` Dave Hansen
2019-10-11 14:53   ` Tianyu Lan [this message]

Reply instructions:

You may reply publically 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=KL1P15301MB0261260E5DD0E3BA4FD80BC092970@KL1P15301MB0261.APCP153.PROD.OUTLOOK.COM \
    --to=tianyu.lan@microsoft.com \
    --cc=bp@suse.de \
    --cc=christophe.leroy@c-s.fr \
    --cc=dan.j.williams@intel.com \
    --cc=dave.hansen@intel.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=kys@microsoft.com \
    --cc=lantianyu1986@gmail.com \
    --cc=linux-hyperv@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mikelley@microsoft.com \
    --cc=mingo@kernel.org \
    --cc=mpe@ellerman.id.au \
    --cc=osalvador@suse.de \
    --cc=pasha.tatashin@soleen.com \
    --cc=rdunlap@infradead.org \
    --cc=richardw.yang@linux.intel.com \
    --cc=sashal@kernel.org \
    --cc=vkuznets@redhat.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

Linux-HyperV Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-hyperv/0 linux-hyperv/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-hyperv linux-hyperv/ https://lore.kernel.org/linux-hyperv \
		linux-hyperv@vger.kernel.org linux-hyperv@archiver.kernel.org
	public-inbox-index linux-hyperv

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-hyperv


AGPL code for this site: git clone https://public-inbox.org/ public-inbox