Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1596959

Re: "mm: fix lazyfree BUG_ON check in try_to_unmap_one()" build error

From Vlastimil Babka <vbabka@suse.cz>
Newsgroups linux.kernel
Subject Re: "mm: fix lazyfree BUG_ON check in try_to_unmap_one()" build error
Date 2017-03-10 11:10 +0100
Message-ID <tjpEJ-2rf-5@gated-at.bofh.it> (permalink)
References <tiXS9-8eC-5@gated-at.bofh.it> <tiZqV-YG-3@gated-at.bofh.it> <tjdNf-2mg-7@gated-at.bofh.it> <tjgUN-4lh-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 03/10/2017 01:45 AM, Minchan Kim wrote:
> Hi Andrew,
> 
> On Thu, Mar 09, 2017 at 01:27:06PM -0800, Andrew Morton wrote:
>> On Thu, 9 Mar 2017 15:02:26 +0900 Minchan Kim <minchan@kernel.org> wrote:
>>
>>> Sergey reported VM_WARN_ON_ONCE returns void with !CONFIG_DEBUG_VM
>>> so we cannot use it as if's condition unlike WARN_ON.
>>
>> Can we instead fix VM_WARN_ON_ONCE()?
> 
> I thought the direction but the reason to decide WARN_ON_ONCE in this case
> is losing of benefit with using CONFIG_DEBU_VM if we go that way.
> 
> I think the benefit with VM_WARN_ON friends is that it should be completely
> out from the binary in !CONFIG_DEBUG_VM. However, if we fix VM_WARN_ON
> like WARN_ON to !!condition, at least, compiler should generate condition
> check and return so it's not what CONFIG_DEBUG_VM want, IMHO.
> However, if guys believe it's okay to add some instructions to debug VM
> although we disable CONFIG_DEBUG_VM, we can go that way.
> It's a just policy matter. ;-)
> 
> Anyway, Even though we fix VM_WARN_ON_ONCE, in my case, WARN_ON_ONCE is
> better because we should do !!condition regardless of CONFIG_DEBUG_VM
> and if so, WARN_ON is more wide coverage than VM_WARN_ON which only works
> with CONFIG_DEBUG_VM.

Agreed. WARN_ON...() can work that way as one can't disable them
(AFAIK), but VM_* variants are optional for overhead reasons.

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

"mm: fix lazyfree BUG_ON check in try_to_unmap_one()" build error Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2017-03-09 05:30 +0100
  Re: "mm: fix lazyfree BUG_ON check in try_to_unmap_one()" build error Minchan Kim <minchan@kernel.org> - 2017-03-09 07:10 +0100
    Re: "mm: fix lazyfree BUG_ON check in try_to_unmap_one()" build error Michal Hocko <mhocko@kernel.org> - 2017-03-09 10:00 +0100
    Re: "mm: fix lazyfree BUG_ON check in try_to_unmap_one()" build  error Andrew Morton <akpm@linux-foundation.org> - 2017-03-09 22:30 +0100
      Re: "mm: fix lazyfree BUG_ON check in try_to_unmap_one()" build error Minchan Kim <minchan@kernel.org> - 2017-03-10 01:50 +0100
        Re: "mm: fix lazyfree BUG_ON check in try_to_unmap_one()" build error Vlastimil Babka <vbabka@suse.cz> - 2017-03-10 11:10 +0100

csiph-web