On 2/15/22 12:54, Claudio Imbrenda wrote:
On Tue, 15 Feb 2022 12:43:15 +0100
Steffen Eiden <seiden@xxxxxxxxxxxxx> wrote:
On 2/15/22 12:23, Claudio Imbrenda wrote:
On Tue, 15 Feb 2022 12:09:53 +0100
Steffen Eiden <seiden@xxxxxxxxxxxxx> wrote:
[...]
What about using the smp wrapper 'smp_sigp(idx, SIGP_RESTART, 0, NULL)'
here as well?
[...]
With my nits fixed:
maybe I should add a comment explaining why I did not use the smp_
variants.
the reason is that the smp_ variants check the validity of the CPU
index. but in those places, we have already checked (directly or
indirectly) that the index is valid, so I save one useless check.
on the other hand, I don't know if it makes sense to optimize for that,
since it's not a hot path, and one extra check will not kill the
performance.
I would prefer the use of the smp_ variant. The extra assert won't
clutter the output and the code is more consistent.
However, a short comment is also fine for me if you prefer that.
I guess I'll use the smp_ variant and add a few lines in the patch
description to explain that we're doing some extra checks, but the code
is more readable
Reviewed-by: Steffen Eiden <seiden@xxxxxxxxxxxxx>
Doesn't make a difference to me as you use cpu.addr in the sigp_ which
tells me it's a cpu address and not an idx.