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] [day] [month] [year] [list]
Message-ID: <1fb8832f-18c1-cc12-7616-1d724b2bdb4f@suse.cz>
Date:   Mon, 20 Apr 2020 11:29:21 +0200
From:   Vlastimil Babka <vbabka@...e.cz>
To:     Roman Gushchin <guro@...com>
Cc:     Andrew Morton <akpm@...ux-foundation.org>,
        Michal Hocko <mhocko@...nel.org>, linux-mm@...ck.org,
        kernel-team@...com, linux-kernel@...r.kernel.org,
        Rik van Riel <riel@...riel.com>,
        Mel Gorman <mgorman@...hsingularity.net>,
        Qian Cai <cai@....pw>, Andrea Arcangeli <aarcange@...hat.com>,
        Joonsoo Kim <js1304@...il.com>
Subject: Re: [PATCH RFC] mm: compaction: avoid migrating non-cma pages to a
 cma area

On 4/17/20 9:21 PM, Roman Gushchin wrote:
> On Fri, Apr 17, 2020 at 10:37:14AM +0200, Vlastimil Babka wrote:
>> But I've only now also realized how dynamic setting cc->cma is. So in case a
>> zone consists mostly of CMA blocks, removing ALLOC_CMA in
>> __compaction_suitable() would be actually wrong and prevent compaction from
>> doing any work? Sigh. Any idea about that?
> 
> Hm, idk, is it a realistic setup? Looks like it depends significantly on
> the exact usecase.

Yes :/ depends e.g. on how many hugepages are reserved, right?

> Another option is to move the cma area closer to the beginning of a zone.

That wouldn't hurt I guess.

>> 
>> >> 
>> >> And long-term what happens if the "CMA using ZONE_MOVABLE" approach is merged
>> >> and there are not more CMA migratetypes to test? Might this change actually also
>> >> avoid your issue, as said pages without __GFP_MOVABLE won't end up in a
>> >> ZONE_MOVABLE?
>> > 
>> > Yeah, this is what I was thinking about. Basically I want to mimic this behavior
>> > right now. Once this approach will be implemented and merged, it will happen
>> > automatically: obviously, compaction won't move pages between different zones.
> 
> After the second thought it's not so obvious: CMA would need to migrate pages
> (data) between zones, right? It might bring some other complications.

I don't recall how it was implemented, but I assume yeah. There shouldn't be
complications I think, migrating out of CMA area should cause no issue for CMA,
and such migrations between zones or even nodes already happen.

>> 
>> That will be much better. Can't wait, then :)
> 
> Yeah, if it will happen soon-ish, we can just wait. I just don't know
> how hard it is and how many edge cases are there to be figured out first.
> 
> Do you think that it's better to wait and do not merge this patch upstream?

We could probably merge it and watch for issues, but I'd like to have also Mel
and Joonsoo comment on it :)

Thanks,
Vlastimil

> Thanks!
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ