[PATCH] arm64: percpu: Make this_cpu accessors pre-empt safe
Mark Rutland
mark.rutland at arm.com
Thu Mar 19 09:23:01 PDT 2015
> > It's a shame there don't seem to be any this_cpu_* self-tests; I've
> > booted a kernel with this applied, but I didn't have anything that
> > exploded without this, so I'd feel uneasy giving a Tested-by.
>
> There is the percpu_test module, I ran this and it appeared to pass.
> Also, I ran the traditional hackbench tests.
I haan't spotted the percpu_test module, but looking at it, it seems to
be effectively useless. The body of the test is:
static int __init percpu_test_init(void)
{
pr_info("percpu test start\n");
preempt_disable();
...
/*
* test each this_cpu operation in turn
*/
...
preempt_enable();
pr_info("percpu test done\n");
return -EAGAIN;
}
Which doesn't stress the this_cpu operations at all, unless you consider
the hard part to be the maths ;)
To test this patch thoroughly we need something that has a few threads
which perform some common use patterns (while getting migrated),
checking that they end up with consistent and the system doesn't lockup
or explode.
Mark.
More information about the linux-arm-kernel
mailing list