[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <MW2PR2101MB1052BDB462E010C4BD751FF3D7320@MW2PR2101MB1052.namprd21.prod.outlook.com>
Date: Mon, 20 Jan 2020 19:20:57 +0000
From: Michael Kelley <mikelley@...rosoft.com>
To: "lantianyu1986@...il.com" <lantianyu1986@...il.com>,
KY Srinivasan <kys@...rosoft.com>,
Haiyang Zhang <haiyangz@...rosoft.com>,
Stephen Hemminger <sthemmin@...rosoft.com>,
"sashal@...nel.org" <sashal@...nel.org>,
"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
"dan.j.williams@...el.com" <dan.j.williams@...el.com>,
"jgg@...pe.ca" <jgg@...pe.ca>,
"dave.hansen@...ux.intel.com" <dave.hansen@...ux.intel.com>,
"richardw.yang@...ux.intel.com" <richardw.yang@...ux.intel.com>,
"namit@...are.com" <namit@...are.com>,
Tianyu Lan <Tianyu.Lan@...rosoft.com>,
"david@...hat.com" <david@...hat.com>,
"christophe.leroy@....fr" <christophe.leroy@....fr>
CC: "linux-hyperv@...r.kernel.org" <linux-hyperv@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-mm@...ck.org" <linux-mm@...ck.org>,
vkuznets <vkuznets@...hat.com>,
"eric.devolder@...cle.com" <eric.devolder@...cle.com>
Subject: RE: [RFC PATCH V2 1/10] mm/resource: Move child to new resource when
release mem region.
From: Tianyu Lan <Tianyu.Lan@...rosoft.com> Sent: Tuesday, January 7, 2020 5:10 AM
>
> 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.
Let me also suggests some wording improvements to the commit message:
When releasing a mem region, the old mem region may need to be
split into two regions. In this case, the current code allocates the new
region and adjust the original region to specify a smaller range. But child
regions that fall into the range of the new region are not moved to that
new region. Consequently, when running __adjust_resource() on the
original region, it detects that the child region's range is out of the new
range, and returns an error.
Fix this by moving appropriate child resources to the new region before
adjusting the original mem region range.
>
> Signed-off-by: Tianyu Lan <Tianyu.Lan@...rosoft.com>
> ---
> kernel/resource.c | 38 ++++++++++++++++++++++++++++++++++----
> 1 file changed, 34 insertions(+), 4 deletions(-)
>
Powered by blists - more mailing lists