From: David Hildenbrand <david@redhat.com>
To: Tal Zussman <tz2294@columbia.edu>,
Andrew Morton <akpm@linux-foundation.org>,
Lorenzo Stoakes <lorenzo.stoakes@oracle.com>,
"Liam R. Howlett" <Liam.Howlett@oracle.com>,
Vlastimil Babka <vbabka@suse.cz>, Mike Rapoport <rppt@kernel.org>,
Suren Baghdasaryan <surenb@google.com>,
Michal Hocko <mhocko@suse.com>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm/debug: Use BUILD_BUG_ON_INVALID() for VIRTUAL_BUG_ON()
Date: Sat, 7 Jun 2025 09:59:14 +0200 [thread overview]
Message-ID: <2a768123-4423-4f52-a0ef-96fa69872949@redhat.com> (raw)
In-Reply-To: <20250607-virtual_bug_on_invalid-v1-1-b792ac2b0920@columbia.edu>
On 07.06.25 09:09, Tal Zussman wrote:
> This allows the compiler to validate the condition even with
> CONFIG_DEBUG_VIRTUAL disabled, and aligns VIRTUAL_BUG_ON() with the
> other macros in mmdebug.h.
>
In the light of recent discussions, I think we should get rid of
VIRTUAL_BUG_ON completely.
There are only a hand full of callers, and I am preety sure for most of
them VM_WARN_ON is a suitable replacement.
> Signed-off-by: Tal Zussman <tz2294@columbia.edu>
> ---
> include/linux/mmdebug.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/linux/mmdebug.h b/include/linux/mmdebug.h
> index a0a3894900ed..012aef40e7a9 100644
> --- a/include/linux/mmdebug.h
> +++ b/include/linux/mmdebug.h
> @@ -129,7 +129,7 @@ void vma_iter_dump_tree(const struct vma_iterator *vmi);
> #ifdef CONFIG_DEBUG_VIRTUAL
> #define VIRTUAL_BUG_ON(cond) BUG_ON(cond)
> #else
> -#define VIRTUAL_BUG_ON(cond) do { } while (0)
> +#define VIRTUAL_BUG_ON(cond) BUILD_BUG_ON_INVALID(cond)
> #endif
>
> #ifdef CONFIG_DEBUG_VM_PGFLAGS
>
> ---
> base-commit: efe99fabeb11b030c89a7dc5a5e7a7558d0dc7ec
> change-id: 20250607-virtual_bug_on_invalid-81d24b276109
>
> Best regards,
--
Cheers,
David / dhildenb
next prev parent reply other threads:[~2025-06-07 7:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-07 7:09 Tal Zussman
2025-06-07 7:59 ` David Hildenbrand [this message]
2025-06-07 16:21 ` Tal Zussman
2025-06-07 18:13 ` David Hildenbrand
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=2a768123-4423-4f52-a0ef-96fa69872949@redhat.com \
--to=david@redhat.com \
--cc=Liam.Howlett@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lorenzo.stoakes@oracle.com \
--cc=mhocko@suse.com \
--cc=rppt@kernel.org \
--cc=surenb@google.com \
--cc=tz2294@columbia.edu \
--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