[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20251001090755.GA66706@dev-dsk-acsjakub-1b-6f9934e2.eu-west-1.amazon.com>
Date: Wed, 1 Oct 2025 09:07:55 +0000
From: Jakub Acs <acsjakub@...zon.de>
To: David Hildenbrand <david@...hat.com>
CC: <linux-mm@...ck.org>, Andrew Morton <akpm@...ux-foundation.org>, Xu Xin
<xu.xin16@....com.cn>, Chengming Zhou <chengming.zhou@...ux.dev>, Peter Xu
<peterx@...hat.com>, Axel Rasmussen <axelrasmussen@...gle.com>,
<linux-kernel@...r.kernel.org>, <stable@...r.kernel.org>
Subject: Re: [PATCH v2] mm/ksm: fix flag-dropping behavior in ksm_madvise
On Tue, Sep 30, 2025 at 05:32:25PM +0200, David Hildenbrand wrote:
> If we want a smaller patch for easier backporting, we could split
> off the VM_MERGEABLE change into a separate patch and do all the
> other ones for consistency in another
>
> Reading what we do VM_HIGH_ARCH_BIT_* , we use BIT(), which does
>
> #define BIT(nr) (UL(1) << (nr))
>
> So likely we should just clean it all up an use e.g.,
>
> #define VM_NONE 0
> #define VM_READ BIT(0)
> #define VM_WRITE BIT(1)
>
> etc.
>
> So likely it's best to do in a first fix
> #define VM_MERGEABLE BIT(31)
>
> And in a follow-up cleanup patch convert all the other ones.
Sent in v3:
https://lore.kernel.org/all/20251001090353.57523-1-acsjakub@amazon.de/
It's the first time I sent a series, please let me know if I did
something wrong :)
>
> Sorry for not thinking about BIT() earlier
>
No worries :)
Kind Regards,
Jakub
Amazon Web Services Development Center Germany GmbH
Tamara-Danz-Str. 13
10243 Berlin
Geschaeftsfuehrung: Christian Schlaeger
Eingetragen am Amtsgericht Charlottenburg unter HRB 257764 B
Sitz: Berlin
Ust-ID: DE 365 538 597
Powered by blists - more mailing lists