lkml.org 
[lkml]   [2016]   [Mar]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/2] mm: rename _count, field of the struct page, to _refcount
Hi Joonsoo,

[auto build test WARNING on net/master]
[also build test WARNING on v4.6-rc1 next-20160327]
[if your patch is applied to the wrong git tree, please drop us a note to help improving the system]

url: https://github.com/0day-ci/linux/commits/js1304-gmail-com/mm-page_ref-use-page_ref-helper-instead-of-direct-modification-of-_count/20160328-140113
config: x86_64-randconfig-x019-201613 (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/mm.h:25:0,
from include/linux/suspend.h:8,
from arch/x86/kernel/asm-offsets.c:12:
include/linux/page_ref.h: In function 'page_ref_count':
include/linux/page_ref.h:66:26: error: 'struct page' has no member named '_count'
return atomic_read(&page->_count);
^
include/linux/page_ref.h: In function 'page_count':
include/linux/page_ref.h:71:41: error: 'struct page' has no member named '_count'
return atomic_read(&compound_head(page)->_count);
^
include/linux/page_ref.h: In function 'set_page_count':
include/linux/page_ref.h:76:18: error: 'struct page' has no member named '_count'
atomic_set(&page->_count, v);
^
include/linux/page_ref.h: In function 'page_ref_add':
include/linux/page_ref.h:92:22: error: 'struct page' has no member named '_count'
atomic_add(nr, &page->_count);
^
include/linux/page_ref.h: In function 'page_ref_sub':
include/linux/page_ref.h:99:22: error: 'struct page' has no member named '_count'
atomic_sub(nr, &page->_count);
^
include/linux/page_ref.h: In function 'page_ref_inc':
include/linux/page_ref.h:106:18: error: 'struct page' has no member named '_count'
atomic_inc(&page->_count);
^
include/linux/page_ref.h: In function 'page_ref_dec':
include/linux/page_ref.h:113:18: error: 'struct page' has no member named '_count'
atomic_dec(&page->_count);
^
include/linux/page_ref.h: In function 'page_ref_sub_and_test':
include/linux/page_ref.h:120:41: error: 'struct page' has no member named '_count'
int ret = atomic_sub_and_test(nr, &page->_count);
^
include/linux/page_ref.h: In function 'page_ref_dec_and_test':
include/linux/page_ref.h:129:37: error: 'struct page' has no member named '_count'
int ret = atomic_dec_and_test(&page->_count);
^
In file included from include/linux/atomic.h:4:0,
from include/linux/crypto.h:20,
from arch/x86/kernel/asm-offsets.c:8:
include/linux/page_ref.h: In function 'page_ref_dec_return':
include/linux/page_ref.h:138:35: error: 'struct page' has no member named '_count'
int ret = atomic_dec_return(&page->_count);
^
arch/x86/include/asm/atomic.h:172:53: note: in definition of macro 'atomic_dec_return'
#define atomic_dec_return(v) (atomic_sub_return(1, v))
^
In file included from include/linux/mm.h:25:0,
from include/linux/suspend.h:8,
from arch/x86/kernel/asm-offsets.c:12:
include/linux/page_ref.h: In function 'page_ref_add_unless':
include/linux/page_ref.h:147:35: error: 'struct page' has no member named '_count'
int ret = atomic_add_unless(&page->_count, nr, u);
^
In file included from arch/x86/include/asm/atomic.h:4:0,
from include/linux/atomic.h:4,
from include/linux/crypto.h:20,
from arch/x86/kernel/asm-offsets.c:8:
include/linux/page_ref.h: In function 'page_ref_freeze':
include/linux/page_ref.h:156:39: error: 'struct page' has no member named '_count'
int ret = likely(atomic_cmpxchg(&page->_count, count, 0) == count);
^
include/linux/compiler.h:138:43: note: in definition of macro 'likely'
# define likely(x) (__builtin_constant_p(x) ? !!(x) : __branch_check__(x, 1))
^
include/linux/page_ref.h:156:39: error: 'struct page' has no member named '_count'
int ret = likely(atomic_cmpxchg(&page->_count, count, 0) == count);
^
include/linux/compiler.h:138:51: note: in definition of macro 'likely'
# define likely(x) (__builtin_constant_p(x) ? !!(x) : __branch_check__(x, 1))
^
include/linux/page_ref.h:156:39: error: 'struct page' has no member named '_count'
int ret = likely(atomic_cmpxchg(&page->_count, count, 0) == count);
^
include/linux/compiler.h:114:47: note: in definition of macro 'likely_notrace'
#define likely_notrace(x) __builtin_expect(!!(x), 1)
^
include/linux/compiler.h:138:56: note: in expansion of macro '__branch_check__'
# define likely(x) (__builtin_constant_p(x) ? !!(x) : __branch_check__(x, 1))
^
>> include/linux/page_ref.h:156:12: note: in expansion of macro 'likely'
int ret = likely(atomic_cmpxchg(&page->_count, count, 0) == count);
^
In file included from include/linux/mm.h:25:0,
from include/linux/suspend.h:8,
from arch/x86/kernel/asm-offsets.c:12:
include/linux/page_ref.h: In function 'page_ref_unfreeze':
include/linux/page_ref.h:168:18: error: 'struct page' has no member named '_count'
atomic_set(&page->_count, count);
^
make[2]: *** [arch/x86/kernel/asm-offsets.s] Error 1
make[2]: Target '__build' not remade because of errors.
make[1]: *** [prepare0] Error 2
make[1]: Target 'prepare' not remade because of errors.
make: *** [sub-make] Error 2

vim +/likely +156 include/linux/page_ref.h

95813b8f Joonsoo Kim 2016-03-17 140 if (page_ref_tracepoint_active(__tracepoint_page_ref_mod_and_return))
95813b8f Joonsoo Kim 2016-03-17 141 __page_ref_mod_and_return(page, -1, ret);
95813b8f Joonsoo Kim 2016-03-17 142 return ret;
fe896d18 Joonsoo Kim 2016-03-17 143 }
fe896d18 Joonsoo Kim 2016-03-17 144
fe896d18 Joonsoo Kim 2016-03-17 145 static inline int page_ref_add_unless(struct page *page, int nr, int u)
fe896d18 Joonsoo Kim 2016-03-17 146 {
95813b8f Joonsoo Kim 2016-03-17 147 int ret = atomic_add_unless(&page->_count, nr, u);
95813b8f Joonsoo Kim 2016-03-17 148
95813b8f Joonsoo Kim 2016-03-17 149 if (page_ref_tracepoint_active(__tracepoint_page_ref_mod_unless))
95813b8f Joonsoo Kim 2016-03-17 150 __page_ref_mod_unless(page, nr, ret);
95813b8f Joonsoo Kim 2016-03-17 151 return ret;
fe896d18 Joonsoo Kim 2016-03-17 152 }
fe896d18 Joonsoo Kim 2016-03-17 153
fe896d18 Joonsoo Kim 2016-03-17 154 static inline int page_ref_freeze(struct page *page, int count)
fe896d18 Joonsoo Kim 2016-03-17 155 {
95813b8f Joonsoo Kim 2016-03-17 @156 int ret = likely(atomic_cmpxchg(&page->_count, count, 0) == count);
95813b8f Joonsoo Kim 2016-03-17 157
95813b8f Joonsoo Kim 2016-03-17 158 if (page_ref_tracepoint_active(__tracepoint_page_ref_freeze))
95813b8f Joonsoo Kim 2016-03-17 159 __page_ref_freeze(page, count, ret);
95813b8f Joonsoo Kim 2016-03-17 160 return ret;
fe896d18 Joonsoo Kim 2016-03-17 161 }
fe896d18 Joonsoo Kim 2016-03-17 162
fe896d18 Joonsoo Kim 2016-03-17 163 static inline void page_ref_unfreeze(struct page *page, int count)
fe896d18 Joonsoo Kim 2016-03-17 164 {

:::::: The code at line 156 was first introduced by commit
:::::: 95813b8faa0cd315f61a8b9d9c523792370b693e mm/page_ref: add tracepoint to track down page reference manipulation

:::::: TO: Joonsoo Kim <iamjoonsoo.kim@lge.com>
:::::: CC: Linus Torvalds <torvalds@linux-foundation.org>

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[unhandled content-type:application/octet-stream]
\
 
 \ /
  Last update: 2016-03-28 08:41    [W:0.041 / U:0.888 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site