From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f43.google.com (mail-wm0-f43.google.com [74.125.82.43]) by kanga.kvack.org (Postfix) with ESMTP id AF1E76B0009 for ; Thu, 21 Jan 2016 14:31:47 -0500 (EST) Received: by mail-wm0-f43.google.com with SMTP id u188so239968857wmu.1 for ; Thu, 21 Jan 2016 11:31:47 -0800 (PST) Received: from mail-wm0-x243.google.com (mail-wm0-x243.google.com. [2a00:1450:400c:c09::243]) by mx.google.com with ESMTPS id v130si6020717wme.80.2016.01.21.11.31.46 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 21 Jan 2016 11:31:46 -0800 (PST) Received: by mail-wm0-x243.google.com with SMTP id 123so12933538wmz.2 for ; Thu, 21 Jan 2016 11:31:46 -0800 (PST) MIME-Version: 1.0 In-Reply-To: References: <20160118114043.GA14531@node.shutemov.name> Date: Thu, 21 Jan 2016 11:31:46 -0800 Message-ID: Subject: Re: BUILD_BUG() in smaps_account() (was: Re: [PATCHv12 01/37] mm, proc: adjust PSS calculation) From: Tony Luck Content-Type: text/plain; charset=UTF-8 Sender: owner-linux-mm@kvack.org List-ID: To: Geert Uytterhoeven Cc: "Kirill A. Shutemov" , "Kirill A. Shutemov" , Andrew Morton , Andrea Arcangeli , Hugh Dickins , Dave Hansen , Mel Gorman , Rik van Riel , Vlastimil Babka , Christoph Lameter , Naoya Horiguchi , Steve Capper , "Aneesh Kumar K.V" , Johannes Weiner , Michal Hocko , Jerome Marchand , Sasha Levin , "linux-kernel@vger.kernel.org" , Linux MM On Mon, Jan 18, 2016 at 6:56 AM, Geert Uytterhoeven wrote: > Hi Kirill, > > On Mon, Jan 18, 2016 at 12:40 PM, Kirill A. Shutemov > wrote: >> On Mon, Jan 18, 2016 at 11:09:00AM +0100, Geert Uytterhoeven wrote: >>> fs/built-in.o: In function `smaps_account': >>> task_mmu.c:(.text+0x4f8fa): undefined reference to >>> `__compiletime_assert_471' >>> >>> Seen with m68k/allmodconfig or allyesconfig and gcc version 4.1.2 20061115 >>> (prerelease) (Ubuntu 4.1.1-21). >>> Not seen when compiling the affected file with gcc 4.6.3 or 4.9.0, or with the >>> m68k defconfigs. >> >> Ughh. >> >> Please, test this: >> >> From 5ac27019f886eef033e84c9579e09099469ccbf9 Mon Sep 17 00:00:00 2001 >> From: "Kirill A. Shutemov" >> Date: Mon, 18 Jan 2016 14:32:49 +0300 >> Subject: [PATCH] mm, proc: add workaround for old compilers >> >> For THP=n, HPAGE_PMD_NR in smaps_account() expands to BUILD_BUG(). >> That's fine since this codepath is eliminated by modern compilers. >> >> But older compilers have not that efficient dead code elimination. >> It causes problem at least with gcc 4.1.2 on m68k. >> >> Let's replace HPAGE_PMD_NR with 1 << compound_order(page). >> >> Signed-off-by: Kirill A. Shutemov >> Reported-by: Geert Uytterhoeven > > Thanks, that fixes it! > > Tested-by: Geert Uytterhoeven Same breakage on ia64 (with gcc 4.3.4). Same fix works for me. Tested-by: Tony Luck -- 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