From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.1 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9FA2FC3B1BF for ; Mon, 17 Feb 2020 02:48:34 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 52213208C4 for ; Mon, 17 Feb 2020 02:48:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="FP6DSOG9" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 52213208C4 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id DF6106B0003; Sun, 16 Feb 2020 21:48:33 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id DA68B6B0005; Sun, 16 Feb 2020 21:48:33 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C95A46B0007; Sun, 16 Feb 2020 21:48:33 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0037.hostedemail.com [216.40.44.37]) by kanga.kvack.org (Postfix) with ESMTP id B26A56B0003 for ; Sun, 16 Feb 2020 21:48:33 -0500 (EST) Received: from smtpin09.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 8540B21EA for ; Mon, 17 Feb 2020 02:48:33 +0000 (UTC) X-FDA: 76498085706.09.badge03_6756e99e4c639 X-HE-Tag: badge03_6756e99e4c639 X-Filterd-Recvd-Size: 6668 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) by imf14.hostedemail.com (Postfix) with ESMTP for ; Mon, 17 Feb 2020 02:48:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To: Subject:Sender:Reply-To:Content-ID:Content-Description; bh=WBxLcH9VY8AjnGBBYA4FdXsvq+t0rERSLZNQb6yrbxA=; b=FP6DSOG9oGq1xYczGykMbC5URl kWqXG5cSmGpuqCWWUpEmZ+uBypEX49QpQuC5L8Wr3XAAMOPOgi3byDJ/azIhtsE2r58rvJW2NtnGi N/lV9i9xIvT4Bqo/7kZtZu9SpcXKwwC/vRAJzsR9ZsPZL4Zhd6TvbtXKwxsv0SJrE7L902qBWWdw3 +sWtPBEtrd20gjB9q5a+FJ1qbxLDG2KxTq1W1uY38unBNSg2RG9mlbVbWYvsm8HqGXXFRH4+NMtHE OZVS8rAWi5yX6HbAyqX5Y7GNpe1xtSEfn4pzb4v4WnpSjZs0kLBzFKPYUB6LS78+zeCh+VWWq1uNg v/JLYdQA==; Received: from [2601:1c0:6280:3f0::19c2] by bombadil.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1j3WSM-0001D1-Re; Mon, 17 Feb 2020 02:48:22 +0000 Subject: Re: [PATCH] hugetlb: fix CONFIG_CGROUP_HUGETLB ifdefs To: Mina Almasry Cc: linux-mm@kvack.org, linux-next@vger.kernel.org, open list , David Rientjes , Greg Thelen , Mike Kravetz , Shakeel Butt , Andrew Morton References: <7ff9e944-1c6c-f7c1-d812-e12817c7a317@oracle.com> <20200214204544.231482-1-almasrymina@google.com> <5237b9bc-2614-0a3a-afa5-5015f30d28bc@infradead.org> From: Randy Dunlap Message-ID: Date: Sun, 16 Feb 2020 18:48:21 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 2/16/20 1:03 PM, Mina Almasry wrote: > On Sun, Feb 16, 2020 at 12:40 PM Mina Almasry = wrote: >> >> On Fri, Feb 14, 2020 at 5:57 PM Randy Dunlap w= rote: >>> >>> On 2/14/20 5:17 PM, Randy Dunlap wrote: >>>> On 2/14/20 1:00 PM, Mina Almasry wrote: >>>>> On Fri, Feb 14, 2020 at 12:46 PM Mina Almasry wrote: >>>>>> >>>>>> Fixes an #ifdef bug in the patch referred to below that was >>>>>> causing a build error when CONFIG_DEBUG_VM && >>>>>> !CONFIG_CCGROUP_HUGETLB. >>>> >>>> Hi Mina, >>>> >>>> I don't know if this was supposed to fix the 2 build reports that I = made, >>>> but this does not apply cleanly to mmotm (and it's a reply email so = it's >>>> more difficult to apply anyway): >>>> >>>> Applying patch mm-hugetlb-fix-CONFIG_CGROUP_HUGETLB.patch >>>> patching file mm/hugetlb.c >>>> Hunk #1 succeeded at 289 with fuzz 1. >>>> Hunk #2 succeeded at 325 with fuzz 2. >>>> Hunk #3 FAILED at 435. >>>> 1 out of 3 hunks FAILED -- rejects in file mm/hugetlb.c >>>> >>> >>> OK, I applied this patch manually and it does fix most of the reporte= d build problems. >>> The only one remaining is this: >>> >>> CC mm/migrate.o >>> In file included from ../mm/migrate.c:39:0: >>> ../include/linux/hugetlb_cgroup.h:146:21: warning: =E2=80=98struct fi= le_region=E2=80=99 declared inside parameter list will not be visible out= side of this definition or declaration >>> struct file_region *rg, >>> ^~~~~~~~~~~ >>> ../include/linux/hugetlb_cgroup.h:145:63: warning: =E2=80=98struct re= sv_map=E2=80=99 declared inside parameter list will not be visible outsid= e of this definition or declaration >>> static inline void hugetlb_cgroup_uncharge_file_region(struct resv_m= ap *resv, >>> ^~~~~~= ~~ >>> ../include/linux/hugetlb_cgroup.h:233:59: warning: =E2=80=98struct re= sv_map=E2=80=99 declared inside parameter list will not be visible outsid= e of this definition or declaration >>> static inline void hugetlb_cgroup_uncharge_counter(struct resv_map *= resv, >>> ^~~~~~~~ >>> >> >> Hi Randy, >> >> Yes this was supposed to fix the build errors. I'm having trouble >> reproducing the one you have pending above. This is my development >> environment: >> >> =E2=9E=9C prodkernel2 git:(mm-build-fix) git remote show github-akpm >> * remote github-akpm >> Fetch URL: https://github.com/hnaz/linux-mm.git >> Push URL: https://github.com/hnaz/linux-mm.git >> >> =E2=9E=9C prodkernel2 git:(mm-build-fix) git s >> ## mm-build-fix...github-akpm/master [ahead 1] >> >> =E2=9E=9C prodkernel2 git:(mm-build-fix) make -j80 mm/migrate.o >> (succeeds with no warnings). >> >> =E2=9E=9C prodkernel2 git:(mm-build-fix) make -j80 >> (succeeds with no warnings) >> >> Is my development environment wrong? Shouldn't I be able to reproduce >> this build warning on this tree with my fix? >> https://github.com/hnaz/linux-mm.git >> >> I'm using config-r9887 that you sent earlier. >> >> I'm probably supposed to use a different branch since you also say >> that my patch doesn't apply cleanily, but the mmotm readme says that >> github mirrors Andrew's tree? >> >=20 > Just looking at the build error without being able to reproduce, it > looks like this diff would fix it? Hi Mina, This patch does not fix the build warnings that I reported. The initial report is here: https://lore.kernel.org/lkml/97879032-f159-f1c6-9cde-d4e0389b2d7f@infrade= ad.org/ and the kernel .config file is named config-r9883 (not r9887). > =E2=9E=9C prodkernel2 git:(mm-build-fix) =E2=9C=97 git diff > diff --git a/include/linux/hugetlb_cgroup.h b/include/linux/hugetlb_cgr= oup.h > index a09d4164ba910..5f66cdcbe9b10 100644 > --- a/include/linux/hugetlb_cgroup.h > +++ b/include/linux/hugetlb_cgroup.h > @@ -15,6 +15,7 @@ > #ifndef _LINUX_HUGETLB_CGROUP_H > #define _LINUX_HUGETLB_CGROUP_H >=20 > +#include > #include >=20 > struct hugetlb_cgroup; >=20 > Can you let me know? Or any insight into why I can't reproduce the > warning? Wrong tree perhaps? >=20 > I suspect a forward declaration of struct resv_map and struct > file_region in hugetlb_cgroup.h would also fix. --=20 ~Randy