lkml.org 
[lkml]   [2022]   [Feb]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH RFC 05/13] mm/rmap: remove do_page_add_anon_rmap()
From
On 24.02.22 18:48, Linus Torvalds wrote:
> On Thu, Feb 24, 2022 at 9:41 AM David Hildenbrand <david@redhat.com> wrote:
>>
>> Actually, I thought about doing it similarly to what I did in
>> page_alloc.c with fpi_t:
>>
>> typedef int __bitwise fpi_t;
>>
>> #define FPI_NONE ((__force fpi_t)0)
>>
>> I can do something similar here.
>
> Yeah, that looks good. And then the relevant function declarations and
> definitions also have that explicit type there instead of 'int', which
> adds a bit more documentation for people grepping for use.
>

While at it already, I'll also add a patch to drop the "bool compound" parameter
from page_add_new_anon_rmap()

(description only)

Author: David Hildenbrand <david@redhat.com>
Date: Fri Feb 25 09:38:11 2022 +0100

mm/rmap: drop "compound" parameter from page_add_new_anon_rmap()

New anonymous pages are always mapped natively: only THP/khugepagd code
maps a new compound anonymous page and passes "true". Otherwise, we're
just dealing with simple, non-compound pages.

Let's give the interface clearer semantics and document these.

Signed-off-by: David Hildenbrand <david@redhat.com>


--
Thanks,

David / dhildenb

\
 
 \ /
  Last update: 2022-02-25 10:02    [W:0.059 / U:2.860 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site