Messages in this thread | | | Date | Mon, 15 Apr 2013 21:29:14 -0700 | From | Andrew Morton <> | Subject | Re: [PATCH] NMI: fix NMI period is not correct when cpu frequency changes issue. |
| |
On Tue, 16 Apr 2013 03:45:15 +0000 "Pan, Zhenjie" <zhenjie.pan@intel.com> wrote:
> > Overall the patch looks desirable, but it increases the kernel size by several > > hundred bytes when CONFIG_CPU_FREQ=n. It should produce no code in > > this case! Take a look at the magic in register_hotcpu_notifier(), the way in > > which it causes all the code to be removed by the compiler in the > > CONFIG_HOTPLUG_CPU=n case. That trick can be used here. > > I have checked if CONFIG_CPU_FREQ=n, cpufreq_register_notifier() will be a blank function. > So I think it will not increases the kernel size.
I tested it. The patch adds ~350 bytes of dead code.
This is partly an infrastructural problem: unlike register_hotcpu_notifier(), the cpufreq notifier code lacks the infrastructure with which we can prevent this problem.
| |