mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [BUG] events process running on wrong cpu
@ 2009-09-21  8:51 Heiko Carstens
  2009-09-21  9:02 ` Peter Zijlstra
  2009-09-21  9:06 ` [PATCH] Always show Cpus_allowed field in /proc/<pid>/status Heiko Carstens
  0 siblings, 2 replies; 8+ messages in thread
From: Heiko Carstens @ 2009-09-21  8:51 UTC (permalink / raw)
  To: Ingo Molnar, Andrew Morton, Oleg Nesterov, Peter Zijlstra; +Cc: linux-kernel

Hi,

with todays git from time to time I get this (s390 defconfig):


BUG: using smp_processor_id() in preemptible [00000000] code: events/1/16
caller is vmstat_update+0x28/0x74
CPU: 0 Not tainted 2.6.31-06618-gebc79c4-dirty #3
Process events/1 (pid: 16, task: 000000003fcbea00, ksp: 000000003fcd7cd8)
000000003fcd7da8 000000003fcd7d28 0000000000000002 0000000000000000 
       000000003fcd7dc8 000000003fcd7d40 000000003fcd7d40 00000000003fe46a 
       000000000001ffff 000000003fcd7e70 000000000192b128 ffffffffffffc000 
       000000000000000d 000000000000000c 000000003fcd7d90 0000000000000000 
       0000000000000000 0000000000016bda 000000003fcd7d28 000000003fcd7d68 
Call Trace:
([<0000000000016aea>] show_trace+0xe6/0x134)
 [<0000000000202a5e>] debug_smp_processor_id+0x112/0x12c
 [<00000000000b302c>] vmstat_update+0x28/0x74
 [<000000000005fb9a>] worker_thread+0x19a/0x27c
 [<0000000000065f80>] kthread+0xa0/0xa8
 [<000000000001b786>] kernel_thread_starter+0x6/0xc
 [<000000000001b780>] kernel_thread_starter+0x0/0xc

Please note that events/1 is running in cpu 0 (!).

But (with a patched procfs output):

[root@h4245004 ~]# cat /proc/16/status 
Name:   events/1
State:  S (sleeping)
Tgid:   16
Pid:    16
PPid:   2
TracerPid:      0
Uid:    0       0       0       0
Gid:    0       0       0       0
FDSize: 64
Groups:
Threads:        1
SigQ:   0/4096
SigPnd: 0000000000000000
ShdPnd: 0000000000000000
SigBlk: 0000000000000000
SigIgn: ffffffffffffffff
SigCgt: 0000000000000000
CapInh: 0000000000000000
CapPrm: ffffffffffffffff
CapEff: fffffffffffffeff
CapBnd: fffffffffffffeff
Cpus_allowed:   00000002  <----------
Cpus_allowed_list:      1 <----------
task: 000000003fcbea00, ksp: 000000003fcd7cd8
User PSW : 0704000180000000 000000000001b780
User GPRS: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
           0000000000000000 0000000000000000 0000000000000000 0000000000000000
           0000000000000000 0000000000065ee0 000000003fe73cf8 000000000004d414
           0000000000000000 0000000000000000 0000000000000000 000000003fcd7eb8
User ACRS: 00000000 00000000 00000000 00000000
           00000000 00000000 00000000 00000000
           00000000 00000000 00000000 00000000
           00000000 00000000 00000000 00000000
voluntary_ctxt_switches:        55
nonvoluntary_ctxt_switches:     1

So the cpus_allowed mask is correct (later on at least). Looks like the
created kthread ran before its cpus_allowed mask was set.
Looking at the code this shouldn't happen. But still...

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

end of thread, other threads:[~2009-09-21 22:33 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-21  8:51 [BUG] events process running on wrong cpu Heiko Carstens
2009-09-21  9:02 ` Peter Zijlstra
2009-09-21  9:03   ` Ingo Molnar
2009-09-21  9:08     ` Heiko Carstens
2009-09-21  9:06 ` [PATCH] Always show Cpus_allowed field in /proc/<pid>/status Heiko Carstens
2009-09-21  9:17   ` Heiko Carstens
2009-09-21 22:33     ` Paul Menage
2009-09-21 12:52   ` [tip:sched/core] sched: " tip-bot for Heiko Carstens

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome