linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
To: Sasha Levin <sasha.levin@oracle.com>
Cc: akpm@linux-foundation.org, kirill.shutemov@linux.intel.com,
	khlebnikov@openvz.org, riel@redhat.com, mgorman@suse.de,
	mhocko@suse.cz, hughd@google.com, vbabka@suse.cz,
	walken@google.com, minchan@kernel.org,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH 2/3] Introduce VM_BUG_ON_VMA
Date: Fri, 29 Aug 2014 14:51:42 -0400	[thread overview]
Message-ID: <20140829185142.GB12774@nhori.bos.redhat.com> (raw)
In-Reply-To: <1409324059-28692-2-git-send-email-sasha.levin@oracle.com>

On Fri, Aug 29, 2014 at 10:54:18AM -0400, Sasha Levin wrote:
> Very similar to VM_BUG_ON_PAGE but dumps VMA information instead.
> 
> Signed-off-by: Sasha Levin <sasha.levin@oracle.com>

Reviewed-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>

> ---
>  include/linux/mmdebug.h |    8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/include/linux/mmdebug.h b/include/linux/mmdebug.h
> index dfb9333..569e4c8 100644
> --- a/include/linux/mmdebug.h
> +++ b/include/linux/mmdebug.h
> @@ -20,12 +20,20 @@ void dump_vma(const struct vm_area_struct *vma);
>  			BUG();						\
>  		}							\
>  	} while (0)
> +#define VM_BUG_ON_VMA(cond, vma)					\
> +	do {								\
> +		if (unlikely(cond)) {					\
> +			dump_vma(vma);					\
> +			BUG();						\
> +		}							\
> +	} while (0)
>  #define VM_WARN_ON(cond) WARN_ON(cond)
>  #define VM_WARN_ON_ONCE(cond) WARN_ON_ONCE(cond)
>  #define VM_WARN_ONCE(cond, format...) WARN_ONCE(cond, format)
>  #else
>  #define VM_BUG_ON(cond) BUILD_BUG_ON_INVALID(cond)
>  #define VM_BUG_ON_PAGE(cond, page) VM_BUG_ON(cond)
> +#define VM_BUG_ON_VMA(cond, vma) VM_BUG_ON(cond)
>  #define VM_WARN_ON(cond) BUILD_BUG_ON_INVALID(cond)
>  #define VM_WARN_ON_ONCE(cond) BUILD_BUG_ON_INVALID(cond)
>  #define VM_WARN_ONCE(cond, format...) BUILD_BUG_ON_INVALID(cond)
> -- 
> 1.7.10.4
> 
> --
> 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>
> 

--
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>

  reply	other threads:[~2014-08-29 18:51 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-29 14:54 [PATCH 1/3] Introduce dump_vma Sasha Levin
2014-08-29 14:54 ` [PATCH 2/3] Introduce VM_BUG_ON_VMA Sasha Levin
2014-08-29 18:51   ` Naoya Horiguchi [this message]
2014-08-29 14:54 ` [PATCH 3/3] Convert a few VM_BUG_ON callers to VM_BUG_ON_VMA Sasha Levin
2014-08-29 19:17   ` Naoya Horiguchi
2014-08-29 19:32     ` Sasha Levin
2014-08-29 18:51 ` [PATCH 1/3] Introduce dump_vma Naoya Horiguchi
2014-08-29 19:37 ` Andrew Morton

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=20140829185142.GB12774@nhori.bos.redhat.com \
    --to=n-horiguchi@ah.jp.nec.com \
    --cc=akpm@linux-foundation.org \
    --cc=hughd@google.com \
    --cc=khlebnikov@openvz.org \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@suse.de \
    --cc=mhocko@suse.cz \
    --cc=minchan@kernel.org \
    --cc=riel@redhat.com \
    --cc=sasha.levin@oracle.com \
    --cc=vbabka@suse.cz \
    --cc=walken@google.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox