Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760220Ab3CZTcT (ORCPT ); Tue, 26 Mar 2013 15:32:19 -0400 Received: from mail-ob0-f170.google.com ([209.85.214.170]:61094 "EHLO mail-ob0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756325Ab3CZTcQ (ORCPT ); Tue, 26 Mar 2013 15:32:16 -0400 MIME-Version: 1.0 In-Reply-To: <20130326152059.GA1698@jshin-Toonie> References: <0823a96fea2d8284b7d83cee390dd5973fdaaa94.1362381470.git.viresh.kumar@linaro.org> <2565053.YP0dCLmaW9@vostro.rjw.lan> <20130326152059.GA1698@jshin-Toonie> Date: Wed, 27 Mar 2013 01:02:15 +0530 Message-ID: Subject: Re: [PATCH V3 2/4] cpufreq: governor: Implement per policy instances of governors From: Viresh Kumar To: Jacob Shin Cc: "Rafael J. Wysocki" , cpufreq@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linaro-kernel@lists.linaro.org, robin.randhawa@arm.com, Steve.Bannister@arm.com, Liviu.Dudau@arm.com, charles.garcia-tobin@arm.com, Arvind Chauhan Content-Type: multipart/mixed; boundary=e89a8fb2017e95638204d8d8fa75 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 16659 Lines: 256 --e89a8fb2017e95638204d8d8fa75 Content-Type: text/plain; charset=ISO-8859-1 On 26 March 2013 20:50, Jacob Shin wrote: > Hi, latest bleeding-edge is spewing this out on boot: > > [ 3.585157] ------------[ cut here ]------------ > [ 3.592227] WARNING: at fs/sysfs/dir.c:536 sysfs_add_one+0xc8/0x100() > [ 3.599521] Hardware name: Dinar > [ 3.606878] sysfs: cannot create duplicate filename '/devices/system/cpu/cpufreq/ondemand' > [ 3.614634] Modules linked in: > [ 3.622382] Pid: 1, comm: swapper/0 Not tainted 3.9.0-rc4+ #7 > [ 3.630305] Call Trace: > [ 3.638251] [] warn_slowpath_common+0x7f/0xc0 > [ 3.646435] [] warn_slowpath_fmt+0x46/0x50 > [ 3.654586] [] ? strlcat+0x60/0x80 > [ 3.662765] [] sysfs_add_one+0xc8/0x100 > [ 3.670977] [] create_dir+0x7c/0xd0 > [ 3.679239] [] sysfs_create_subdir+0x1f/0x30 > [ 3.687601] [] internal_create_group+0x64/0x210 > [ 3.696098] [] sysfs_create_group+0x13/0x20 > [ 3.704700] [] cpufreq_governor_dbs+0x400/0x590 > [ 3.713401] [] od_cpufreq_governor_dbs+0x17/0x20 > [ 3.722191] [] __cpufreq_governor+0x47/0xc0 > [ 3.731071] [] __cpufreq_set_policy+0x19d/0x1b0 > [ 3.739968] [] cpufreq_add_dev_interface+0x259/0x2b0 > [ 3.748960] [] ? acpi_processor_get_performance_info+0x21c/0x452 > [ 3.758099] [] ? cpufreq_update_policy+0x130/0x130 > [ 3.767366] [] cpufreq_add_dev+0x3b0/0x4d0 > [ 3.776659] [] ? cpufreq_gov_dbs_init+0x12/0x12 > [ 3.785985] [] subsys_interface_register+0x89/0xd0 > [ 3.795452] [] cpufreq_register_driver+0x8e/0x180 > [ 3.804919] [] acpi_cpufreq_init+0xf6/0x1f8 > [ 3.814360] [] ? set_trace_device+0x80/0x80 > [ 3.823558] [] do_one_initcall+0x3f/0x170 > [ 3.832476] [] kernel_init_freeable+0x13e/0x1cd > [ 3.841131] [] ? do_early_param+0x86/0x86 > [ 3.849506] [] ? rest_init+0x80/0x80 > [ 3.857557] [] kernel_init+0xe/0xf0 > [ 3.865260] [] ret_from_fork+0x7c/0xb0 > [ 3.872886] [] ? rest_init+0x80/0x80 > [ 3.880456] ---[ end trace 1a5c6247c6d9b0ac ]--- > [ 3.888201] ------------[ cut here ]------------ > > This warning is repeated for number of cpus - 1 times. > > And when I do: > > $ cat /sys/devices/system/cpu/cpufreq/ondemand/up_threshold > > [ 489.103388] BUG: unable to handle kernel NULL pointer dereference at 0000000000000010 > [ 489.112064] IP: [] show_up_threshold+0x1c/0x30 > [ 489.120511] PGD a285e6067 PUD a27085067 PMD 0 > [ 489.128690] Oops: 0000 [#1] SMP > [ 489.136521] Modules linked in: > [ 489.144134] CPU 15 > [ 489.144229] Pid: 1565, comm: cat Tainted: G W 3.9.0-rc4+ #7 AMD Dinar/Dinar > [ 489.159654] RIP: 0010:[] [] show_up_threshold+0x1c/0x30 > [ 489.167864] RSP: 0018:ffff880423859e88 EFLAGS: 00010246 > [ 489.176043] RAX: 0000000000000000 RBX: ffff880a271188c0 RCX: ffffffff81a41810 > [ 489.184372] RDX: 0000000000000000 RSI: ffffffff81e02dae RDI: ffffffff820d7860 > [ 489.184373] RBP: ffff880423859e88 R08: ffffea0028b6df80 R09: 00000000001f05b8 > [ 489.184374] R10: 0000000000001b97 R11: 0000000000000246 R12: ffff880423859f50 > [ 489.184374] R13: 0000000000008000 R14: ffff880a271188a0 R15: ffff8804251aa070 > [ 489.184377] FS: 00007f3278b31700(0000) GS:ffff880a2fcc0000(0000) knlGS:0000000000000000 > [ 489.184378] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 > [ 489.184378] CR2: 0000000000000010 CR3: 0000000a2db82000 CR4: 00000000000407e0 > [ 489.184380] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 > [ 489.184381] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 > [ 489.184382] Process cat (pid: 1565, threadinfo ffff880423858000, task ffff880424805c00) > [ 489.184382] Stack: > [ 489.184389] ffff880423859e98 ffffffff8133814f ffff880423859ef8 ffffffff811fd62a > [ 489.184394] 000000002bf67be2 ffff8808260b7a80 ffffffff81a41810 00000000012c8000 > [ 489.184399] ffff880423859ef8 0000000000008000 00000000012c8000 ffff880423859f50 > [ 489.184400] Call Trace: > [ 489.184406] [] kobj_attr_show+0xf/0x30 > [ 489.184411] [] sysfs_read_file+0xaa/0x190 > [ 489.184415] [] vfs_read+0xb0/0x180 > [ 489.184418] [] sys_read+0x52/0xa0 > [ 489.184422] [] ? do_page_fault+0xe/0x10 > [ 489.184426] [] system_call_fastpath+0x16/0x1b > [ 489.184441] Code: 52 08 e8 78 2c c8 ff 5d 48 98 c3 0f 1f 40 00 66 66 66 66 90 55 48 8b 57 70 48 89 f0 48 89 c7 48 c7 c6 ae 2d e0 81 31 c0 48 89 e5 <48> 8b 52 10 8b 52 0c e8 48 2c c8 ff 5d 48 98 c3 0f 1f 40 00 66 > [ 489.184443] RIP [] show_up_threshold+0x1c/0x30 > [ 489.184443] RSP > [ 489.184444] CR2: 0000000000000010 > [ 489.184507] ---[ end trace 1a5c6247c6d9b0c3 ]--- > > Any ideas? Yes, i believe i have enough idea about it :) There are two kind of systems i know: 1 - Single group of cpus controlled by a single clock line, i.e. only one policy instance at any time 2 - multipolicy systems where we have more than one group of cpus and every group have one clock line. For the second case also there are two cases: 2.1 - support have_multiple_policies (i.e. have separate instance of governor for each policy struct) 2.2 - doesn't support have_multiple_policies The last one (2.2) is broken with my patch and attached is the fix. I have tested it on my Lenovo Thinkpad which is more like 2.2 case. cat of cpufreq/ondemand/** is still broken and i am too tired of fixing it now... Its already midnight here 01:01 AM. -- viresh --e89a8fb2017e95638204d8d8fa75 Content-Type: application/octet-stream; name="0001-fixup-cpufreq-governor-Implement-per-policy-instance.patch" Content-Disposition: attachment; filename="0001-fixup-cpufreq-governor-Implement-per-policy-instance.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_heregcb80 RnJvbSBjOTVjYTU0NDMyNWY0MGY1NTg1OGUwMjUyNmQwYmQ2YTE3NDA0ODBkIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpNZXNzYWdlLUlkOiA8Yzk1Y2E1NDQzMjVmNDBmNTU4NThlMDI1MjZkMGJk NmExNzQwNDgwZC4xMzY0MzIyNTg3LmdpdC52aXJlc2gua3VtYXJAbGluYXJvLm9yZz4KRnJvbTog VmlyZXNoIEt1bWFyIDx2aXJlc2gua3VtYXJAbGluYXJvLm9yZz4KRGF0ZTogVHVlLCAyNiBNYXIg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GNwdWZyZXFfc2NhbGUodW5zaWduZWQgbG9uZyBvbGQsIHVf aW50IGRpdiwgdV9pbnQgbXUKIAogc3RydWN0IGNwdWZyZXFfZ292ZXJub3IgewogCWNoYXIJbmFt ZVtDUFVGUkVRX05BTUVfTEVOXTsKKwlpbnQJaW5pdGlhbGl6ZWQ7CiAJaW50CSgqZ292ZXJub3Ip CShzdHJ1Y3QgY3B1ZnJlcV9wb2xpY3kgKnBvbGljeSwKIAkJCQkgdW5zaWduZWQgaW50IGV2ZW50 KTsKIAlzc2l6ZV90CSgqc2hvd19zZXRzcGVlZCkJKHN0cnVjdCBjcHVmcmVxX3BvbGljeSAqcG9s aWN5LApAQCAtMzIzLDYgKzMyNCw3IEBAIGNvbnN0IGNoYXIgKmNwdWZyZXFfZ2V0X2N1cnJlbnRf ZHJpdmVyKHZvaWQpOwogaW50IGNwdWZyZXFfZ2V0X3BvbGljeShzdHJ1Y3QgY3B1ZnJlcV9wb2xp Y3kgKnBvbGljeSwgdW5zaWduZWQgaW50IGNwdSk7CiBpbnQgY3B1ZnJlcV91cGRhdGVfcG9saWN5 KHVuc2lnbmVkIGludCBjcHUpOwogc3RydWN0IGtvYmplY3QgKmdldF9nb3Zlcm5vcl9wYXJlbnRf a29iaihzdHJ1Y3QgY3B1ZnJlcV9wb2xpY3kgKnBvbGljeSk7Citib29sIGhhdmVfbXVsdGlwbGVf cG9saWNpZXModm9pZCk7CiAKICNpZmRlZiBDT05GSUdfQ1BVX0ZSRVEKIC8qIHF1ZXJ5IHRoZSBj dXJyZW50IENQVSBmcmVxdWVuY3kgKGluIGtIeikuIElmIHplcm8sIGNwdWZyZXEgY291bGRuJ3Qg ZGV0ZWN0IGl0ICovCi0tIAoxLjcuMTIucmMyLjE4Lmc2MWI0NzJlCgo= --e89a8fb2017e95638204d8d8fa75-- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/