From: Wei Yang <richard.weiyang@gmail.com>
To: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Cc: Wei Yang <richard.weiyang@gmail.com>,
akpm@linux-foundation.org, david@redhat.com, riel@surriel.com,
Liam.Howlett@oracle.com, vbabka@suse.cz, harry.yoo@oracle.com,
linux-mm@kvack.org
Subject: Re: [PATCH 1/3] mm/rmap: not necessary to mask off FOLIO_PAGES_MAPPED
Date: Sat, 16 Aug 2025 00:33:56 +0000 [thread overview]
Message-ID: <20250816003356.l24hortwyttve57n@master> (raw)
In-Reply-To: <d1800d00-b983-4a14-8338-f1f30c330ab1@lucifer.local>
On Fri, Aug 15, 2025 at 10:38:32AM +0100, Lorenzo Stoakes wrote:
>On Fri, Aug 15, 2025 at 08:49:41AM +0000, Wei Yang wrote:
>> At this point, we are sure (nr < ENTIRELY_MAPPED). This means the upper
>> bits are already cleared.
>>
>> Not necessary to mask off it.
>
>Worth saying it's because we are in an if branch conditional on nr <
>ENTIRELY_MAPPED, and FOLIO_PAGES_MAPPED is equal to ENTIRELY_MAPPED - 1.
>
Will adjust it.
>>
>> Signed-off-by: Wei Yang <richard.weiyang@gmail.com>
>
>I suspect that this is copy/pasta from __folio_add_rmap(), but it may also
>be some way of asserting we don't underflow nr.
>
>Anyway I think this is fine because the branch implies this is ok so:
>
>Reviewed-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
>
Thanks
--
Wei Yang
Help you, Help me
next prev parent reply other threads:[~2025-08-16 0:34 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-15 8:49 [PATCH 0/3] mm/rmap: small cleanup for __folio_remove_rmap() Wei Yang
2025-08-15 8:49 ` [PATCH 1/3] mm/rmap: not necessary to mask off FOLIO_PAGES_MAPPED Wei Yang
2025-08-15 9:38 ` Lorenzo Stoakes
2025-08-16 0:33 ` Wei Yang [this message]
2025-08-16 6:29 ` David Hildenbrand
2025-08-15 8:49 ` [PATCH 2/3] mm/rmap: could be partially_mapped only after no entire map Wei Yang
2025-08-15 10:08 ` Lorenzo Stoakes
2025-08-16 6:31 ` David Hildenbrand
2025-08-16 9:06 ` Wei Yang
2025-08-16 9:16 ` David Hildenbrand
2025-08-16 10:05 ` Giorgi Tchankvetadze
2025-08-16 10:32 ` David Hildenbrand
2025-08-16 14:03 ` Wei Yang
2025-08-15 8:49 ` [PATCH 3/3] mm/rmap: use folio_large_nr_pages() when we are sure it is a large folio Wei Yang
2025-08-15 10:04 ` Lorenzo Stoakes
2025-08-16 6:32 ` David Hildenbrand
2025-08-15 10:11 ` [PATCH 0/3] mm/rmap: small cleanup for __folio_remove_rmap() Lorenzo Stoakes
2025-08-16 0:36 ` Wei Yang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250816003356.l24hortwyttve57n@master \
--to=richard.weiyang@gmail.com \
--cc=Liam.Howlett@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=david@redhat.com \
--cc=harry.yoo@oracle.com \
--cc=linux-mm@kvack.org \
--cc=lorenzo.stoakes@oracle.com \
--cc=riel@surriel.com \
--cc=vbabka@suse.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox