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: <AF721DC0-B618-4ECC-8752-87D413E203A7@nvidia.com>
Date:   Thu, 13 Jan 2022 09:50:10 -0500
From:   Zi Yan <ziy@...dia.com>
To:     David Hildenbrand <david@...hat.com>
Cc:     Mike Rapoport <rppt@...nel.org>, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org,
        Michael Ellerman <mpe@...erman.id.au>,
        Christoph Hellwig <hch@....de>,
        Marek Szyprowski <m.szyprowski@...sung.com>,
        Robin Murphy <robin.murphy@....com>,
        linuxppc-dev@...ts.ozlabs.org,
        virtualization@...ts.linux-foundation.org,
        iommu@...ts.linux-foundation.org, Vlastimil Babka <vbabka@...e.cz>,
        Mel Gorman <mgorman@...hsingularity.net>,
        Eric Ren <renzhengeek@...il.com>
Subject: Re: [RFC PATCH v3 1/8] mm: page_alloc: avoid merging non-fallbackable pageblocks with others.

On 13 Jan 2022, at 7:28, David Hildenbrand wrote:

> On 13.01.22 12:36, Mike Rapoport wrote:
>> On Wed, Jan 12, 2022 at 11:54:49AM +0100, David Hildenbrand wrote:
>>> On 05.01.22 22:47, Zi Yan wrote:
>>>> From: Zi Yan <ziy@...dia.com>
>>>>
>>>> This is done in addition to MIGRATE_ISOLATE pageblock merge avoidance.
>>>> It prepares for the upcoming removal of the MAX_ORDER-1 alignment
>>>> requirement for CMA and alloc_contig_range().
>>>>
>>>> MIGRARTE_HIGHATOMIC should not merge with other migratetypes like
>>>> MIGRATE_ISOLATE and MIGRARTE_CMA[1], so this commit prevents that too.
>>>> Also add MIGRARTE_HIGHATOMIC to fallbacks array for completeness.
>>>>
>>>> [1] https://lore.kernel.org/linux-mm/20211130100853.GP3366@techsingularity.net/
>>>>
>>>> Signed-off-by: Zi Yan <ziy@...dia.com>
>>>> ---
>>>>  include/linux/mmzone.h |  6 ++++++
>>>>  mm/page_alloc.c        | 28 ++++++++++++++++++----------
>>>>  2 files changed, 24 insertions(+), 10 deletions(-)
>>>>
>>
>> ...
>>
>>>> @@ -3545,8 +3553,8 @@ int __isolate_free_page(struct page *page, unsigned int order)
>>>>  		struct page *endpage = page + (1 << order) - 1;
>>>>  		for (; page < endpage; page += pageblock_nr_pages) {
>>>>  			int mt = get_pageblock_migratetype(page);
>>>> -			if (!is_migrate_isolate(mt) && !is_migrate_cma(mt)
>>>> -			    && !is_migrate_highatomic(mt))
>>>> +			/* Only change normal pageblock */
>>>> +			if (migratetype_has_fallback(mt))
>>>>  				set_pageblock_migratetype(page,
>>>>  							  MIGRATE_MOVABLE);
>>>>  		}
>>>
>>> That part is a nice cleanup IMHO. Although the "has fallback" part is a
>>> bit imprecise. "migratetype_is_mergable()" might be a bit clearer.
>>> ideally "migratetype_is_mergable_with_other_types()". Can we come up
>>> with a nice name for that?
>>
>> migratetype_is_mergable() kinda implies "_with_other_types", no?
>>
>> I like migratetype_is_mergable() more than _has_fallback().
>>
>> My $0.02 to bikeshedding :)
>
> :)
>
> Yeah, for me migratetype_is_mergable() would also be good enough. I
> think I was at first thinking one could mistake it with a dedicated
> migratetype. But such functions are historically called
>
> is_migrate_cma/is_migrate_cma/....
>
> -- 
> Thanks,
>
> David / dhildenb

OK. Will use migratetype_is_mergable() instead.


--
Best Regards,
Yan, Zi

Download attachment "signature.asc" of type "application/pgp-signature" (855 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ