All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nishanth Aravamudan <nacc@linux.vnet.ibm.com>
To: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Luiz Capitulino <lcapitulino@redhat.com>,
	Randy Dunlap <rdunlap@infradead.org>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	linux-next@vger.kernel.org, Richard Weinberger <richard@nod.at>
Subject: Re: mmotm 2014-04-22-15-20 uploaded (uml 32- and 64-bit defconfigs)
Date: Wed, 23 Apr 2014 16:31:24 -0700	[thread overview]
Message-ID: <20140423233124.GA3869@linux.vnet.ibm.com> (raw)
In-Reply-To: <20140424081019.596b5d23c624f5721ba0480a@canb.auug.org.au>

On 24.04.2014 [08:10:19 +1000], Stephen Rothwell wrote:
> Hi all,
> 
> On Wed, 23 Apr 2014 11:24:42 -0700 Andrew Morton <akpm@linux-foundation.org> wrote:
> >
> > I'll try moving hugepages_supported() into the #ifdef
> > CONFIG_HUGETLB_PAGE section.
> > 
> > --- a/include/linux/hugetlb.h~hugetlb-ensure-hugepage-access-is-denied-if-hugepages-are-not-supported-fix-fix
> > +++ a/include/linux/hugetlb.h
> > @@ -412,6 +412,16 @@ static inline spinlock_t *huge_pte_lockp
> >  	return &mm->page_table_lock;
> >  }
> >  
> > +static inline bool hugepages_supported(void)
> > +{
> > +	/*
> > +	 * Some platform decide whether they support huge pages at boot
> > +	 * time. On these, such as powerpc, HPAGE_SHIFT is set to 0 when
> > +	 * there is no such support
> > +	 */
> > +	return HPAGE_SHIFT != 0;
> > +}
> > +
> >  #else	/* CONFIG_HUGETLB_PAGE */
> >  struct hstate {};
> >  #define alloc_huge_page_node(h, nid) NULL
> > @@ -460,14 +470,4 @@ static inline spinlock_t *huge_pte_lock(
> >  	return ptl;
> >  }
> >  
> > -static inline bool hugepages_supported(void)
> > -{
> > -	/*
> > -	 * Some platform decide whether they support huge pages at boot
> > -	 * time. On these, such as powerpc, HPAGE_SHIFT is set to 0 when
> > -	 * there is no such support
> > -	 */
> > -	return HPAGE_SHIFT != 0;
> > -}
> > -
> >  #endif /* _LINUX_HUGETLB_H */
> 
> Clearly, noone reads my emails :-(
> 
> This is exactly what I reported and the fix I applied to yesterday's
> linux-next ...

Actually, I think (based upon the context) that your fix is slightly
different. Your fix puts hugepages_supported() under CONFIG_HUGETLBFS.
Andrew's puts it under CONFIG_HUGETLB_PAGE. I think they are effectively
tied together as options go, but it semantically makes more sense with
CONFIG_HUGETLB_PAGE.

Thanks,
Nish

--
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: Nishanth Aravamudan <nacc@linux.vnet.ibm.com>
To: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Luiz Capitulino <lcapitulino@redhat.com>,
	Randy Dunlap <rdunlap@infradead.org>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	linux-next@vger.kernel.org, Richard Weinberger <richard@nod.at>
Subject: Re: mmotm 2014-04-22-15-20 uploaded (uml 32- and 64-bit defconfigs)
Date: Wed, 23 Apr 2014 16:31:24 -0700	[thread overview]
Message-ID: <20140423233124.GA3869@linux.vnet.ibm.com> (raw)
In-Reply-To: <20140424081019.596b5d23c624f5721ba0480a@canb.auug.org.au>

On 24.04.2014 [08:10:19 +1000], Stephen Rothwell wrote:
> Hi all,
> 
> On Wed, 23 Apr 2014 11:24:42 -0700 Andrew Morton <akpm@linux-foundation.org> wrote:
> >
> > I'll try moving hugepages_supported() into the #ifdef
> > CONFIG_HUGETLB_PAGE section.
> > 
> > --- a/include/linux/hugetlb.h~hugetlb-ensure-hugepage-access-is-denied-if-hugepages-are-not-supported-fix-fix
> > +++ a/include/linux/hugetlb.h
> > @@ -412,6 +412,16 @@ static inline spinlock_t *huge_pte_lockp
> >  	return &mm->page_table_lock;
> >  }
> >  
> > +static inline bool hugepages_supported(void)
> > +{
> > +	/*
> > +	 * Some platform decide whether they support huge pages at boot
> > +	 * time. On these, such as powerpc, HPAGE_SHIFT is set to 0 when
> > +	 * there is no such support
> > +	 */
> > +	return HPAGE_SHIFT != 0;
> > +}
> > +
> >  #else	/* CONFIG_HUGETLB_PAGE */
> >  struct hstate {};
> >  #define alloc_huge_page_node(h, nid) NULL
> > @@ -460,14 +470,4 @@ static inline spinlock_t *huge_pte_lock(
> >  	return ptl;
> >  }
> >  
> > -static inline bool hugepages_supported(void)
> > -{
> > -	/*
> > -	 * Some platform decide whether they support huge pages at boot
> > -	 * time. On these, such as powerpc, HPAGE_SHIFT is set to 0 when
> > -	 * there is no such support
> > -	 */
> > -	return HPAGE_SHIFT != 0;
> > -}
> > -
> >  #endif /* _LINUX_HUGETLB_H */
> 
> Clearly, noone reads my emails :-(
> 
> This is exactly what I reported and the fix I applied to yesterday's
> linux-next ...

Actually, I think (based upon the context) that your fix is slightly
different. Your fix puts hugepages_supported() under CONFIG_HUGETLBFS.
Andrew's puts it under CONFIG_HUGETLB_PAGE. I think they are effectively
tied together as options go, but it semantically makes more sense with
CONFIG_HUGETLB_PAGE.

Thanks,
Nish


  parent reply	other threads:[~2014-04-23 23:31 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-22 22:21 mmotm 2014-04-22-15-20 uploaded akpm
2014-04-22 22:21 ` akpm
2014-04-22 22:21 ` akpm
2014-04-23 17:10 ` mmotm 2014-04-22-15-20 uploaded (uml 32- and 64-bit defconfigs) Randy Dunlap
2014-04-23 17:10   ` Randy Dunlap
2014-04-23 17:41   ` Luiz Capitulino
2014-04-23 17:41     ` Luiz Capitulino
2014-04-23 17:48     ` Randy Dunlap
2014-04-23 18:16       ` Luiz Capitulino
2014-04-23 18:16         ` Luiz Capitulino
2014-04-23 18:20         ` Randy Dunlap
2014-04-23 18:20           ` Randy Dunlap
2014-04-23 18:24         ` Andrew Morton
2014-04-23 18:24           ` Andrew Morton
2014-04-23 19:24           ` Nishanth Aravamudan
2014-04-23 19:24             ` Nishanth Aravamudan
2014-04-23 22:10           ` Stephen Rothwell
2014-04-23 22:18             ` Andrew Morton
2014-04-23 22:18               ` Andrew Morton
2014-04-23 22:31               ` Stephen Rothwell
2014-04-23 22:41                 ` Andrew Morton
2014-04-23 22:41                   ` Andrew Morton
2014-04-24  0:00                 ` Randy Dunlap
2014-04-24  0:00                   ` Randy Dunlap
2014-04-23 23:31             ` Nishanth Aravamudan [this message]
2014-04-23 23:31               ` Nishanth Aravamudan

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=20140423233124.GA3869@linux.vnet.ibm.com \
    --to=nacc@linux.vnet.ibm.com \
    --cc=akpm@linux-foundation.org \
    --cc=lcapitulino@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-next@vger.kernel.org \
    --cc=rdunlap@infradead.org \
    --cc=richard@nod.at \
    --cc=sfr@canb.auug.org.au \
    /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.