From: John Hubbard <jhubbard@nvidia.com>
To: David Hildenbrand <david@redhat.com>,
Vlastimil Babka <vbabka@suse.cz>,
Miaohe Lin <linmiaohe@huawei.com>,
akpm@linux-foundation.org
Cc: iamjoonsoo.kim@lge.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm/page_isolation: don't putback unisolated page
Date: Thu, 9 Sep 2021 09:50:38 -0700 [thread overview]
Message-ID: <88bcab16-b248-3cdd-1270-1f162f43019f@nvidia.com> (raw)
In-Reply-To: <efdab0d6-199a-1bb8-79bf-ea0a5b94c093@redhat.com>
On 9/9/21 1:56 AM, David Hildenbrand wrote:
> On 09.09.21 00:42, John Hubbard wrote:
>> On 9/7/21 2:56 AM, David Hildenbrand wrote:
>> ...
>>>> If this can be handled gracefully, then I'd rather go with VM_WARN_ON.
>>>> Maybe even WARN_ON_ONCE?
>>>>
>>>
>>> I think either VM_BUG_ON() or VM_WARN_ON() -- compiling the runtime checks out -- should be good
>>> enough.
>>>
>>> I'd just go with VM_BUG_ON(), because anybody messing with __isolate_free_page() should clearly spot
>>> that we expect the current handling. But no strong opinion.
>>>
>>
>> If in doubt, WARN*() should be preferred over BUG*(). There's a pretty long
>> history of "don't kill the machine unless you have to" emails about this, let
>> me dig up one...OK, maybe not the best example, but the tip of the iceberg:
>
> Please note the subtle difference between BUG_ON and VM_BUG_ON. We expect VM_BUG_ON to be compiled
> out on any production system. So it's really only a mean to identify things that really shouldn't be
> like that during debugging/testing.
>
Yes, but the end result is the same: it halts the system. It don't think it changes
the reasoning about BUG vs WARN very much.
> Using WARN... instead of VM_BUG_ON is even worse for production systems. There are distros that set
> panic_on_warn, essentially converting WARN... into BUG...
>
This is different than BUG: panic() *prints a backtrace*, and then reboots the system.
That is still awkward, but a little more debuggable.
thanks,
--
John Hubbard
NVIDIA
prev parent reply other threads:[~2021-09-09 16:50 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-04 9:18 Miaohe Lin
2021-09-06 9:40 ` David Hildenbrand
2021-09-06 11:32 ` Miaohe Lin
2021-09-06 11:50 ` David Hildenbrand
2021-09-06 12:01 ` David Hildenbrand
2021-09-06 12:08 ` Miaohe Lin
2021-09-06 12:02 ` David Hildenbrand
2021-09-06 12:11 ` David Hildenbrand
2021-09-06 12:45 ` Miaohe Lin
2021-09-06 12:49 ` David Hildenbrand
2021-09-07 1:46 ` Miaohe Lin
2021-09-07 9:52 ` David Hildenbrand
2021-09-07 8:08 ` Vlastimil Babka
2021-09-07 9:56 ` David Hildenbrand
2021-09-08 22:42 ` John Hubbard
2021-09-09 8:56 ` David Hildenbrand
2021-09-09 9:07 ` Vlastimil Babka
2021-09-09 9:37 ` David Hildenbrand
2021-09-09 16:50 ` John Hubbard [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=88bcab16-b248-3cdd-1270-1f162f43019f@nvidia.com \
--to=jhubbard@nvidia.com \
--cc=akpm@linux-foundation.org \
--cc=david@redhat.com \
--cc=iamjoonsoo.kim@lge.com \
--cc=linmiaohe@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--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