Linux-mm Archive on lore.kernel.org
 help / color / Atom feed
From: Randy Dunlap <rdunlap@infradead.org>
To: Mina Almasry <almasrymina@google.com>
Cc: linux-mm@kvack.org, linux-next@vger.kernel.org,
	open list <linux-kernel@vger.kernel.org>,
	David Rientjes <rientjes@google.com>,
	Greg Thelen <gthelen@google.com>,
	Mike Kravetz <mike.kravetz@oracle.com>,
	Shakeel Butt <shakeelb@google.com>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH] hugetlb: fix CONFIG_CGROUP_HUGETLB ifdefs
Date: Sun, 16 Feb 2020 18:48:21 -0800
Message-ID: <cad14d07-199e-fd2e-f2ac-0d7460277d62@infradead.org> (raw)
In-Reply-To: <CAHS8izOTc_7RKHoJVG_dOKEjT1d4KxNOUwMqqZwyqZm0fe=HcA@mail.gmail.com>

On 2/16/20 1:03 PM, Mina Almasry wrote:
> On Sun, Feb 16, 2020 at 12:40 PM Mina Almasry <almasrymina@google.com> wrote:
>>
>> On Fri, Feb 14, 2020 at 5:57 PM Randy Dunlap <rdunlap@infradead.org> wrote:
>>>
>>> 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 <almasrymina@google.com> 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 reported 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: ‘struct file_region’ declared inside parameter list will not be visible outside of this definition or declaration
>>>               struct file_region *rg,
>>>                      ^~~~~~~~~~~
>>> ../include/linux/hugetlb_cgroup.h:145:63: warning: ‘struct resv_map’ declared inside parameter list will not be visible outside of this definition or declaration
>>>  static inline void hugetlb_cgroup_uncharge_file_region(struct resv_map *resv,
>>>                                                                ^~~~~~~~
>>> ../include/linux/hugetlb_cgroup.h:233:59: warning: ‘struct resv_map’ declared inside parameter list will not be visible outside 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:
>>
>> ➜  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
>>
>> ➜  prodkernel2 git:(mm-build-fix) git s
>> ## mm-build-fix...github-akpm/master [ahead 1]
>>
>> ➜  prodkernel2 git:(mm-build-fix) make -j80 mm/migrate.o
>> (succeeds with no warnings).
>>
>> ➜  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?
>>
> 
> 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@infradead.org/
and the kernel .config file is named config-r9883 (not r9887).


> ➜  prodkernel2 git:(mm-build-fix) ✗ git diff
> diff --git a/include/linux/hugetlb_cgroup.h b/include/linux/hugetlb_cgroup.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
> 
> +#include <linux/hugetlb.h>
>  #include <linux/mmdebug.h>
> 
>  struct hugetlb_cgroup;
> 
> Can you let me know? Or any insight into why I can't reproduce the
> warning? Wrong tree perhaps?
> 
> I suspect a forward declaration of struct resv_map and struct
> file_region in hugetlb_cgroup.h would also fix.



-- 
~Randy



  reply index

Thread overview: 95+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-04  1:33 incoming Andrew Morton
2020-02-04  1:33 ` [patch 01/67] ocfs2: fix oops when writing cloned file Andrew Morton
2020-02-04  1:33 ` [patch 02/67] mm/page_alloc.c: fix uninitialized memmaps on a partially populated last section Andrew Morton
2020-02-04  1:33 ` [patch 03/67] fs/proc/page.c: allow inspection of last section and fix end detection Andrew Morton
2020-02-04  1:33 ` [patch 04/67] mm/page_alloc.c: initialize memmap of unavailable memory directly Andrew Morton
2020-02-04  1:33 ` [patch 05/67] mm/page_alloc: fix and rework pfn handling in memmap_init_zone() Andrew Morton
2020-02-04  2:45   ` Linus Torvalds
2020-02-04  1:34 ` [patch 06/67] mm: factor out next_present_section_nr() Andrew Morton
2020-02-04  3:04   ` Linus Torvalds
2020-02-04  4:29     ` Andrew Morton
2020-02-04  8:22     ` David Hildenbrand
2020-02-04  1:34 ` [patch 07/67] mm/memmap_init: update variable name in memmap_init_zone Andrew Morton
2020-02-04  1:34 ` [patch 08/67] mm/memory_hotplug: poison memmap in remove_pfn_range_from_zone() Andrew Morton
2020-02-04  1:34 ` [patch 09/67] mm/memory_hotplug: we always have a zone in find_(smallest|biggest)_section_pfn Andrew Morton
2020-02-04  1:34 ` [patch 10/67] mm/memory_hotplug: don't check for "all holes" in shrink_zone_span() Andrew Morton
2020-02-04  1:34 ` [patch 11/67] mm/memory_hotplug: drop local variables " Andrew Morton
2020-02-04  1:34 ` [patch 12/67] mm/memory_hotplug: cleanup __remove_pages() Andrew Morton
2020-02-04  1:34 ` [patch 13/67] mm/memory_hotplug: drop valid_start/valid_end from test_pages_in_a_zone() Andrew Morton
2020-02-04  1:34 ` [patch 14/67] smp_mb__{before,after}_atomic(): update Documentation Andrew Morton
2020-02-04  1:34 ` [patch 15/67] ipc/mqueue.c: remove duplicated code Andrew Morton
2020-02-04  1:34 ` [patch 16/67] ipc/mqueue.c: update/document memory barriers Andrew Morton
2020-02-04  1:34 ` [patch 17/67] ipc/msg.c: update and document " Andrew Morton
2020-02-04  1:34 ` [patch 18/67] ipc/sem.c: document and update " Andrew Morton
2020-02-04  1:34 ` [patch 19/67] ipc/msg.c: consolidate all xxxctl_down() functions Andrew Morton
2020-02-04  1:34 ` [patch 20/67] drivers/block/null_blk_main.c: fix layout Andrew Morton
2020-02-04  1:34 ` [patch 21/67] drivers/block/null_blk_main.c: fix uninitialized var warnings Andrew Morton
2020-02-04  1:34 ` [patch 22/67] pinctrl: fix pxa2xx.c build warnings Andrew Morton
2020-02-04  1:34 ` [patch 23/67] mm: remove __krealloc Andrew Morton
2020-02-04  1:35 ` [patch 24/67] mm: add generic p?d_leaf() macros Andrew Morton
2020-02-04  1:35 ` [patch 25/67] arc: mm: add p?d_leaf() definitions Andrew Morton
2020-02-04  1:35 ` [patch 26/67] arm: " Andrew Morton
2020-02-04  1:35 ` [patch 27/67] arm64: " Andrew Morton
2020-02-04  1:35 ` [patch 28/67] mips: " Andrew Morton
2020-02-04  1:35 ` [patch 29/67] powerpc: " Andrew Morton
2020-02-04  1:35 ` [patch 30/67] riscv: " Andrew Morton
2020-02-04  1:35 ` [patch 31/67] s390: " Andrew Morton
2020-02-04  1:35 ` [patch 32/67] sparc: " Andrew Morton
2020-02-04  1:35 ` [patch 33/67] x86: " Andrew Morton
2020-02-04  1:35 ` [patch 34/67] mm: pagewalk: add p4d_entry() and pgd_entry() Andrew Morton
2020-02-04  1:35 ` [patch 35/67] mm: pagewalk: allow walking without vma Andrew Morton
2020-02-04  1:35 ` [patch 36/67] mm: pagewalk: don't lock PTEs for walk_page_range_novma() Andrew Morton
2020-02-04  1:35 ` [patch 37/67] mm: pagewalk: fix termination condition in walk_pte_range() Andrew Morton
2020-02-04  1:36 ` [patch 38/67] mm: pagewalk: add 'depth' parameter to pte_hole Andrew Morton
2020-02-04  1:36 ` [patch 39/67] x86: mm: point to struct seq_file from struct pg_state Andrew Morton
2020-02-04  1:36 ` [patch 40/67] x86: mm+efi: convert ptdump_walk_pgd_level() to take a mm_struct Andrew Morton
2020-02-04  1:36 ` [patch 41/67] x86: mm: convert ptdump_walk_pgd_level_debugfs() to take an mm_struct Andrew Morton
2020-02-04  1:36 ` [patch 42/67] mm: add generic ptdump Andrew Morton
2020-02-04  1:36 ` [patch 43/67] x86: mm: convert dump_pagetables to use walk_page_range Andrew Morton
2020-02-04  1:36 ` [patch 44/67] arm64: mm: convert mm/dump.c to use walk_page_range() Andrew Morton
2020-02-04  1:36 ` [patch 45/67] arm64: mm: display non-present entries in ptdump Andrew Morton
2020-02-04  1:36 ` [patch 46/67] mm: ptdump: reduce level numbers by 1 in note_page() Andrew Morton
2020-02-04  1:36 ` [patch 47/67] x86: mm: avoid allocating struct mm_struct on the stack Andrew Morton
2020-02-04  1:36 ` [patch 48/67] powerpc/mmu_gather: enable RCU_TABLE_FREE even for !SMP case Andrew Morton
2020-02-04  1:36 ` [patch 49/67] mm/mmu_gather: invalidate TLB correctly on batch allocation failure and flush Andrew Morton
2020-02-04  1:36 ` [patch 50/67] asm-generic/tlb: avoid potential double flush Andrew Morton
2020-02-04  1:36 ` [patch 51/67] asm-gemeric/tlb: remove stray function declarations Andrew Morton
2020-02-04  1:36 ` [patch 52/67] asm-generic/tlb: add missing CONFIG symbol Andrew Morton
2020-02-04  1:37 ` [patch 53/67] asm-generic/tlb: rename HAVE_RCU_TABLE_FREE Andrew Morton
2020-02-04  1:37 ` [patch 54/67] asm-generic/tlb: rename HAVE_MMU_GATHER_PAGE_SIZE Andrew Morton
2020-02-04  1:37 ` [patch 55/67] asm-generic/tlb: rename HAVE_MMU_GATHER_NO_GATHER Andrew Morton
2020-02-04  1:37 ` [patch 56/67] asm-generic/tlb: provide MMU_GATHER_TABLE_FREE Andrew Morton
2020-02-04  1:37 ` [patch 57/67] proc: decouple proc from VFS with "struct proc_ops" Andrew Morton
2020-02-04  1:37 ` [patch 58/67] proc: convert everything to " Andrew Morton
2020-02-04  1:37 ` [patch 59/67] lib/string: add strnchrnul() Andrew Morton
2020-02-04  1:37 ` [patch 60/67] bitops: more BITS_TO_* macros Andrew Morton
2020-02-04  1:37 ` [patch 61/67] lib: add test for bitmap_parse() Andrew Morton
2020-02-04  1:37 ` [patch 62/67] lib: make bitmap_parse_user a wrapper on bitmap_parse Andrew Morton
2020-02-04  1:37 ` [patch 63/67] lib: rework bitmap_parse() Andrew Morton
2020-02-04  1:37 ` [patch 64/67] lib: new testcases for bitmap_parse{_user} Andrew Morton
2020-02-04  1:37 ` [patch 65/67] include/linux/cpumask.h: don't calculate length of the input string Andrew Morton
2020-02-04  1:37 ` [patch 66/67] treewide: remove redundant IS_ERR() before error code check Andrew Morton
2020-02-04  1:37 ` [patch 67/67] ARM: dma-api: fix max_pfn off-by-one error in __dma_supported() Andrew Morton
2020-02-04  2:27 ` incoming Linus Torvalds
2020-02-04  2:46   ` incoming Andrew Morton
2020-02-04  3:11     ` incoming Linus Torvalds
2020-02-14  6:26 ` mmotm 2020-02-13-22-26 uploaded Andrew Morton
2020-02-14 16:29   ` mmotm 2020-02-13-22-26 uploaded (mm/hugetlb.c) Randy Dunlap
2020-02-14 17:18     ` Mike Kravetz
2020-02-14 20:51       ` Mina Almasry
     [not found]       ` <20200214204544.231482-1-almasrymina@google.com>
2020-02-14 21:00         ` [PATCH] hugetlb: fix CONFIG_CGROUP_HUGETLB ifdefs Mina Almasry
2020-02-15  1:17           ` Randy Dunlap
2020-02-15  1:56             ` Randy Dunlap
2020-02-16 20:40               ` Mina Almasry
2020-02-16 21:03                 ` Mina Almasry
2020-02-17  2:48                   ` Randy Dunlap [this message]
2020-02-17  2:57                     ` [PATCH] hugetlb: fix <linux/hugetlb_cgroup.h> structs Randy Dunlap
2020-02-17  3:53               ` [PATCH] hugetlb: fix CONFIG_CGROUP_HUGETLB ifdefs Stephen Rothwell
2020-02-14 16:49   ` mmotm 2020-02-13-22-26 uploaded (mm/migrate.c, hugetlb_cgroup.h) Randy Dunlap
2020-02-25  3:53 ` mmotm 2020-02-24-19-53 uploaded Andrew Morton
2020-02-25  6:16   ` mmotm 2020-02-24-19-53 uploaded (init/main.c: initrd*) Randy Dunlap
2020-02-25  6:18     ` Randy Dunlap
2020-02-25  6:21       ` Randy Dunlap
2020-02-25 16:41   ` mmotm 2020-02-24-19-53 uploaded (drivers/platform/x86/intel_pmc_core.c) Randy Dunlap
2020-02-25 17:01   ` mmotm 2020-02-24-19-53 uploaded (objtool warning) Randy Dunlap
2020-02-27 21:52     ` Josh Poimboeuf

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=cad14d07-199e-fd2e-f2ac-0d7460277d62@infradead.org \
    --to=rdunlap@infradead.org \
    --cc=akpm@linux-foundation.org \
    --cc=almasrymina@google.com \
    --cc=gthelen@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-next@vger.kernel.org \
    --cc=mike.kravetz@oracle.com \
    --cc=rientjes@google.com \
    --cc=shakeelb@google.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

Linux-mm Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-mm/0 linux-mm/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-mm linux-mm/ https://lore.kernel.org/linux-mm \
		linux-mm@kvack.org
	public-inbox-index linux-mm

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kvack.linux-mm


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git