FYI, we noticed the following changes on: Test Machine: vm-vp-quantal-x86_64: 2 threads qemu-system-x86_64 -enable-kvm with 360M memory https://github.com/0day-ci/linux Sebastian-Andrzej-Siewior/sched-cputime-drop-local_irq_safe-in-vtime_init_idle/20160414-203149 commit 060625d7e43e8c438380465f1958aff4403b029c ("sched/cputime: drop local_irq_safe() in vtime_init_idle()") As below, the log "INFO: inconsistent lock state" showed with your commit. [ 0.731375] [ INFO: inconsistent lock state ] [ 0.733044] 4.6.0-rc1-00028-g060625d #1 Not tainted [ 0.734905] --------------------------------- [ 0.736578] inconsistent {IN-HARDIRQ-W} -> {HARDIRQ-ON-W} usage. [ 0.738623] swapper/0/1 [HC0[0]:SC0[0]:HE1:SE1] takes: [ 0.740473] (&p->vtime_seqcount){?.....}, at: [] init_idle+0x1a3/0x1cf [ 0.743961] {IN-HARDIRQ-W} state was registered at: [ 0.745761] [] __lock_acquire+0xa22/0x1b1c [ 0.747847] [] lock_acquire+0x8a/0xb3 [ 0.749883] [] vtime_gen_account_irq_exit+0x31/0x7c [ 0.752233] [] irq_exit+0x10c/0x111 [ 0.754194] [] do_IRQ+0xe4/0xfc [ 0.756062] [] ret_from_intr+0x0/0x20 [ 0.758068] [] apic_bsp_setup+0x8c/0x94 [ 0.760114] [] native_smp_prepare_cpus+0x2d1/0x341 [ 0.762375] [] kernel_init_freeable+0x58/0x1b6 [ 0.764550] [] kernel_init+0x9/0xf0 [ 0.766503] [] ret_from_fork+0x22/0x50 [ 0.768571] irq event stamp: 2063 [ 0.769995] hardirqs last enabled at (2063): [] _raw_spin_unlock_irqrestore+0x42/0x58 [ 0.773506] hardirqs last disabled at (2062): [] _raw_spin_lock_irqsave+0x20/0x56 [ 0.776932] softirqs last enabled at (1368): [] __do_softirq+0x1e0/0x24b [ 0.780181] softirqs last disabled at (1363): [] irq_exit+0x65/0x111 [ 0.783333] [ 0.783333] other info that might help us debug this: [ 0.786101] Possible unsafe locking scenario: [ 0.786101] [ 0.788709] CPU0 [ 0.789939] ---- [ 0.791165] lock(&p->vtime_seqcount); [ 0.792897] [ 0.794163] lock(&p->vtime_seqcount); [ 0.795915] [ 0.795915] *** DEADLOCK *** [ 0.795915] [ 0.799093] no locks held by swapper/0/1. [ 0.800680] [ 0.800680] stack backtrace: [ 0.802986] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.6.0-rc1-00028-g060625d #1 [ 0.805953] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Debian-1.8.2-1 04/01/2014 [ 0.809240] 0000000000000000 ffff8800140f7c78 ffffffff8139d0c3 ffffffff824d8e90 [ 0.812556] ffff8800140f0000 ffff8800140f7cb0 ffffffff8112f137 0000000000000002 [ 0.815861] ffff8800140f07d8 ffff8800140f0000 ffffffff810d3e89 0000000000000002 [ 0.819170] Call Trace: [ 0.820445] [] dump_stack+0x85/0xbe [ 0.822298] [] print_usage_bug+0x259/0x268 [ 0.824454] [] ? print_shortest_lock_dependencies+0x180/0x180 [ 0.827399] [] mark_lock+0x381/0x5a7 [ 0.829275] [] __lock_acquire+0xa89/0x1b1c [ 0.831273] [] ? init_idle+0x1a3/0x1cf [ 0.833191] [] ? init_idle_bootup_task+0xe/0xe [ 0.835254] [] ? rcu_sync_lockdep_assert+0x27/0x4d [ 0.837442] [] ? update_fast_ctr+0x19/0x36 [ 0.839433] [] lock_acquire+0x8a/0xb3 [ 0.841325] [] ? lock_acquire+0x8a/0xb3 [ 0.843255] [] ? init_idle+0x1a3/0x1cf [ 0.845171] [] vtime_init_idle+0x31/0x6a [ 0.847118] [] ? init_idle+0x1a3/0x1cf [ 0.849026] [] init_idle+0x1a3/0x1cf [ 0.850892] [] fork_idle+0x9e/0xa8 [ 0.852731] [] idle_threads_init+0x8d/0xc5 [ 0.854755] [] smp_init+0xf/0xd6 [ 0.856556] [] kernel_init_freeable+0x80/0x1b6 [ 0.858618] [] kernel_init+0x9/0xf0 [ 0.860474] [] ret_from_fork+0x22/0x50 [ 0.862354] [] ? rest_init+0x136/0x136 [ 0.865101] x86: Booting SMP configuration: [ 0.866753] .... node #0, CPUs: #1 [ 0.890155] kvm-clock: cpu 1, msr 0:1499d041, secondary cpu clock FYI, raw QEMU command line is: qemu-system-x86_64 -enable-kvm -kernel /pkg/linux/x86_64-randconfig-s2-04150337/gcc-5/060625d7e43e8c438380465f1958aff4403b029c/vmlinuz-4.6.0-rc1-00028-g060625d -append 'root=/dev/ram0 user=lkp job=/lkp/scheduled/vm-vp-quantal-x86_64-24/bisect_boot-1-quantal-core-x86_64.cgz-x86_64-randconfig-s2-04150337-060625d7e43e8c438380465f1958aff4403b029c-20160415-120614-172jrut-0.yaml ARCH=x86_64 kconfig=x86_64-randconfig-s2-04150337 branch=linux-devel/devel-spot-201604150319 commit=060625d7e43e8c438380465f1958aff4403b029c BOOT_IMAGE=/pkg/linux/x86_64-randconfig-s2-04150337/gcc-5/060625d7e43e8c438380465f1958aff4403b029c/vmlinuz-4.6.0-rc1-00028-g060625d max_uptime=600 RESULT_ROOT=/result/boot/1/vm-vp-quantal-x86_64/quantal-core-x86_64.cgz/x86_64-randconfig-s2-04150337/gcc-5/060625d7e43e8c438380465f1958aff4403b029c/0 LKP_SERVER=inn earlyprintk=ttyS0,115200 systemd.log_level=err debug apic=debug sysrq_always_enabled rcupdate.rcu_cpu_stall_timeout=100 panic=-1 softlockup_panic=1 nmi_watchdog=panic oops=panic load_ramdisk=2 prompt_ramdisk=0 console=ttyS0,115200 console=tty0 vga=normal rw ip=::::vm-vp-quantal-x86_64-24::dhcp drbd.minor_count=8' -initrd /fs/sdc1/initrd-vm-vp-quantal-x86_64-24 -m 360 -smp 2 -device e1000,netdev=net0 -netdev user,id=net0 -boot order=nc -no-reboot -watchdog i6300esb -rtc base=localtime -pidfile /dev/shm/kboot/pid-vm-vp-quantal-x86_64-24 -serial file:/dev/shm/kboot/serial-vm-vp-quantal-x86_64-24 -daemonize -display none -monitor null Thanks, Xiaolong Ye