From: Minchan Kim <minchan@kernel.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>,
Johannes Weiner <hannes@cmpxchg.org>,
Michal Hocko <mhocko@suse.com>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: "mm: fix lazyfree BUG_ON check in try_to_unmap_one()" build error
Date: Fri, 10 Mar 2017 09:45:22 +0900 [thread overview]
Message-ID: <20170310004522.GA12267@bbox> (raw)
In-Reply-To: <20170309132706.1cb4fc7d2e846923eedf788c@linux-foundation.org>
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.
Thanks.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
WARNING: multiple messages have this Message-ID (diff)
From: Minchan Kim <minchan@kernel.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>,
Johannes Weiner <hannes@cmpxchg.org>,
Michal Hocko <mhocko@suse.com>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: "mm: fix lazyfree BUG_ON check in try_to_unmap_one()" build error
Date: Fri, 10 Mar 2017 09:45:22 +0900 [thread overview]
Message-ID: <20170310004522.GA12267@bbox> (raw)
In-Reply-To: <20170309132706.1cb4fc7d2e846923eedf788c@linux-foundation.org>
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.
Thanks.
next prev parent reply other threads:[~2017-03-10 0:45 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-09 4:29 "mm: fix lazyfree BUG_ON check in try_to_unmap_one()" build error Sergey Senozhatsky
2017-03-09 4:29 ` Sergey Senozhatsky
2017-03-09 6:02 ` Minchan Kim
2017-03-09 6:02 ` Minchan Kim
2017-03-09 8:50 ` Michal Hocko
2017-03-09 8:50 ` Michal Hocko
2017-03-09 21:27 ` Andrew Morton
2017-03-09 21:27 ` Andrew Morton
2017-03-10 0:45 ` Minchan Kim [this message]
2017-03-10 0:45 ` Minchan Kim
2017-03-10 9:31 ` Vlastimil Babka
2017-03-10 9:31 ` Vlastimil Babka
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=20170310004522.GA12267@bbox \
--to=minchan@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.com \
--cc=sergey.senozhatsky@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.