Re: [PATCH] printk: use this_cpu_{read|write} api onprintk_pending

From: Christoph Lameter
Date: Fri Nov 26 2010 - 12:11:30 EST


On Fri, 26 Nov 2010, Eric Dumazet wrote:

> I guess you read the changelog too fast ;)

No I only read the code.... ;-)

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

Ok.

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

Ok.

> 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
> tests.

I thought sanity tests do not apply for performance testing scenarios?

smp_processor_id() is usually a simple per cpu data access and very fast.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/