All of lore.kernel.org
 help / color / mirror / Atom feed
From: Minchan Kim <minchan@kernel.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	Kyungmin Park <kmpark@infradead.org>,
	Marek Szyprowski <m.szyprowski@samsung.com>,
	Michal Nazarewicz <mina86@mina86.com>,
	Rik van Riel <riel@redhat.com>, Mel Gorman <mgorman@suse.de>,
	Linux-Next <linux-next@vger.kernel.org>
Subject: Re: [PATCH] mm: cma: Discard clean pages during contiguous allocation instead of migration
Date: Fri, 14 Sep 2012 09:10:32 +0900	[thread overview]
Message-ID: <20120914001032.GD5085@bbox> (raw)
In-Reply-To: <20120913151922.b8893088.akpm@linux-foundation.org>

On Thu, Sep 13, 2012 at 03:19:22PM -0700, Andrew Morton wrote:
> On Thu, 13 Sep 2012 21:17:19 +0200
> Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> 
> > On Tue, Sep 11, 2012 at 2:41 AM, Minchan Kim <minchan@kernel.org> wrote:
> > > --- a/mm/vmscan.c
> > > +++ b/mm/vmscan.c
> > > @@ -674,8 +674,10 @@ static enum page_references page_check_references(struct page *page,
> > >  static unsigned long shrink_page_list(struct list_head *page_list,
> > >                                       struct zone *zone,
> > >                                       struct scan_control *sc,
> > > +                                     enum ttu_flags ttu_flags,
> > 
> > "enum ttu_flags" is defined on CONFIG_MMU=y only, causing on nommu:
> > 
> > mm/vmscan.c:677:26: error: parameter 4 ('ttu_flags') has incomplete type
> > mm/vmscan.c:987:5: error: 'TTU_UNMAP' undeclared (first use in this function)
> > mm/vmscan.c:987:15: error: 'TTU_IGNORE_ACCESS' undeclared (first use
> > in this function)
> > mm/vmscan.c:1312:56: error: 'TTU_UNMAP' undeclared (first use in this function)
> > 
> > E.g.
> > http://kisskb.ellerman.id.au/kisskb/buildresult/7191694/ (h8300-defconfig)
> > http://kisskb.ellerman.id.au/kisskb/buildresult/7191858/ (sh-allnoconfig)
> 
> hm, OK, the means by which current mainline avoids build errors is
> either clever or lucky.
> 
> 			switch (try_to_unmap(page, TTU_UNMAP)) {
> 
> gets preprocessed into
> 
> 			switch (2) {
> 
> so the cmopiler never gets to see the TTU_ symbol at all.  Because it
> happens to be inside the try_to_unmap() call.
> 
> 
> I guess we can just make ttu_flags visible to NOMMU:

I agree.

Geert, Andrew
Thanks for the reporting and quick fix!

-- 
Kind regards,
Minchan Kim

WARNING: multiple messages have this Message-ID (diff)
From: Minchan Kim <minchan@kernel.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	Kyungmin Park <kmpark@infradead.org>,
	Marek Szyprowski <m.szyprowski@samsung.com>,
	Michal Nazarewicz <mina86@mina86.com>,
	Rik van Riel <riel@redhat.com>, Mel Gorman <mgorman@suse.de>,
	Linux-Next <linux-next@vger.kernel.org>
Subject: Re: [PATCH] mm: cma: Discard clean pages during contiguous allocation instead of migration
Date: Fri, 14 Sep 2012 09:10:32 +0900	[thread overview]
Message-ID: <20120914001032.GD5085@bbox> (raw)
In-Reply-To: <20120913151922.b8893088.akpm@linux-foundation.org>

On Thu, Sep 13, 2012 at 03:19:22PM -0700, Andrew Morton wrote:
> On Thu, 13 Sep 2012 21:17:19 +0200
> Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> 
> > On Tue, Sep 11, 2012 at 2:41 AM, Minchan Kim <minchan@kernel.org> wrote:
> > > --- a/mm/vmscan.c
> > > +++ b/mm/vmscan.c
> > > @@ -674,8 +674,10 @@ static enum page_references page_check_references(struct page *page,
> > >  static unsigned long shrink_page_list(struct list_head *page_list,
> > >                                       struct zone *zone,
> > >                                       struct scan_control *sc,
> > > +                                     enum ttu_flags ttu_flags,
> > 
> > "enum ttu_flags" is defined on CONFIG_MMU=y only, causing on nommu:
> > 
> > mm/vmscan.c:677:26: error: parameter 4 ('ttu_flags') has incomplete type
> > mm/vmscan.c:987:5: error: 'TTU_UNMAP' undeclared (first use in this function)
> > mm/vmscan.c:987:15: error: 'TTU_IGNORE_ACCESS' undeclared (first use
> > in this function)
> > mm/vmscan.c:1312:56: error: 'TTU_UNMAP' undeclared (first use in this function)
> > 
> > E.g.
> > http://kisskb.ellerman.id.au/kisskb/buildresult/7191694/ (h8300-defconfig)
> > http://kisskb.ellerman.id.au/kisskb/buildresult/7191858/ (sh-allnoconfig)
> 
> hm, OK, the means by which current mainline avoids build errors is
> either clever or lucky.
> 
> 			switch (try_to_unmap(page, TTU_UNMAP)) {
> 
> gets preprocessed into
> 
> 			switch (2) {
> 
> so the cmopiler never gets to see the TTU_ symbol at all.  Because it
> happens to be inside the try_to_unmap() call.
> 
> 
> I guess we can just make ttu_flags visible to NOMMU:

I agree.

Geert, Andrew
Thanks for the reporting and quick fix!

-- 
Kind regards,
Minchan Kim

--
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:[~2012-09-14  0:08 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-11  0:41 [PATCH] mm: cma: Discard clean pages during contiguous allocation instead of migration Minchan Kim
2012-09-11  0:41 ` Minchan Kim
2012-09-11  8:59 ` Mel Gorman
2012-09-11  8:59   ` Mel Gorman
2012-09-11 11:15 ` Michal Nazarewicz
2012-09-11 11:15   ` Michal Nazarewicz
2012-09-11 11:23   ` Kyungmin Park
2012-09-11 11:23     ` Kyungmin Park
2012-09-12 20:07 ` Andrew Morton
2012-09-12 20:07   ` Andrew Morton
2012-09-12 23:58   ` Minchan Kim
2012-09-12 23:58     ` Minchan Kim
2012-09-13 19:17 ` Geert Uytterhoeven
2012-09-13 19:17   ` Geert Uytterhoeven
2012-09-13 22:19   ` Andrew Morton
2012-09-13 22:19     ` Andrew Morton
2012-09-14  0:10     ` Minchan Kim [this message]
2012-09-14  0:10       ` Minchan Kim

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=20120914001032.GD5085@bbox \
    --to=minchan@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=geert@linux-m68k.org \
    --cc=kmpark@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-next@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=mgorman@suse.de \
    --cc=mina86@mina86.com \
    --cc=riel@redhat.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.