Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

oprofile: Remove 'WQ on CPUx, prefer CPUy' warning

Under certain workloads we see the following warnings:

WQ on CPU0, prefer CPU1
WQ on CPU0, prefer CPU2
WQ on CPU0, prefer CPU3

It warns the user that the wq to access a per-cpu buffers runs not on
the same cpu. This happens if the wq is rescheduled on a different cpu
than where the buffer is located. This was probably implemented to
detect performance issues. Not sure if there actually is one as the
buffers are copied to a single buffer anyway which should be the
actual bottleneck.

We wont change WQ implementation. Since a user can do nothing the
warning is pointless. Removing it.

Cc: Andi Kleen <andi@firstfloor.org>
Signed-off-by: Robert Richter <robert.richter@amd.com>

+3 -8
+3 -8
drivers/oprofile/cpu_buffer.c
··· 451 451 { 452 452 struct oprofile_cpu_buffer *b = 453 453 container_of(work, struct oprofile_cpu_buffer, work.work); 454 - if (b->cpu != smp_processor_id()) { 455 - printk(KERN_DEBUG "WQ on CPU%d, prefer CPU%d\n", 456 - smp_processor_id(), b->cpu); 457 - 458 - if (!cpu_online(b->cpu)) { 459 - cancel_delayed_work(&b->work); 460 - return; 461 - } 454 + if (b->cpu != smp_processor_id() && !cpu_online(b->cpu)) { 455 + cancel_delayed_work(&b->work); 456 + return; 462 457 } 463 458 sync_buffer(b->cpu); 464 459