[rcu:rcu/next 34/34] fs/file.c:407:6: note: in expansion of macro 'cond_resched_rcu_qs'

From: kbuild test robot
Date: Tue Nov 29 2016 - 15:11:09 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git rcu/next
head: ccc0666e2049e5818c236e647cf20c552a7b053b
commit: ccc0666e2049e5818c236e647cf20c552a7b053b [34/34] rcu: Allow boot-time use of cond_resched_rcu_qs()
config: i386-alldefconfig (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
git checkout ccc0666e2049e5818c236e647cf20c552a7b053b
# save the attached .config to linux build tree
make ARCH=i386

All warnings (new ones prefixed by >>):

In file included from include/linux/sem.h:5:0,
from include/linux/syscalls.h:76,
from fs/file.c:9:
fs/file.c: In function 'close_files':
include/linux/rcupdate.h:426:6: error: 'rcu_scheduler_active' undeclared (first use in this function)
if (rcu_scheduler_active && !cond_resched()) \
^
>> fs/file.c:407:6: note: in expansion of macro 'cond_resched_rcu_qs'
cond_resched_rcu_qs();
^~~~~~~~~~~~~~~~~~~
include/linux/rcupdate.h:426:6: note: each undeclared identifier is reported only once for each function it appears in
if (rcu_scheduler_active && !cond_resched()) \
^
>> fs/file.c:407:6: note: in expansion of macro 'cond_resched_rcu_qs'
cond_resched_rcu_qs();
^~~~~~~~~~~~~~~~~~~
--
In file included from include/linux/srcu.h:33:0,
from include/linux/notifier.h:15,
from include/linux/memory_hotplug.h:6,
from include/linux/mmzone.h:777,
from include/linux/gfp.h:5,
from include/linux/irq.h:17,
from arch/x86/include/asm/hardirq.h:5,
from include/linux/hardirq.h:8,
from include/linux/interrupt.h:12,
from include/linux/kernel_stat.h:8,
from kernel/softirq.c:14:
kernel/softirq.c: In function 'run_ksoftirqd':
include/linux/rcupdate.h:426:6: error: 'rcu_scheduler_active' undeclared (first use in this function)
if (rcu_scheduler_active && !cond_resched()) \
^
>> kernel/softirq.c:678:3: note: in expansion of macro 'cond_resched_rcu_qs'
cond_resched_rcu_qs();
^~~~~~~~~~~~~~~~~~~
include/linux/rcupdate.h:426:6: note: each undeclared identifier is reported only once for each function it appears in
if (rcu_scheduler_active && !cond_resched()) \
^
>> kernel/softirq.c:678:3: note: in expansion of macro 'cond_resched_rcu_qs'
cond_resched_rcu_qs();
^~~~~~~~~~~~~~~~~~~
--
In file included from include/linux/rbtree.h:34:0,
from include/linux/sched.h:22,
from kernel/workqueue.c:29:
kernel/workqueue.c: In function 'process_one_work':
include/linux/rcupdate.h:426:6: error: 'rcu_scheduler_active' undeclared (first use in this function)
if (rcu_scheduler_active && !cond_resched()) \
^
>> kernel/workqueue.c:2122:2: note: in expansion of macro 'cond_resched_rcu_qs'
cond_resched_rcu_qs();
^~~~~~~~~~~~~~~~~~~
include/linux/rcupdate.h:426:6: note: each undeclared identifier is reported only once for each function it appears in
if (rcu_scheduler_active && !cond_resched()) \
^
>> kernel/workqueue.c:2122:2: note: in expansion of macro 'cond_resched_rcu_qs'
cond_resched_rcu_qs();
^~~~~~~~~~~~~~~~~~~
--
In file included from include/linux/srcu.h:33:0,
from include/linux/notifier.h:15,
from include/linux/memory_hotplug.h:6,
from include/linux/mmzone.h:777,
from include/linux/gfp.h:5,
from include/linux/mm.h:9,
from include/linux/mman.h:4,
from mm/mlock.c:9:
mm/mlock.c: In function 'apply_mlockall_flags':
include/linux/rcupdate.h:426:6: error: 'rcu_scheduler_active' undeclared (first use in this function)
if (rcu_scheduler_active && !cond_resched()) \
^
>> mm/mlock.c:782:3: note: in expansion of macro 'cond_resched_rcu_qs'
cond_resched_rcu_qs();
^~~~~~~~~~~~~~~~~~~
include/linux/rcupdate.h:426:6: note: each undeclared identifier is reported only once for each function it appears in
if (rcu_scheduler_active && !cond_resched()) \
^
>> mm/mlock.c:782:3: note: in expansion of macro 'cond_resched_rcu_qs'
cond_resched_rcu_qs();
^~~~~~~~~~~~~~~~~~~

vim +/cond_resched_rcu_qs +407 fs/file.c

ce08b62d Oleg Nesterov 2014-01-11 391 * files structure.
7cf4dc3c Al Viro 2012-08-15 392 */
ce08b62d Oleg Nesterov 2014-01-11 393 struct fdtable *fdt = rcu_dereference_raw(files->fdt);
9b80a184 Alexey Dobriyan 2016-09-02 394 unsigned int i, j = 0;
ce08b62d Oleg Nesterov 2014-01-11 395
7cf4dc3c Al Viro 2012-08-15 396 for (;;) {
7cf4dc3c Al Viro 2012-08-15 397 unsigned long set;
7cf4dc3c Al Viro 2012-08-15 398 i = j * BITS_PER_LONG;
7cf4dc3c Al Viro 2012-08-15 399 if (i >= fdt->max_fds)
7cf4dc3c Al Viro 2012-08-15 400 break;
7cf4dc3c Al Viro 2012-08-15 401 set = fdt->open_fds[j++];
7cf4dc3c Al Viro 2012-08-15 402 while (set) {
7cf4dc3c Al Viro 2012-08-15 403 if (set & 1) {
7cf4dc3c Al Viro 2012-08-15 404 struct file * file = xchg(&fdt->fd[i], NULL);
7cf4dc3c Al Viro 2012-08-15 405 if (file) {
7cf4dc3c Al Viro 2012-08-15 406 filp_close(file, files);
bde6c3aa Paul E. McKenney 2014-07-01 @407 cond_resched_rcu_qs();
7cf4dc3c Al Viro 2012-08-15 408 }
7cf4dc3c Al Viro 2012-08-15 409 }
7cf4dc3c Al Viro 2012-08-15 410 i++;
7cf4dc3c Al Viro 2012-08-15 411 set >>= 1;
7cf4dc3c Al Viro 2012-08-15 412 }
7cf4dc3c Al Viro 2012-08-15 413 }
ce08b62d Oleg Nesterov 2014-01-11 414
ce08b62d Oleg Nesterov 2014-01-11 415 return fdt;

:::::: The code at line 407 was first introduced by commit
:::::: bde6c3aa993066acb0d6ce32ecabe03b9d5df92d rcu: Provide cond_resched_rcu_qs() to force quiescent states in long loops

:::::: TO: Paul E. McKenney <paulmck@xxxxxxxxxxxxxxxxxx>
:::::: CC: Paul E. McKenney <paulmck@xxxxxxxxxxxxxxxxxx>

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

Attachment: .config.gz
Description: application/gzip