总是觉得没有整段的时间,有好多主题没有时间整理,最近一直在忙mtddriver的开发和btrfs qgroup的开发工作。
从今天开始,开始利用零碎的时间,尽量每天记录一点点,不需要什么主题,只是简单的记录。
[ 6515.721139] ------------[ cut here ]------------
[ 6515.721564] WARNING: CPU: 0 PID: 3136 at kernel/kthread.c:332 __kthread_bind+0x61/0x70()
[ 6515.722596] Modules linked in: btrfs(OE) ip6t_rpfilter cfg80211 ip6t_REJECT nf_reject_ipv6 nf_conntrack_ipv6 nf_defrag_ipv6 ipt_REJECT nf_reject_ipv4 rfkill nf_conntrack_ipv4 nf_defrag_ipv4 xt_conntrack nf_conntrack ebtable_nat ebtable_broute bridge stp llc ebtable_filter ebtables ip6table_mangle ip6table_security ip6table_raw ip6table_filter ip6_tables iptable_mangle iptable_security iptable_raw iptable_filter ip_tables sg qxl snd_hda_codec_generic snd_hda_intel ext4 snd_hda_controller ttm snd_hda_codec drm_kms_helper snd_hwdep snd_seq drm snd_seq_device xor snd_pcm raid6_pq mbcache jbd2 snd_timer ppdev 8139too snd 8139cp parport_pc pcspkr i2c_piix4 serio_raw soundcore virtio_balloon virtio_console mii parport i2c_core nfsd auth_rpcgss nfs_acl lockd grace sunrpc xfs libcrc32c sd_mod ata_generic
[ 6515.733237] pata_acpi ata_piix virtio_pci libata virtio virtio_ring floppy dm_mirror dm_region_hash dm_log dm_mod [last unloaded: btrfs]
[ 6515.735112] CPU: 0 PID: 3136 Comm: mount Tainted: G OE 3.19.0-rc1+ #55
[ 6515.736172] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
[ 6515.736945] 0000000000000000 0000000071d28679 ffff880065a37bd8 ffffffff816684f4
[ 6515.738061] 0000000000000000 0000000000000000 ffff880065a37c18 ffffffff81076e2a
[ 6515.739138] ffff880065a37c38 ffff880077e72850 0000000000000000 0000000000000004
[ 6515.740237] Call Trace:
[ 6515.740626] [<ffffffff816684f4>] dump_stack+0x45/0x57
[ 6515.741337] [<ffffffff81076e2a>] warn_slowpath_common+0x8a/0xc0
[ 6515.742138] [<ffffffff81076f5a>] warn_slowpath_null+0x1a/0x20
[ 6515.742900] [<ffffffff81095bd1>] __kthread_bind+0x61/0x70
[ 6515.743641] [<ffffffff81095bf3>] kthread_bind+0x13/0x20
[ 6515.744435] [<ffffffffa052edd1>] open_ctree+0x1711/0x21b0 [btrfs]
[ 6515.745238] [<ffffffffa050445e>] btrfs_mount+0x76e/0x900 [btrfs]
[ 6515.746068] [<ffffffff81195fa4>] ? pcpu_alloc+0x364/0x680
[ 6515.746878] [<ffffffff811f1a19>] mount_fs+0x39/0x1b0
[ 6515.747599] [<ffffffff811962f5>] ? __alloc_percpu+0x15/0x20
[ 6515.748357] [<ffffffff8120d76b>] vfs_kern_mount+0x6b/0x110
[ 6515.749100] [<ffffffff8121055c>] do_mount+0x22c/0xb60
[ 6515.749778] [<ffffffff811910a6>] ? memdup_user+0x46/0x80
[ 6515.750543] [<ffffffff812111d2>] SyS_mount+0xa2/0x110
[ 6515.751273] [<ffffffff816701a9>] system_call_fastpath+0x12/0x17
[ 6515.752215] ---[ end trace 89e57395ce5cd9f0 ]---
这个问题一般发生在process已经running,然后想bind在cpu上面。 今天发生的情况是kthread_run() 然后 kthread_bind(). 修改方法很简单:
(1) kthread_create()
(2) kthread_bind()
(3) wake_up_process();