[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200120141433.GI18451@dhcp22.suse.cz>
Date: Mon, 20 Jan 2020 15:14:33 +0100
From: Michal Hocko <mhocko@...nel.org>
To: Tianyu Lan <Tianyu.Lan@...rosoft.com>
Cc: David Hildenbrand <david@...hat.com>,
"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>,
Michael Kelley <mikelley@...rosoft.com>,
"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>,
"vbabka@...e.cz" <vbabka@...e.cz>,
"osalvador@...e.de" <osalvador@...e.de>,
Pasha Tatashin <Pavel.Tatashin@...rosoft.com>,
"rppt@...ux.ibm.com" <rppt@...ux.ibm.com>
Subject: Re: [EXTERNAL] Re: [RFC PATCH V2 2/10] mm: expose
is_mem_section_removable() symbol
On Fri 17-01-20 16:35:03, Tianyu Lan wrote:
[...]
> > Could you describe your usecase in more details please?
>
> Hyper-V sends hot-remove request message which just contains requested
> page number but not provide detail range. So Hyper-V driver needs to search
> suitable memory block in system memory to return back to host if there is no
> memory hot-add before. So I used the is_mem_section_removable() do such check.
As David described, you would be much better of by using
alloc_contig_range to find a memory that would be suitable for
hotremoving without any races.
--
Michal Hocko
SUSE Labs
Powered by blists - more mailing lists