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: <20171011112415.6hsudsrqhyuwjffx@dhcp22.suse.cz>
Date:   Wed, 11 Oct 2017 13:24:15 +0200
From:   Michal Hocko <mhocko@...nel.org>
To:     Vlastimil Babka <vbabka@...e.cz>
Cc:     Michael Ellerman <mpe@...erman.id.au>,
        Andrew Morton <akpm@...ux-foundation.org>,
        KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>,
        Reza Arbab <arbab@...ux.vnet.ibm.com>,
        Yasuaki Ishimatsu <yasu.isimatu@...il.com>,
        qiuxishi@...wei.com, Igor Mammedov <imammedo@...hat.com>,
        Vitaly Kuznetsov <vkuznets@...hat.com>, linux-mm@...ck.org,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/2] mm, memory_hotplug: do not fail offlining too early

On Wed 11-10-17 13:17:13, Vlastimil Babka wrote:
> On 10/11/2017 10:13 AM, Michal Hocko wrote:
> > On Wed 11-10-17 10:04:39, Vlastimil Babka wrote:
> >> On 10/11/2017 08:51 AM, Michal Hocko wrote:
> > [...]
> >>> This is really strange! As you write in other email the page is
> >>> reserved. That means that some of the earlier checks 
> >>> 	if (zone_idx(zone) == ZONE_MOVABLE)
> >>> 		return false;
> >>> 	mt = get_pageblock_migratetype(page);
> >>> 	if (mt == MIGRATE_MOVABLE || is_migrate_cma(mt))
> >>
> >> The MIGRATE_MOVABLE check is indeed bogus, because that doesn't
> >> guarantee there are no unmovable pages in the block (CMA block OTOH
> >> should be a guarantee).
> > 
> > OK, thanks for confirmation. I will remove the MIGRATE_MOVABLE check
> > here. Do you think it is worth removing CMA check as well? This is
> > merely an optimization AFAIU because we do not have to check the full
> > pageblockworth of pfns.
> 
> Actually, we should remove the CMA part as well. It's true that
> MIGRATE_CMA does guarantee that the *buddy allocator* won't allocate
> non-MOVABLE pages from the pageblock. But if the memory got allocated as
> an actual CMA allocation (alloc_contig...) it will almost certainly not
> be movable.

That was my suspicious. Thanks!
-- 
Michal Hocko
SUSE Labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ