All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mel Gorman <mgorman@techsingularity.net>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Vlastimil Babka <vbabka@suse.cz>,
	Johannes Weiner <hannes@cmpxchg.org>,
	Rik van Riel <riel@surriel.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [RFC, DEBUGGING 1/2] mm: pass NR_FILE_PAGES/NR_SHMEM into node_page_state
Date: Thu, 23 Jun 2016 11:41:24 +0100	[thread overview]
Message-ID: <20160623104124.GR1868@techsingularity.net> (raw)
In-Reply-To: <20160623100518.156662-1-arnd@arndb.de>

On Thu, Jun 23, 2016 at 12:05:17PM +0200, Arnd Bergmann wrote:
> I see some new warnings from a recent mm change:
> 
> mm/filemap.c: In function '__delete_from_page_cache':
> include/linux/vmstat.h:116:2: error: array subscript is above array bounds [-Werror=array-bounds]
>   atomic_long_add(x, &zone->vm_stat[item]);
>   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> include/linux/vmstat.h:116:35: error: array subscript is above array bounds [-Werror=array-bounds]
>   atomic_long_add(x, &zone->vm_stat[item]);
>                       ~~~~~~~~~~~~~^~~~~~
> include/linux/vmstat.h:116:35: error: array subscript is above array bounds [-Werror=array-bounds]
> include/linux/vmstat.h:117:2: error: array subscript is above array bounds [-Werror=array-bounds]
> 
> Looking deeper into it, I find that we pass the wrong enum
> into some functions after the type for the symbol has changed.
> 
> This changes the code to use the other function for those that
> are using the incorrect type. I've done this blindly just going
> by warnings I got from a debug patch I did for this, so it's likely
> that some cases are more subtle and need another change, so please
> treat this as a bug-report rather than a patch for applying.
> 

I have an alternative fix for this in a private tree. For now, I've asked
Andrew to withdraw the series entirely as there are non-trivial collisions
with OOM detection rework and huge page support for tmpfs.  It'll be easier
and safer to resolve this outside of mmotm as it'll require a full round
of testing which takes 3-4 days.

Thanks.

-- 
Mel Gorman
SUSE Labs

--
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: Mel Gorman <mgorman@techsingularity.net>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Vlastimil Babka <vbabka@suse.cz>,
	Johannes Weiner <hannes@cmpxchg.org>,
	Rik van Riel <riel@surriel.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [RFC, DEBUGGING 1/2] mm: pass NR_FILE_PAGES/NR_SHMEM into node_page_state
Date: Thu, 23 Jun 2016 11:41:24 +0100	[thread overview]
Message-ID: <20160623104124.GR1868@techsingularity.net> (raw)
In-Reply-To: <20160623100518.156662-1-arnd@arndb.de>

On Thu, Jun 23, 2016 at 12:05:17PM +0200, Arnd Bergmann wrote:
> I see some new warnings from a recent mm change:
> 
> mm/filemap.c: In function '__delete_from_page_cache':
> include/linux/vmstat.h:116:2: error: array subscript is above array bounds [-Werror=array-bounds]
>   atomic_long_add(x, &zone->vm_stat[item]);
>   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> include/linux/vmstat.h:116:35: error: array subscript is above array bounds [-Werror=array-bounds]
>   atomic_long_add(x, &zone->vm_stat[item]);
>                       ~~~~~~~~~~~~~^~~~~~
> include/linux/vmstat.h:116:35: error: array subscript is above array bounds [-Werror=array-bounds]
> include/linux/vmstat.h:117:2: error: array subscript is above array bounds [-Werror=array-bounds]
> 
> Looking deeper into it, I find that we pass the wrong enum
> into some functions after the type for the symbol has changed.
> 
> This changes the code to use the other function for those that
> are using the incorrect type. I've done this blindly just going
> by warnings I got from a debug patch I did for this, so it's likely
> that some cases are more subtle and need another change, so please
> treat this as a bug-report rather than a patch for applying.
> 

I have an alternative fix for this in a private tree. For now, I've asked
Andrew to withdraw the series entirely as there are non-trivial collisions
with OOM detection rework and huge page support for tmpfs.  It'll be easier
and safer to resolve this outside of mmotm as it'll require a full round
of testing which takes 3-4 days.

Thanks.

-- 
Mel Gorman
SUSE Labs

  parent reply	other threads:[~2016-06-23 10:41 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-23 10:05 [RFC, DEBUGGING 1/2] mm: pass NR_FILE_PAGES/NR_SHMEM into node_page_state Arnd Bergmann
2016-06-23 10:05 ` Arnd Bergmann
2016-06-23 10:05 ` [RFC, DEBUGGING 2/2] mm: add type checking for page state functions Arnd Bergmann
2016-06-23 10:05   ` Arnd Bergmann
2016-06-23 10:41 ` Mel Gorman [this message]
2016-06-23 10:41   ` [RFC, DEBUGGING 1/2] mm: pass NR_FILE_PAGES/NR_SHMEM into node_page_state Mel Gorman
2016-06-23 13:17   ` Arnd Bergmann
2016-06-23 13:17     ` Arnd Bergmann
2016-06-23 13:18     ` [RFC, DEBUGGING v2 " Arnd Bergmann
2016-06-23 13:18       ` Arnd Bergmann
2016-06-23 13:18       ` [RFC, DEBUGGING v2 2/2] mm: add type checking for page state functions Arnd Bergmann
2016-06-23 13:18         ` Arnd Bergmann
2016-06-23 13:51     ` [RFC, DEBUGGING 1/2] mm: pass NR_FILE_PAGES/NR_SHMEM into node_page_state Mel Gorman
2016-06-23 13:51       ` Mel Gorman
2016-06-23 15:56       ` Arnd Bergmann
2016-06-23 15:56         ` Arnd Bergmann
2016-06-23 16:39         ` Mel Gorman
2016-06-23 16:39           ` Mel Gorman

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=20160623104124.GR1868@techsingularity.net \
    --to=mgorman@techsingularity.net \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=hannes@cmpxchg.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=riel@surriel.com \
    --cc=vbabka@suse.cz \
    /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.