Re: [PATCH RFC 01/14] mm/zsmalloc: replace PG_private with pointer comparison

"Zi Yan" <[email protected]>
Newsgroups gmane.linux.kernel,gmane.linux.kernel.mm
Message-ID <[email protected]>
On Tue Aug 4, 2026 at 2:37 AM EDT, Sergey Senozhatsky wrote:
> On (26/08/03 17:05), Zi Yan wrote:
>> ...
>> should be negligible. While at it, change VM_BUG_ON() to
>> VM_WARN_ON_ONCE_PAGE().
>
> Is it really safe to do that?

This is based on our coding style[1], do not crash the kernel and use
WARN() rather than BUG(). For these two checks, they are making sure
zspage chains are formed correctly and related errors should be caught
at development phase. IMHO, VM_WARN_ON_ONCE_PAGE() is sufficient.

In MM, we convert BUG() to WARN() when we are touching the code.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/coding-style.rst?h=v7.2-rc6#n1225

-- 
Best Regards,
Yan, Zi
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.