linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [linux-next:master 5141/5361] include/linux/hmm.h:102:22: error: field 'mmu_notifier' has incomplete type
@ 2019-02-01 16:14 kbuild test robot
  2019-02-01 21:47 ` Andrew Morton
  2019-02-01 22:48 ` Balbir Singh
  0 siblings, 2 replies; 6+ messages in thread
From: kbuild test robot @ 2019-02-01 16:14 UTC (permalink / raw)
  To: Jérôme Glisse
  Cc: kbuild-all, Andrew Morton, Linux Memory Management List

[-- Attachment #1: Type: text/plain, Size: 1889 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   9fe36dd579c794ae5f1c236293c55fb6847e9654
commit: a3402cb621c1b3908600d3f364e991a6c5a8c06e [5141/5361] mm/hmm: improve driver API to work and wait over a range
config: x86_64-randconfig-b0-02012138 (attached as .config)
compiler: gcc-8 (Debian 8.2.0-14) 8.2.0
reproduce:
        git checkout a3402cb621c1b3908600d3f364e991a6c5a8c06e
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All errors (new ones prefixed by >>):

   In file included from kernel/memremap.c:14:
>> include/linux/hmm.h:102:22: error: field 'mmu_notifier' has incomplete type
     struct mmu_notifier mmu_notifier;
                         ^~~~~~~~~~~~

vim +/mmu_notifier +102 include/linux/hmm.h

    81	
    82	
    83	/*
    84	 * struct hmm - HMM per mm struct
    85	 *
    86	 * @mm: mm struct this HMM struct is bound to
    87	 * @lock: lock protecting ranges list
    88	 * @ranges: list of range being snapshotted
    89	 * @mirrors: list of mirrors for this mm
    90	 * @mmu_notifier: mmu notifier to track updates to CPU page table
    91	 * @mirrors_sem: read/write semaphore protecting the mirrors list
    92	 * @wq: wait queue for user waiting on a range invalidation
    93	 * @notifiers: count of active mmu notifiers
    94	 * @dead: is the mm dead ?
    95	 */
    96	struct hmm {
    97		struct mm_struct	*mm;
    98		struct kref		kref;
    99		struct mutex		lock;
   100		struct list_head	ranges;
   101		struct list_head	mirrors;
 > 102		struct mmu_notifier	mmu_notifier;
   103		struct rw_semaphore	mirrors_sem;
   104		wait_queue_head_t	wq;
   105		long			notifiers;
   106		bool			dead;
   107	};
   108	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 28256 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [linux-next:master 5141/5361] include/linux/hmm.h:102:22: error: field 'mmu_notifier' has incomplete type
  2019-02-01 16:14 [linux-next:master 5141/5361] include/linux/hmm.h:102:22: error: field 'mmu_notifier' has incomplete type kbuild test robot
@ 2019-02-01 21:47 ` Andrew Morton
  2019-02-01 22:04   ` Jerome Glisse
  2019-02-01 22:48 ` Balbir Singh
  1 sibling, 1 reply; 6+ messages in thread
From: Andrew Morton @ 2019-02-01 21:47 UTC (permalink / raw)
  To: kbuild test robot
  Cc: Jérôme Glisse, kbuild-all, Linux Memory Management List

On Sat, 2 Feb 2019 00:14:13 +0800 kbuild test robot <lkp@intel.com> wrote:

> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> head:   9fe36dd579c794ae5f1c236293c55fb6847e9654
> commit: a3402cb621c1b3908600d3f364e991a6c5a8c06e [5141/5361] mm/hmm: improve driver API to work and wait over a range
> config: x86_64-randconfig-b0-02012138 (attached as .config)
> compiler: gcc-8 (Debian 8.2.0-14) 8.2.0
> reproduce:
>         git checkout a3402cb621c1b3908600d3f364e991a6c5a8c06e
>         # save the attached .config to linux build tree
>         make ARCH=x86_64 
> 
> All errors (new ones prefixed by >>):
> 
>    In file included from kernel/memremap.c:14:
> >> include/linux/hmm.h:102:22: error: field 'mmu_notifier' has incomplete type
>      struct mmu_notifier mmu_notifier;

I can't reproduce this with that .config.

hmm.h includes mmu_notifier.h so I can't eyeball why this would happen.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [linux-next:master 5141/5361] include/linux/hmm.h:102:22: error: field 'mmu_notifier' has incomplete type
  2019-02-01 21:47 ` Andrew Morton
@ 2019-02-01 22:04   ` Jerome Glisse
  0 siblings, 0 replies; 6+ messages in thread
From: Jerome Glisse @ 2019-02-01 22:04 UTC (permalink / raw)
  To: Andrew Morton; +Cc: kbuild test robot, kbuild-all, Linux Memory Management List

> On Sat, 2 Feb 2019 00:14:13 +0800 kbuild test robot <lkp@intel.com> wrote:
> 
> > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
> > master
> > head:   9fe36dd579c794ae5f1c236293c55fb6847e9654
> > commit: a3402cb621c1b3908600d3f364e991a6c5a8c06e [5141/5361] mm/hmm:
> > improve driver API to work and wait over a range
> > config: x86_64-randconfig-b0-02012138 (attached as .config)
> > compiler: gcc-8 (Debian 8.2.0-14) 8.2.0
> > reproduce:
> >         git checkout a3402cb621c1b3908600d3f364e991a6c5a8c06e
> >         # save the attached .config to linux build tree
> >         make ARCH=x86_64
> > 
> > All errors (new ones prefixed by >>):
> > 
> >    In file included from kernel/memremap.c:14:
> > >> include/linux/hmm.h:102:22: error: field 'mmu_notifier' has incomplete
> > >> type
> >      struct mmu_notifier mmu_notifier;
> 
> I can't reproduce this with that .config.
> 
> hmm.h includes mmu_notifier.h so I can't eyeball why this would happen.
> 

I am on pto, i will try to look it over in idle time can you send me
the config, or can i download it from somewhere ?

If i had to guess it is because this random config enable HMM without
any of the other HMM bits so adding: select MMU_NOTIFIER to config HMM
will fix it.

Cheers,
Jérôme


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [linux-next:master 5141/5361] include/linux/hmm.h:102:22: error: field 'mmu_notifier' has incomplete type
  2019-02-01 16:14 [linux-next:master 5141/5361] include/linux/hmm.h:102:22: error: field 'mmu_notifier' has incomplete type kbuild test robot
  2019-02-01 21:47 ` Andrew Morton
@ 2019-02-01 22:48 ` Balbir Singh
  2019-02-01 23:08   ` Jerome Glisse
  1 sibling, 1 reply; 6+ messages in thread
From: Balbir Singh @ 2019-02-01 22:48 UTC (permalink / raw)
  To: kbuild test robot
  Cc: Jérôme Glisse, kbuild-all, Andrew Morton,
	Linux Memory Management List

On Sat, Feb 02, 2019 at 12:14:13AM +0800, kbuild test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> head:   9fe36dd579c794ae5f1c236293c55fb6847e9654
> commit: a3402cb621c1b3908600d3f364e991a6c5a8c06e [5141/5361] mm/hmm: improve driver API to work and wait over a range
> config: x86_64-randconfig-b0-02012138 (attached as .config)
> compiler: gcc-8 (Debian 8.2.0-14) 8.2.0
> reproduce:
>         git checkout a3402cb621c1b3908600d3f364e991a6c5a8c06e
>         # save the attached .config to linux build tree
>         make ARCH=x86_64 
> 
> All errors (new ones prefixed by >>):
> 
>    In file included from kernel/memremap.c:14:
> >> include/linux/hmm.h:102:22: error: field 'mmu_notifier' has incomplete type
>      struct mmu_notifier mmu_notifier;
>                          ^~~~~~~~~~~~
> 
> vim +/mmu_notifier +102 include/linux/hmm.h
> 
>     81	
>     82	
>     83	/*
>     84	 * struct hmm - HMM per mm struct
>     85	 *
>     86	 * @mm: mm struct this HMM struct is bound to
>     87	 * @lock: lock protecting ranges list
>     88	 * @ranges: list of range being snapshotted
>     89	 * @mirrors: list of mirrors for this mm
>     90	 * @mmu_notifier: mmu notifier to track updates to CPU page table
>     91	 * @mirrors_sem: read/write semaphore protecting the mirrors list
>     92	 * @wq: wait queue for user waiting on a range invalidation
>     93	 * @notifiers: count of active mmu notifiers
>     94	 * @dead: is the mm dead ?
>     95	 */
>     96	struct hmm {
>     97		struct mm_struct	*mm;
>     98		struct kref		kref;
>     99		struct mutex		lock;
>    100		struct list_head	ranges;
>    101		struct list_head	mirrors;
>  > 102		struct mmu_notifier	mmu_notifier;

Only HMM_MIRROR depends on MMU_NOTIFIER, but mmu_notifier in
the hmm struct is not conditionally dependent HMM_MIRROR.
The shared config has HMM_MIRROR disabled

Balbir


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [linux-next:master 5141/5361] include/linux/hmm.h:102:22: error: field 'mmu_notifier' has incomplete type
  2019-02-01 22:48 ` Balbir Singh
@ 2019-02-01 23:08   ` Jerome Glisse
  2019-02-02  0:16     ` Balbir Singh
  0 siblings, 1 reply; 6+ messages in thread
From: Jerome Glisse @ 2019-02-01 23:08 UTC (permalink / raw)
  To: Balbir Singh
  Cc: kbuild test robot, kbuild-all, Andrew Morton,
	Linux Memory Management List



----- Original Message -----
> On Sat, Feb 02, 2019 at 12:14:13AM +0800, kbuild test robot wrote:
> > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
> > master
> > head:   9fe36dd579c794ae5f1c236293c55fb6847e9654
> > commit: a3402cb621c1b3908600d3f364e991a6c5a8c06e [5141/5361] mm/hmm:
> > improve driver API to work and wait over a range
> > config: x86_64-randconfig-b0-02012138 (attached as .config)
> > compiler: gcc-8 (Debian 8.2.0-14) 8.2.0
> > reproduce:
> >         git checkout a3402cb621c1b3908600d3f364e991a6c5a8c06e
> >         # save the attached .config to linux build tree
> >         make ARCH=x86_64
> > 
> > All errors (new ones prefixed by >>):
> > 
> >    In file included from kernel/memremap.c:14:
> > >> include/linux/hmm.h:102:22: error: field 'mmu_notifier' has incomplete
> > >> type
> >      struct mmu_notifier mmu_notifier;
> >                          ^~~~~~~~~~~~
> > 
> > vim +/mmu_notifier +102 include/linux/hmm.h
> > 
> >     81
> >     82
> >     83	/*
> >     84	 * struct hmm - HMM per mm struct
> >     85	 *
> >     86	 * @mm: mm struct this HMM struct is bound to
> >     87	 * @lock: lock protecting ranges list
> >     88	 * @ranges: list of range being snapshotted
> >     89	 * @mirrors: list of mirrors for this mm
> >     90	 * @mmu_notifier: mmu notifier to track updates to CPU page table
> >     91	 * @mirrors_sem: read/write semaphore protecting the mirrors list
> >     92	 * @wq: wait queue for user waiting on a range invalidation
> >     93	 * @notifiers: count of active mmu notifiers
> >     94	 * @dead: is the mm dead ?
> >     95	 */
> >     96	struct hmm {
> >     97		struct mm_struct	*mm;
> >     98		struct kref		kref;
> >     99		struct mutex		lock;
> >    100		struct list_head	ranges;
> >    101		struct list_head	mirrors;
> >  > 102		struct mmu_notifier	mmu_notifier;
> 
> Only HMM_MIRROR depends on MMU_NOTIFIER, but mmu_notifier in
> the hmm struct is not conditionally dependent HMM_MIRROR.
> The shared config has HMM_MIRROR disabled
> 
> Balbir
> 
> 

I am bad with kconfig simplest fix from my pov is adding
select MMU_NOTIFIER to HMM config as anyway anything that
will have HMM will need notifier.

config HMM
  bool
+ select MMU_NOTIFIER
  select MIGRATE_VMA_HELPER


Cheers,
Jérôme


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [linux-next:master 5141/5361] include/linux/hmm.h:102:22: error: field 'mmu_notifier' has incomplete type
  2019-02-01 23:08   ` Jerome Glisse
@ 2019-02-02  0:16     ` Balbir Singh
  0 siblings, 0 replies; 6+ messages in thread
From: Balbir Singh @ 2019-02-02  0:16 UTC (permalink / raw)
  To: Jerome Glisse
  Cc: kbuild test robot, kbuild-all, Andrew Morton,
	Linux Memory Management List

On Fri, Feb 01, 2019 at 06:08:06PM -0500, Jerome Glisse wrote:
> 
> 
> ----- Original Message -----
> > On Sat, Feb 02, 2019 at 12:14:13AM +0800, kbuild test robot wrote:
> > > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
> > > master
> > > head:   9fe36dd579c794ae5f1c236293c55fb6847e9654
> > > commit: a3402cb621c1b3908600d3f364e991a6c5a8c06e [5141/5361] mm/hmm:
> > > improve driver API to work and wait over a range
> > > config: x86_64-randconfig-b0-02012138 (attached as .config)
> > > compiler: gcc-8 (Debian 8.2.0-14) 8.2.0
> > > reproduce:
> > >         git checkout a3402cb621c1b3908600d3f364e991a6c5a8c06e
> > >         # save the attached .config to linux build tree
> > >         make ARCH=x86_64
> > > 
> > > All errors (new ones prefixed by >>):
> > > 
> > >    In file included from kernel/memremap.c:14:
> > > >> include/linux/hmm.h:102:22: error: field 'mmu_notifier' has incomplete
> > > >> type
> > >      struct mmu_notifier mmu_notifier;
> > >                          ^~~~~~~~~~~~
> > > 
> > > vim +/mmu_notifier +102 include/linux/hmm.h
> > > 
> > >     81
> > >     82
> > >     83	/*
> > >     84	 * struct hmm - HMM per mm struct
> > >     85	 *
> > >     86	 * @mm: mm struct this HMM struct is bound to
> > >     87	 * @lock: lock protecting ranges list
> > >     88	 * @ranges: list of range being snapshotted
> > >     89	 * @mirrors: list of mirrors for this mm
> > >     90	 * @mmu_notifier: mmu notifier to track updates to CPU page table
> > >     91	 * @mirrors_sem: read/write semaphore protecting the mirrors list
> > >     92	 * @wq: wait queue for user waiting on a range invalidation
> > >     93	 * @notifiers: count of active mmu notifiers
> > >     94	 * @dead: is the mm dead ?
> > >     95	 */
> > >     96	struct hmm {
> > >     97		struct mm_struct	*mm;
> > >     98		struct kref		kref;
> > >     99		struct mutex		lock;
> > >    100		struct list_head	ranges;
> > >    101		struct list_head	mirrors;
> > >  > 102		struct mmu_notifier	mmu_notifier;
> > 
> > Only HMM_MIRROR depends on MMU_NOTIFIER, but mmu_notifier in
> > the hmm struct is not conditionally dependent HMM_MIRROR.
> > The shared config has HMM_MIRROR disabled
> > 
> > Balbir
> > 
> > 
> 
> I am bad with kconfig simplest fix from my pov is adding
> select MMU_NOTIFIER to HMM config as anyway anything that
> will have HMM will need notifier.
> 
> config HMM
>   bool
> + select MMU_NOTIFIER
>   select MIGRATE_VMA_HELPER
>

Yes

Acked-by: Balbir Singh <bsingharora@gmail.com>
 
> 
> Cheers,
> Jérôme


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-02-02  0:16 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-01 16:14 [linux-next:master 5141/5361] include/linux/hmm.h:102:22: error: field 'mmu_notifier' has incomplete type kbuild test robot
2019-02-01 21:47 ` Andrew Morton
2019-02-01 22:04   ` Jerome Glisse
2019-02-01 22:48 ` Balbir Singh
2019-02-01 23:08   ` Jerome Glisse
2019-02-02  0:16     ` Balbir Singh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).