linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch -mm] mm, vmalloc: remove VM_VPAGES
@ 2015-11-19  0:30 David Rientjes
  2015-11-19  0:39 ` kbuild test robot
  2015-11-19  0:40 ` kbuild test robot
  0 siblings, 2 replies; 9+ messages in thread
From: David Rientjes @ 2015-11-19  0:30 UTC (permalink / raw)
  To: Andrew Morton, Tetsuo Handa; +Cc: linux-mm, linux-kernel

VM_VPAGES is unnecessary, it's easier to check is_vmalloc_addr() when
reading /proc/vmallocinfo.

Signed-off-by: David Rientjes <rientjes@google.com>
---
 include/linux/vmalloc.h | 1 -
 mm/vmalloc.c            | 3 +--
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/include/linux/vmalloc.h b/include/linux/vmalloc.h
--- a/include/linux/vmalloc.h
+++ b/include/linux/vmalloc.h
@@ -14,7 +14,6 @@ struct vm_area_struct;		/* vma defining user mapping in mm_types.h */
 #define VM_ALLOC		0x00000002	/* vmalloc() */
 #define VM_MAP			0x00000004	/* vmap()ed pages */
 #define VM_USERMAP		0x00000008	/* suitable for remap_vmalloc_range */
-#define VM_VPAGES		0x00000010	/* buffer for pages was vmalloc'ed */
 #define VM_UNINITIALIZED	0x00000020	/* vm_struct is not fully initialized */
 #define VM_NO_GUARD		0x00000040      /* don't add guard page */
 #define VM_KASAN		0x00000080      /* has allocated kasan shadow memory */
diff --git a/mm/vmalloc.c b/mm/vmalloc.c
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -1591,7 +1591,6 @@ static void *__vmalloc_area_node(struct vm_struct *area, gfp_t gfp_mask,
 	if (array_size > PAGE_SIZE) {
 		pages = __vmalloc_node(array_size, 1, nested_gfp|__GFP_HIGHMEM,
 				PAGE_KERNEL, node, area->caller);
-		area->flags |= VM_VPAGES;
 	} else {
 		pages = kmalloc_node(array_size, nested_gfp, node);
 	}
@@ -2649,7 +2648,7 @@ static int s_show(struct seq_file *m, void *p)
 	if (v->flags & VM_USERMAP)
 		seq_puts(m, " user");
 
-	if (v->flags & VM_VPAGES)
+	if (is_vmalloc_addr(v->pages))
 		seq_puts(m, " vpages");
 
 	show_numa_info(m, v);

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

* Re: [patch -mm] mm, vmalloc: remove VM_VPAGES
  2015-11-19  0:30 [patch -mm] mm, vmalloc: remove VM_VPAGES David Rientjes
@ 2015-11-19  0:39 ` kbuild test robot
  2015-11-19  1:00   ` David Rientjes
  2015-11-19  0:40 ` kbuild test robot
  1 sibling, 1 reply; 9+ messages in thread
From: kbuild test robot @ 2015-11-19  0:39 UTC (permalink / raw)
  To: David Rientjes
  Cc: kbuild-all, Andrew Morton, Tetsuo Handa, linux-mm, linux-kernel

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

Hi David,

[auto build test ERROR on: next-20151118]
[also build test ERROR on: v4.4-rc1]

url:    https://github.com/0day-ci/linux/commits/David-Rientjes/mm-vmalloc-remove-VM_VPAGES/20151119-083326
config: i386-tinyconfig (attached as .config)
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All errors (new ones prefixed by >>):

   mm/vmalloc.c: In function '__vunmap':
>> mm/vmalloc.c:1484:21: error: 'VM_VPAGES' undeclared (first use in this function)
      if (area->flags & VM_VPAGES)
                        ^
   mm/vmalloc.c:1484:21: note: each undeclared identifier is reported only once for each function it appears in

vim +/VM_VPAGES +1484 mm/vmalloc.c

bf53d6f8 Christoph Lameter 2008-02-04  1478  			struct page *page = area->pages[i];
bf53d6f8 Christoph Lameter 2008-02-04  1479  
bf53d6f8 Christoph Lameter 2008-02-04  1480  			BUG_ON(!page);
bf53d6f8 Christoph Lameter 2008-02-04  1481  			__free_page(page);
^1da177e Linus Torvalds    2005-04-16  1482  		}
^1da177e Linus Torvalds    2005-04-16  1483  
8757d5fa Jan Kiszka        2006-07-14 @1484  		if (area->flags & VM_VPAGES)
^1da177e Linus Torvalds    2005-04-16  1485  			vfree(area->pages);
^1da177e Linus Torvalds    2005-04-16  1486  		else
^1da177e Linus Torvalds    2005-04-16  1487  			kfree(area->pages);

:::::: The code at line 1484 was first introduced by commit
:::::: 8757d5fa6b75e8ea906baf0309d49b980e7f9bc9 [PATCH] mm: fix oom roll-back of __vmalloc_area_node

:::::: TO: Jan Kiszka <jan.kiszka@web.de>
:::::: CC: Linus Torvalds <torvalds@g5.osdl.org>

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

[-- Attachment #2: .config.gz --]
[-- Type: application/octet-stream, Size: 6113 bytes --]

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

* Re: [patch -mm] mm, vmalloc: remove VM_VPAGES
  2015-11-19  0:30 [patch -mm] mm, vmalloc: remove VM_VPAGES David Rientjes
  2015-11-19  0:39 ` kbuild test robot
@ 2015-11-19  0:40 ` kbuild test robot
  1 sibling, 0 replies; 9+ messages in thread
From: kbuild test robot @ 2015-11-19  0:40 UTC (permalink / raw)
  To: David Rientjes
  Cc: kbuild-all, Andrew Morton, Tetsuo Handa, linux-mm, linux-kernel

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

Hi David,

[auto build test WARNING on: next-20151118]
[also build test WARNING on: v4.4-rc1]

url:    https://github.com/0day-ci/linux/commits/David-Rientjes/mm-vmalloc-remove-VM_VPAGES/20151119-083326
config: x86_64-randconfig-x015-11181928 (attached as .config)
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All warnings (new ones prefixed by >>):

   In file included from include/linux/linkage.h:4:0,
                    from include/linux/preempt.h:9,
                    from include/linux/spinlock.h:50,
                    from include/linux/vmalloc.h:4,
                    from mm/vmalloc.c:11:
   mm/vmalloc.c: In function '__vunmap':
   mm/vmalloc.c:1484:21: error: 'VM_VPAGES' undeclared (first use in this function)
      if (area->flags & VM_VPAGES)
                        ^
   include/linux/compiler.h:147:28: note: in definition of macro '__trace_if'
     if (__builtin_constant_p((cond)) ? !!(cond) :   \
                               ^
>> mm/vmalloc.c:1484:3: note: in expansion of macro 'if'
      if (area->flags & VM_VPAGES)
      ^
   mm/vmalloc.c:1484:21: note: each undeclared identifier is reported only once for each function it appears in
      if (area->flags & VM_VPAGES)
                        ^
   include/linux/compiler.h:147:28: note: in definition of macro '__trace_if'
     if (__builtin_constant_p((cond)) ? !!(cond) :   \
                               ^
>> mm/vmalloc.c:1484:3: note: in expansion of macro 'if'
      if (area->flags & VM_VPAGES)
      ^

vim +/if +1484 mm/vmalloc.c

^1da177e4 Linus Torvalds    2005-04-16  1468  		return;
^1da177e4 Linus Torvalds    2005-04-16  1469  	}
^1da177e4 Linus Torvalds    2005-04-16  1470  
9a11b49a8 Ingo Molnar       2006-07-03  1471  	debug_check_no_locks_freed(addr, area->size);
3ac7fe5a4 Thomas Gleixner   2008-04-30  1472  	debug_check_no_obj_freed(addr, area->size);
9a11b49a8 Ingo Molnar       2006-07-03  1473  
^1da177e4 Linus Torvalds    2005-04-16  1474  	if (deallocate_pages) {
^1da177e4 Linus Torvalds    2005-04-16  1475  		int i;
^1da177e4 Linus Torvalds    2005-04-16  1476  
^1da177e4 Linus Torvalds    2005-04-16  1477  		for (i = 0; i < area->nr_pages; i++) {
bf53d6f8f Christoph Lameter 2008-02-04  1478  			struct page *page = area->pages[i];
bf53d6f8f Christoph Lameter 2008-02-04  1479  
bf53d6f8f Christoph Lameter 2008-02-04  1480  			BUG_ON(!page);
bf53d6f8f Christoph Lameter 2008-02-04  1481  			__free_page(page);
^1da177e4 Linus Torvalds    2005-04-16  1482  		}
^1da177e4 Linus Torvalds    2005-04-16  1483  
8757d5fa6 Jan Kiszka        2006-07-14 @1484  		if (area->flags & VM_VPAGES)
^1da177e4 Linus Torvalds    2005-04-16  1485  			vfree(area->pages);
^1da177e4 Linus Torvalds    2005-04-16  1486  		else
^1da177e4 Linus Torvalds    2005-04-16  1487  			kfree(area->pages);
^1da177e4 Linus Torvalds    2005-04-16  1488  	}
^1da177e4 Linus Torvalds    2005-04-16  1489  
^1da177e4 Linus Torvalds    2005-04-16  1490  	kfree(area);
^1da177e4 Linus Torvalds    2005-04-16  1491  	return;
^1da177e4 Linus Torvalds    2005-04-16  1492  }

:::::: The code at line 1484 was first introduced by commit
:::::: 8757d5fa6b75e8ea906baf0309d49b980e7f9bc9 [PATCH] mm: fix oom roll-back of __vmalloc_area_node

:::::: TO: Jan Kiszka <jan.kiszka@web.de>
:::::: CC: Linus Torvalds <torvalds@g5.osdl.org>

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

[-- Attachment #2: .config.gz --]
[-- Type: application/octet-stream, Size: 23867 bytes --]

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

* Re: [patch -mm] mm, vmalloc: remove VM_VPAGES
  2015-11-19  0:39 ` kbuild test robot
@ 2015-11-19  1:00   ` David Rientjes
  2015-11-19 11:33     ` [kbuild-all] " Fengguang Wu
  0 siblings, 1 reply; 9+ messages in thread
From: David Rientjes @ 2015-11-19  1:00 UTC (permalink / raw)
  To: kbuild test robot
  Cc: kbuild-all, Andrew Morton, Tetsuo Handa, linux-mm, linux-kernel

On Thu, 19 Nov 2015, kbuild test robot wrote:

> Hi David,
> 
> [auto build test ERROR on: next-20151118]
> [also build test ERROR on: v4.4-rc1]
> 

You need to teach your bot what patches I'm proposing for the -mm tree 
(notice the patch title) instead of your various trees.

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

* Re: [kbuild-all] [patch -mm] mm, vmalloc: remove VM_VPAGES
  2015-11-19  1:00   ` David Rientjes
@ 2015-11-19 11:33     ` Fengguang Wu
  2015-11-19 12:23       ` Tetsuo Handa
  0 siblings, 1 reply; 9+ messages in thread
From: Fengguang Wu @ 2015-11-19 11:33 UTC (permalink / raw)
  To: David Rientjes
  Cc: Tetsuo Handa, linux-mm, Andrew Morton, kbuild-all, linux-kernel

Hi David,

On Wed, Nov 18, 2015 at 05:00:07PM -0800, David Rientjes wrote:
> On Thu, 19 Nov 2015, kbuild test robot wrote:
> 
> > Hi David,
> > 
> > [auto build test ERROR on: next-20151118]
> > [also build test ERROR on: v4.4-rc1]
> > 
> 
> You need to teach your bot what patches I'm proposing for the -mm tree 
> (notice the patch title) instead of your various trees.

Per my understanding linux-next is the -mm tree.
Or do you mean some standalone -mm git tree?

Thanks,
Fengguang

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

* Re: [kbuild-all] [patch -mm] mm, vmalloc: remove VM_VPAGES
  2015-11-19 11:33     ` [kbuild-all] " Fengguang Wu
@ 2015-11-19 12:23       ` Tetsuo Handa
  2015-11-19 12:35         ` Fengguang Wu
  0 siblings, 1 reply; 9+ messages in thread
From: Tetsuo Handa @ 2015-11-19 12:23 UTC (permalink / raw)
  To: lkp, rientjes; +Cc: linux-mm, akpm, kbuild-all, linux-kernel

Fengguang Wu wrote:
> Hi David,
> 
> On Wed, Nov 18, 2015 at 05:00:07PM -0800, David Rientjes wrote:
> > On Thu, 19 Nov 2015, kbuild test robot wrote:
> > 
> > > Hi David,
> > > 
> > > [auto build test ERROR on: next-20151118]
> > > [also build test ERROR on: v4.4-rc1]
> > > 
> > 
> > You need to teach your bot what patches I'm proposing for the -mm tree 
> > (notice the patch title) instead of your various trees.
> 
> Per my understanding linux-next is the -mm tree.
> Or do you mean some standalone -mm git tree?
> 
> Thanks,
> Fengguang
> 

This build error will be gone when
"[PATCH] tree wide: Use kvfree() than conditional kfree()/vfree()"
(currently in -mm tree) is applied.

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

* Re: [kbuild-all] [patch -mm] mm, vmalloc: remove VM_VPAGES
  2015-11-19 12:23       ` Tetsuo Handa
@ 2015-11-19 12:35         ` Fengguang Wu
  2015-11-19 18:37           ` Johannes Weiner
  0 siblings, 1 reply; 9+ messages in thread
From: Fengguang Wu @ 2015-11-19 12:35 UTC (permalink / raw)
  To: Tetsuo Handa
  Cc: rientjes, linux-mm, akpm, kbuild-all, linux-kernel, Johannes Weiner

On Thu, Nov 19, 2015 at 09:23:41PM +0900, Tetsuo Handa wrote:
> Fengguang Wu wrote:
> > Hi David,
> > 
> > On Wed, Nov 18, 2015 at 05:00:07PM -0800, David Rientjes wrote:
> > > On Thu, 19 Nov 2015, kbuild test robot wrote:
> > > 
> > > > Hi David,
> > > > 
> > > > [auto build test ERROR on: next-20151118]
> > > > [also build test ERROR on: v4.4-rc1]
> > > > 
> > > 
> > > You need to teach your bot what patches I'm proposing for the -mm tree 
> > > (notice the patch title) instead of your various trees.
> > 
> > Per my understanding linux-next is the -mm tree.
> > Or do you mean some standalone -mm git tree?
> > 
> > Thanks,
> > Fengguang
> > 
> 
> This build error will be gone when
> "[PATCH] tree wide: Use kvfree() than conditional kfree()/vfree()"
> (currently in -mm tree) is applied.

Got it. I can find that patch in the mmotm tree:

        git://git.cmpxchg.org/linux-mmotm.git

I'll teach the robot to use it instead of linux-next for [-mm] patches.

Thanks,
Fengguang

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

* Re: [kbuild-all] [patch -mm] mm, vmalloc: remove VM_VPAGES
  2015-11-19 12:35         ` Fengguang Wu
@ 2015-11-19 18:37           ` Johannes Weiner
  2015-11-20  1:46             ` Fengguang Wu
  0 siblings, 1 reply; 9+ messages in thread
From: Johannes Weiner @ 2015-11-19 18:37 UTC (permalink / raw)
  To: Fengguang Wu
  Cc: Tetsuo Handa, rientjes, linux-mm, akpm, kbuild-all, linux-kernel

Hi Fengguang,

On Thu, Nov 19, 2015 at 08:35:46PM +0800, Fengguang Wu wrote:
> 
>         git://git.cmpxchg.org/linux-mmotm.git
> 
> I'll teach the robot to use it instead of linux-next for [-mm] patches.

Yup, that seems like a more suitable base.

But you might even consider putting them on top of linux-mmots.git,
which is released more frequently than mmotm. Not sure what other MM
hackers do, but I tend to develop against mmots, and there could be
occasional breakage when dependencies haven't yet trickled into mmotm.

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

* Re: [kbuild-all] [patch -mm] mm, vmalloc: remove VM_VPAGES
  2015-11-19 18:37           ` Johannes Weiner
@ 2015-11-20  1:46             ` Fengguang Wu
  0 siblings, 0 replies; 9+ messages in thread
From: Fengguang Wu @ 2015-11-20  1:46 UTC (permalink / raw)
  To: Johannes Weiner
  Cc: Tetsuo Handa, linux-kernel, linux-mm, kbuild-all, rientjes, akpm

On Thu, Nov 19, 2015 at 01:37:45PM -0500, Johannes Weiner wrote:
> Hi Fengguang,
> 
> On Thu, Nov 19, 2015 at 08:35:46PM +0800, Fengguang Wu wrote:
> > 
> >         git://git.cmpxchg.org/linux-mmotm.git
> > 
> > I'll teach the robot to use it instead of linux-next for [-mm] patches.
> 
> Yup, that seems like a more suitable base.
> 
> But you might even consider putting them on top of linux-mmots.git,

Yes, sure. I'll apply [-mm] LKML patches onto linux-mmots.git.

Thanks,
Fengguang

> which is released more frequently than mmotm. Not sure what other MM
> hackers do, but I tend to develop against mmots, and there could be
> occasional breakage when dependencies haven't yet trickled into mmotm.
> _______________________________________________
> kbuild-all mailing list
> kbuild-all@lists.01.org
> https://lists.01.org/mailman/listinfo/kbuild-all

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

end of thread, other threads:[~2015-11-20  1:49 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-19  0:30 [patch -mm] mm, vmalloc: remove VM_VPAGES David Rientjes
2015-11-19  0:39 ` kbuild test robot
2015-11-19  1:00   ` David Rientjes
2015-11-19 11:33     ` [kbuild-all] " Fengguang Wu
2015-11-19 12:23       ` Tetsuo Handa
2015-11-19 12:35         ` Fengguang Wu
2015-11-19 18:37           ` Johannes Weiner
2015-11-20  1:46             ` Fengguang Wu
2015-11-19  0:40 ` kbuild test robot

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).