[lkml]   [2010]   [Nov]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] printk: use this_cpu_{read|write} api on printk_pending
Le vendredi 26 novembre 2010 à 10:40 -0600, Christoph Lameter a écrit :

> This only works if printk_needs_cpu is always passed the current cpu. The
> check for cpu_is_offline suggests that the function is also used for other
> cpus. The __this_cpu_read() will then get the printk_pending stat for the
> current cpu and not for the specified cpu.

I guess you read the changelog too fast ;)

I posted this patch after noticing printk_needs_cpu() was always used
for the current cpu.

We have other functions around, that always work for the current cpu.

We pass cpu as a parameter, mostly because smp_processor_id() was a bit
expensive in old kernels, and is still expensive because of sanity

Now we have this_cpu_ api, we probably can do a cleanup to avoid now
useless parameter passing.

If we had this_cpu_is_online() function, we could avoid (int cpu) param
in printk_needs_cpu()

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2010-11-26 18:03    [W:0.130 / U:0.564 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site