From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751436AbcFWNPs (ORCPT ); Thu, 23 Jun 2016 09:15:48 -0400 Received: from mout.kundenserver.de ([212.227.126.187]:57074 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750885AbcFWNPr (ORCPT ); Thu, 23 Jun 2016 09:15:47 -0400 From: Arnd Bergmann To: Mel Gorman Cc: Vlastimil Babka , Johannes Weiner , Rik van Riel , Andrew Morton , 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 15:17:43 +0200 Message-ID: <3817461.6pThRKgN9N@wuerfel> User-Agent: KMail/5.1.3 (Linux/4.4.0-22-generic; KDE/5.18.0; x86_64; ; ) In-Reply-To: <20160623104124.GR1868@techsingularity.net> References: <20160623100518.156662-1-arnd@arndb.de> <20160623104124.GR1868@techsingularity.net> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:fp5FiohUUbe9dVBR3o3as4jUVFrIQFWx/e1mTNm801i2fIRDvQW 3s9s6hDqwchOVDim6TVbExyEAIMoGSU8tBhdNhya36jyrEtNZ4VD0ROjgCyOKdvI4qQyxKl /WU20+04Rg7SVEXk6q4VttrHBxbR5MV8ncgKmDbuerqiowDndvlWz9txRBuN0MHYAX/Osl/ OUpuc2qYi7HJfkcOW5iPQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:i6ssRqbnVLU=:VOGjQH/ECihk6ETvuR7plM 2ROVCFS96ARxOG+taUolGuiEpaXHgnFhxTmb2WltE97mlMLpvheTNx8dG9D8QHi1rHX8NNMCt g2p+R/gv4VFciKUIl+OXosX3tRocqXyQ2iWpWYzjPTaY5X1KL08QrCsAaa5SM8n/X0qO3v0x3 YS01HegQnXjYz0ZY919Vblx5tlNkcjXvAmIxpIPmnT2qihiHa1Rh6ZHrqDc0ygtRWBtgrE0/D 1sVEQNzjqxAZ1gv/y8jb4aZ1CHnuTwGiF0E4VvR/NTfZUTGM0ZESZbC8uFWSd+TNWKCZE4bf2 y+wc6wKFSsZO7rAc8PZQbPSDPsa0QizFgK//kon8ftwkartFQJBKoOd7RgtBQyiTjQX16NJZe MqNwMgcJazGMRsjSxnqqU3Be4o/Q9FDZ9fmtuy5m8h5MUTL17KPiR7HyYJ9dRJFK98QF+MDzz rKehuxdWI8TmCsCWuFTncb7AvAfsG0/3oytKt0RPYTKpAl5N7PFuLyYV1cS1FLFAEV+DpS3G0 wqqYm1dRol1dhZursZTzlOjXFwsqvSZ0SHGIWVN+aL9Sx3cGespeCmOPSNkcASASHSIx1Q1K2 bhFNB7iAY3OTaBj5JZBcQARvunjiYjYSaCK2hdjMzFPvcKwxS+nD/8Ou9WfpxlmLf4r06dj2d W1HlywBLs2DVWq2KtitXe0jEcZrOCknWsRDoS9H9zTewPJfsui9MpHaf8XRoccd+ExVvgV7l9 X70bjFHjGsiIWtei Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thursday, June 23, 2016 11:41:24 AM CEST Mel Gorman wrote: > 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. Ok. I've done a new version of my debug patch now, will follow up here so you can do some testing on top of that as well if you like. We probably don't want to apply my patch for the type checking, but you might find it useful for your own testing. Arnd From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf0-f72.google.com (mail-lf0-f72.google.com [209.85.215.72]) by kanga.kvack.org (Postfix) with ESMTP id A60986B0260 for ; Thu, 23 Jun 2016 09:15:36 -0400 (EDT) Received: by mail-lf0-f72.google.com with SMTP id g18so53849710lfg.2 for ; Thu, 23 Jun 2016 06:15:36 -0700 (PDT) Received: from mout.kundenserver.de (mout.kundenserver.de. [212.227.126.187]) by mx.google.com with ESMTPS id le1si183975wjb.30.2016.06.23.06.15.35 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 23 Jun 2016 06:15:35 -0700 (PDT) From: Arnd Bergmann Subject: Re: [RFC, DEBUGGING 1/2] mm: pass NR_FILE_PAGES/NR_SHMEM into node_page_state Date: Thu, 23 Jun 2016 15:17:43 +0200 Message-ID: <3817461.6pThRKgN9N@wuerfel> In-Reply-To: <20160623104124.GR1868@techsingularity.net> References: <20160623100518.156662-1-arnd@arndb.de> <20160623104124.GR1868@techsingularity.net> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: owner-linux-mm@kvack.org List-ID: To: Mel Gorman Cc: Vlastimil Babka , Johannes Weiner , Rik van Riel , Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org On Thursday, June 23, 2016 11:41:24 AM CEST Mel Gorman wrote: > 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. Ok. I've done a new version of my debug patch now, will follow up here so you can do some testing on top of that as well if you like. We probably don't want to apply my patch for the type checking, but you might find it useful for your own testing. Arnd -- 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: email@kvack.org