linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Cc: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>,
	Andrea Arcangeli <aarcange@redhat.com>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH] thp: define HPAGE_PMD_* constans as BUILD_BUG() if !THP
Date: Mon, 17 Jun 2013 15:33:22 -0700	[thread overview]
Message-ID: <20130617153322.f3cecaa54aacd465fedb7c36@linux-foundation.org> (raw)
In-Reply-To: <20130617222703.D8C4AE0090@blue.fi.intel.com>

On Tue, 18 Jun 2013 01:27:03 +0300 (EEST) "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> wrote:

> > >  #else /* CONFIG_TRANSPARENT_HUGEPAGE */
> > > +#define HPAGE_PMD_SHIFT ({ BUILD_BUG(); 0; })
> > > +#define HPAGE_PMD_MASK ({ BUILD_BUG(); 0; })
> > > +#define HPAGE_PMD_SIZE ({ BUILD_BUG(); 0; })
> > >  
> > 
> > We've done this sort of thing before and it blew up.  We do want to be
> > able to use things like HPAGE_PMD_foo in global-var initialisers and
> > definitions, but the problem is that BUILD_BUG() can't be used outside
> > functions.
> 
> I don't see how it's a blocker. For global variables, we will have to use
> #ifdefs, but the approach is still useful for in-function code.

OK.  Current mainline uses BUILD_BUG() here, so I guess the change
won't break anything.  Yet.

--
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:[~2013-06-17 22:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-17 22:05 Kirill A. Shutemov
2013-06-17 22:14 ` Andrew Morton
2013-06-17 22:27   ` Kirill A. Shutemov
2013-06-17 22:33     ` Andrew Morton [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=20130617153322.f3cecaa54aacd465fedb7c36@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=aarcange@redhat.com \
    --cc=aneesh.kumar@linux.vnet.ibm.com \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    /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