History

scftorture: Add debug output for wrong-CPU warning

This commit adds the desired CPU, the actual CPU, and nr_cpu_ids to the wrong-CPU warning in scftorture_invoker(), the better to help with debugging.

Paul E. McKenney committed 6 years ago

Commit f3ea9781 parent 00504531 file · +5 −1Browse files

Showing the changes to kernel (1 of 1 file). Show all

Unified · Split

kernel/scftorture.c+5−1
@@ -398,6 +398,7 @@ static void scftorture_invoke_one(struct scf_statistics *scfp, struct torture_ra · 397 unmodified lines
398static int scftorture_invoker(void *arg)398static int scftorture_invoker(void *arg)
399{399{
400 int cpu;400 int cpu;
401 int curcpu;
401 DEFINE_TORTURE_RANDOM(rand);402 DEFINE_TORTURE_RANDOM(rand);
402 struct scf_statistics *scfp = (struct scf_statistics *)arg;403 struct scf_statistics *scfp = (struct scf_statistics *)arg;
403 bool was_offline = false;404 bool was_offline = false;
@@ -412,7 +413,10 @@ static int scftorture_invoker(void *arg) · 8 unmodified lines
412 VERBOSE_SCFTORTOUT("scftorture_invoker %d: Waiting for all SCF torturers from cpu %d", scfp->cpu, smp_processor_id());413 VERBOSE_SCFTORTOUT("scftorture_invoker %d: Waiting for all SCF torturers from cpu %d", scfp->cpu, smp_processor_id());
413 414
414 // Make sure that the CPU is affinitized appropriately during testing.415 // Make sure that the CPU is affinitized appropriately during testing.
415 WARN_ON_ONCE(smp_processor_id() != scfp->cpu);416 curcpu = smp_processor_id();
417 WARN_ONCE(curcpu != scfp->cpu % nr_cpu_ids,
418 "%s: Wanted CPU %d, running on %d, nr_cpu_ids = %d\n",
419 __func__, scfp->cpu, curcpu, nr_cpu_ids);
416 420
417 if (!atomic_dec_return(&n_started))421 if (!atomic_dec_return(&n_started))
418 while (atomic_read_acquire(&n_started)) {422 while (atomic_read_acquire(&n_started)) {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t