lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <SG2P153MB0349F85FB0C1C02F55391F6D92350@SG2P153MB0349.APCP153.PROD.OUTLOOK.COM>
Date:   Mon, 13 Jan 2020 14:49:38 +0000
From:   Tianyu Lan <Tianyu.Lan@...rosoft.com>
To:     David Hildenbrand <david@...hat.com>,
        Michal Hocko <mhocko@...nel.org>,
        "lantianyu1986@...il.com" <lantianyu1986@...il.com>
CC:     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

> From: David Hildenbrand <david@...hat.com>
> Sent: Friday, January 10, 2020 9:42 PM
> To: Michal Hocko <mhocko@...nel.org>; lantianyu1986@...il.com
> Cc: KY Srinivasan <kys@...rosoft.com>; Haiyang Zhang
> <haiyangz@...rosoft.com>; Stephen Hemminger <sthemmin@...rosoft.com>;
> sashal@...nel.org; akpm@...ux-foundation.org; Michael Kelley
> <mikelley@...rosoft.com>; Tianyu Lan <Tianyu.Lan@...rosoft.com>; linux-
> hyperv@...r.kernel.org; linux-kernel@...r.kernel.org; linux-mm@...ck.org;
> vkuznets <vkuznets@...hat.com>; eric.devolder@...cle.com; vbabka@...e.cz;
> osalvador@...e.de; Pasha Tatashin <Pavel.Tatashin@...rosoft.com>;
> rppt@...ux.ibm.com
> Subject: [EXTERNAL] Re: [RFC PATCH V2 2/10] mm: expose
> is_mem_section_removable() symbol
> 
> On 07.01.20 14:36, Michal Hocko wrote:
> > On Tue 07-01-20 21:09:42, lantianyu1986@...il.com wrote:
> >> From: Tianyu Lan <Tianyu.Lan@...rosoft.com>
> >>
> >> Hyper-V balloon driver will use is_mem_section_removable() to check
> >> whether memory block is removable or not when receive memory hot
> >> remove msg. Expose it.
> >
> > I do not think this is a good idea. The check is inherently racy. Why
> > cannot the balloon driver simply hotremove the region when asked?
> >
> 
> It's not only racy, it also gives no guarantees. False postives and false negatives
> are possible.
> 
> If you want to avoid having to loop forever trying to offline when calling
> offline_and_remove_memory(), you could try to
> alloc_contig_range() the memory first and then play the PG_offline+notifier
> game like virtio-mem.
> 
> I don't remember clearly, but I think pinned pages can make offlining loop for a
> long time. And I remember there were other scenarios as well (including out of
> memory conditions and similar).
> 
> I sent an RFC [1] for powerpc/memtrace that does the same (just error
> handling is more complicated as it wants to offline and remove multiple
> consecutive memory blocks) - if you want to try to go down that path.
> 
Hi David & Michal:
	Thanks for your review. Some memory blocks are not suitable for hot-plug.
If not check memory block's removable, offline_pages() will report some failure error
e.g, "failed due to memory holes" and  "failure to isolate range". I think the check maybe
added into offline_and_remove_memory()? This may help to not create/expose a new
interface to do such check in module.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ