From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 76738C433EF for ; Thu, 9 Sep 2021 09:37:32 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id EE11161179 for ; Thu, 9 Sep 2021 09:37:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org EE11161179 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 4D6896B0071; Thu, 9 Sep 2021 05:37:31 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 48633900002; Thu, 9 Sep 2021 05:37:31 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 34DA26B0073; Thu, 9 Sep 2021 05:37:31 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0042.hostedemail.com [216.40.44.42]) by kanga.kvack.org (Postfix) with ESMTP id 214096B0071 for ; Thu, 9 Sep 2021 05:37:31 -0400 (EDT) Received: from smtpin35.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id BEA482CFE0 for ; Thu, 9 Sep 2021 09:37:30 +0000 (UTC) X-FDA: 78567532260.35.E934B07 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by imf27.hostedemail.com (Postfix) with ESMTP id 65A43700009D for ; Thu, 9 Sep 2021 09:37:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1631180249; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=hnkexf1NKYb40g+6TkQdOP3IQclUoy40kRSjUx+uIvA=; b=hQIfrsI707PfLetJIqESt7B5r96kcs3fDPhtXTkb0s6rZgtVXTwq0lm4sDa6Uw4z5Qipr9 PE1yxiVJVMreiVmaF/Xzpma2+M4WZyzSQN81PPwr58AW4PIo12NoOM8Cu/fEOoeYGOX9lS sqQsrN+WZK0CMjSTxotWPPNKlGRH8p4= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-389-QIpNMYB5NEurpSwtEmNZ9g-1; Thu, 09 Sep 2021 05:37:28 -0400 X-MC-Unique: QIpNMYB5NEurpSwtEmNZ9g-1 Received: by mail-wm1-f72.google.com with SMTP id f17-20020a05600c155100b002f05f30ff03so623089wmg.3 for ; Thu, 09 Sep 2021 02:37:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:to:cc:references:from:organization:subject :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=hnkexf1NKYb40g+6TkQdOP3IQclUoy40kRSjUx+uIvA=; b=o2SI0nvUUI6HqN7LJZOBKy4dIreODEuKAvsZV02KaXvhvlW09ujpyvVuWNoOdvxfF+ zflbvJbajPGIztC76PJvlYKBzngRfDqO1ejB3gtShlfbOW71xhhoxMjcBFpgBPD2l944 yDcX2mXqSm7deeDNlij2R9nxARMfuq0hozAlA8wEBvcULxGYWmxI/uNTEfO0Y1StRK61 +zLuup+iQ1hyZMxO0AfzB6hDojnLppaAeoICNVRDPZ5bI7iz4PcpAINGqPu3ege7avIZ Vlsf8zQ0lm2R1uqvdXUCekDEg45enYJn1Zm6MmwwaVlTjWgqJu15Uege84VgPlvc18cw /Jxg== X-Gm-Message-State: AOAM5329OayZwWhhQT2qz6eDpd2hBvWmC1c8iTukmH1cGgyfzdvWqgJK DWPVlf3rQgu+E/49PFPZYaQDmB/RDgFMXtJeEPJaq41S59t9+ZSQt60BtlVVlAeTDOR1ey9Zq2M eNt8vLLKkFUs= X-Received: by 2002:a05:6000:1081:: with SMTP id y1mr2391659wrw.415.1631180247658; Thu, 09 Sep 2021 02:37:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyw9mD23GM/fVmSY5IxO44E1JTTn0UPY3nvEIN2Je0FgRPEhyt+8enfuilutzpX3DJ5JoacDg== X-Received: by 2002:a05:6000:1081:: with SMTP id y1mr2391637wrw.415.1631180247410; Thu, 09 Sep 2021 02:37:27 -0700 (PDT) Received: from [192.168.3.132] (p4ff23fe4.dip0.t-ipconnect.de. [79.242.63.228]) by smtp.gmail.com with ESMTPSA id a10sm1250078wrd.51.2021.09.09.02.37.26 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 09 Sep 2021 02:37:26 -0700 (PDT) To: Vlastimil Babka , John Hubbard , Miaohe Lin , akpm@linux-foundation.org Cc: iamjoonsoo.kim@lge.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org References: <20210904091839.20270-1-linmiaohe@huawei.com> <3b36529f-ab97-ddfe-0407-66f0cd1fd38d@redhat.com> <2d06db75-5c26-8fe2-6883-ac99056a9894@redhat.com> <80cfffdc-227e-c045-be74-1c08fb62c1e3@redhat.com> From: David Hildenbrand Organization: Red Hat Subject: Re: [PATCH] mm/page_isolation: don't putback unisolated page Message-ID: <924b4672-0e52-56fb-22a9-b02d8c3ecccf@redhat.com> Date: Thu, 9 Sep 2021 11:37:26 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Authentication-Results: imf27.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=hQIfrsI7; spf=none (imf27.hostedemail.com: domain of david@redhat.com has no SPF policy when checking 216.205.24.124) smtp.mailfrom=david@redhat.com; dmarc=pass (policy=none) header.from=redhat.com X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 65A43700009D X-Stat-Signature: wqxgx7crrhdn5fbw7bw6x7r46xdug4z7 X-HE-Tag: 1631180250-635152 Content-Transfer-Encoding: quoted-printable X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 09.09.21 11:07, Vlastimil Babka wrote: > On 9/9/21 10:56, 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 prett= y long >>> history of "don't kill the machine unless you have to" emails about t= his, let >>> me dig up one...OK, maybe not the best example, but the tip of the ic= eberg: >> >> Please note the subtle difference between BUG_ON and VM_BUG_ON. We exp= ect >> 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. >=20 > IIRC Fedora used to have CONFIG_DEBUG_VM enabled, did it change? Excellent question. Apparently you are right. Fortunately it's not a=20 distro to use in production ;) In kernel-ark: redhat/configs/fedora/generic/CONFIG_DEBUG_VM:CONFIG_DEBUG_VM=3Dy While for ARK (rhel-next so to say) redhat/configs/ark/generic/CONFIG_DEBUG_VM:# CONFIG_DEBUG_VM is not set So yes, the VM_WARN_ON would then be preferred in that case. But it's=20 something that should never ever happen unless reviewers and developers=20 really mess up, so I don't actually would sleep over that. We have other=20 WARN... that can trigger more easily. >=20 >> Using WARN... instead of VM_BUG_ON is even worse for production system= s. >> There are distros that set panic_on_warn, essentially converting WARN.= .. >> into BUG... >=20 > Uh, does any distro really do that? Apparently, so I was told by Greg a year ago or so when wanting to add=20 WARN_ON(). The advisory is to us pr_warn_once() instead. I rememebr it=20 was a debian based distro. --=20 Thanks, David / dhildenb