From: John Hubbard <jhubbard@nvidia.com>
To: David Hildenbrand <david@redhat.com>,
Andrew Morton <akpm@linux-foundation.org>,
Matthew Wilcox <willy@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
<linux-mm@kvack.org>, <mm-commits@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [GIT PULL] MM updates for 6.13-rc1
Date: Sat, 23 Nov 2024 12:30:00 -0800 [thread overview]
Message-ID: <17c5420c-a89a-411b-9ecd-2e868195f0d1@nvidia.com> (raw)
In-Reply-To: <fa398c31-7135-457e-b97d-366c12685688@redhat.com>
On 11/22/24 3:23 AM, David Hildenbrand wrote:
> On 22.11.24 06:42, Andrew Morton wrote:
>> On Tue, 19 Nov 2024 04:35:47 +0000 Matthew Wilcox <willy@infradead.org> wrote:
>>
>>> On Mon, Nov 18, 2024 at 07:30:01PM -0800, Andrew Morton wrote:
>>>> Matthew Wilcox (Oracle) (13):
>>>> ksm: use a folio in try_to_merge_one_page()
>>>> ksm: convert cmp_and_merge_page() to use a folio
>>>
>>> Unfortunately you left the crap patch in from Gaosheng. Linus, can you
>>> apply this fixup?
>>>
>>> >From 3d7e7319bbb3ced1dfb9c82bb7e8c7386380799b Mon Sep 17 00:00:00 2001
>>> From: "Matthew Wilcox (Oracle)" <willy@infradead.org>
>>> Date: Mon, 18 Nov 2024 23:32:25 -0500
>>> Subject: [PATCH] mm: Revert IS_ERR_OR_NULL check
>>>
>>> &foo->bar is address arithmetic, not a dereference of foo.
>>> Huawei engineers seem particularly prone to not knowing this.
>>
>> It isn't only Huawai people. David acked Gaosheng's patch and it snuck
>> past me (again). People keep on getting tricked by this idiom and I
>> think we'd be better off with some nicely named wrapper to help
>> readers understand what's going on.
>
> The helper we have is "folio_page(folio, 0)" ... and we do have a bunch of that usage in the kernel.
>
> Likely we, want a more catchy helper that simply gives us the first (and for small folios the only) page.
>
> ... not able to come up with good names though. folio_page0(), folio_first_page(), ... :(
Eh? You're doing great at coming up with good names, IMHO. Either of the
above would work nicely!
I'll put my vote in for folio_page0(), it's concise and yet crystal clear.
thanks,
--
John Hubbard
next prev parent reply other threads:[~2024-11-23 20:30 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-19 3:30 Andrew Morton
2024-11-19 4:35 ` Matthew Wilcox
2024-11-22 5:42 ` Andrew Morton
2024-11-22 11:23 ` David Hildenbrand
2024-11-23 20:30 ` John Hubbard [this message]
2024-11-23 20:57 ` Linus Torvalds
2024-11-23 22:01 ` Matthew Wilcox
2024-11-23 18:49 ` pr-tracker-bot
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=17c5420c-a89a-411b-9ecd-2e868195f0d1@nvidia.com \
--to=jhubbard@nvidia.com \
--cc=akpm@linux-foundation.org \
--cc=david@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mm-commits@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
--cc=willy@infradead.org \
/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