From: "Vlastimil Babka (SUSE)" <vbabka@kernel.org>
To: Brendan Jackman <jackmanb@google.com>,
Andrew Morton <akpm@linux-foundation.org>,
Kairui Song <kasong@tencent.com>, Qi Zheng <qi.zheng@linux.dev>,
Shakeel Butt <shakeel.butt@linux.dev>,
Barry Song <baohua@kernel.org>,
Axel Rasmussen <axelrasmussen@google.com>,
Yuanchu Xie <yuanchu@google.com>, Wei Xu <weixugc@google.com>,
David Hildenbrand <david@kernel.org>,
Lorenzo Stoakes <ljs@kernel.org>,
"Liam R. Howlett" <liam@infradead.org>,
Mike Rapoport <rppt@kernel.org>,
Suren Baghdasaryan <surenb@google.com>,
Michal Hocko <mhocko@suse.com>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Pavel Machek <pavel@kernel.org>, Len Brown <lenb@kernel.org>,
Johannes Weiner <hannes@cmpxchg.org>, Zi Yan <ziy@nvidia.com>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
linux-pm@vger.kernel.org
Subject: Re: [PATCH 4/4] mm/page_alloc: remove ifdefs from pindex helpers
Date: Fri, 15 May 2026 17:29:01 +0200 [thread overview]
Message-ID: <bd36e972-8900-4476-a66b-4dc218b21a4d@kernel.org> (raw)
In-Reply-To: <DIJA0MM2F3D2.61WBO3MJZRNQ@google.com>
On 5/15/26 15:15, Brendan Jackman wrote:
> On Wed May 13, 2026 at 5:19 PM UTC, Vlastimil Babka (SUSE) wrote:
>> On 5/13/26 14:35, Brendan Jackman wrote:
>>
>> Uh yeah, VM_BUG_ONs are frowned upon now. But doing a VM_WARN_ON_ONCE here
>> makes little sense. There's no safe fallback if we end up here with a wrong
>> value.
>
> Isn't that grounds for upgrading them to a real BUG then? My experience
If Linus noticed, there would be yelling :)
> has been (I broke this code lots of times lol, I REALLY struggle with
> this arithmetic stuff) if something goes wrong here the machine quickly
> gets irrevocably and undebuggably borked. Crashing is the best case
> scenario.
Yeah it will crash quickly anyway if you mess it up. I guess if the check
would help you find more quickly what you messed up, a VM_WARN_ON_ONCE would
still have some value even if it can't avoid the imminent disaster. So maybe
just switch it to that.
>> And it's all internal to page alloc so I'd just drop those checks
>> completely at this point.
>
> But, I won't die on the above hill, if people really hate BUG that much
> happy to go with the flow.
>
> In that case, I'd suggest we drop them as a separate patch.
prev parent reply other threads:[~2026-05-15 15:29 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-13 12:35 [PATCH 0/4] mm: misc cleanups from __GFP_UNMAPPED series Brendan Jackman
2026-05-13 12:35 ` [PATCH 1/4] mm: introduce for_each_free_list() Brendan Jackman
2026-05-13 14:44 ` Mike Rapoport
2026-05-13 17:07 ` Vlastimil Babka (SUSE)
2026-05-13 12:35 ` [PATCH 2/4] mm/page_alloc: don't overload migratetype in find_suitable_fallback() Brendan Jackman
2026-05-13 12:35 ` [PATCH 3/4] mm: rejig pageblock mask definitions Brendan Jackman
2026-05-13 12:35 ` [PATCH 4/4] mm/page_alloc: remove ifdefs from pindex helpers Brendan Jackman
2026-05-13 17:19 ` Vlastimil Babka (SUSE)
2026-05-15 13:15 ` Brendan Jackman
2026-05-15 15:29 ` Vlastimil Babka (SUSE) [this message]
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=bd36e972-8900-4476-a66b-4dc218b21a4d@kernel.org \
--to=vbabka@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=axelrasmussen@google.com \
--cc=baohua@kernel.org \
--cc=david@kernel.org \
--cc=hannes@cmpxchg.org \
--cc=jackmanb@google.com \
--cc=kasong@tencent.com \
--cc=lenb@kernel.org \
--cc=liam@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-pm@vger.kernel.org \
--cc=ljs@kernel.org \
--cc=mhocko@suse.com \
--cc=pavel@kernel.org \
--cc=qi.zheng@linux.dev \
--cc=rafael@kernel.org \
--cc=rppt@kernel.org \
--cc=shakeel.butt@linux.dev \
--cc=surenb@google.com \
--cc=weixugc@google.com \
--cc=yuanchu@google.com \
--cc=ziy@nvidia.com \
/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