-
Notifications
You must be signed in to change notification settings - Fork 641
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rework IPI handling #685
rework IPI handling #685
Conversation
if (isBlocking) { | ||
while (mask) { | ||
unsigned int index = wordBits - 1 - clzl(mask); | ||
mask &= ~BIT(index); | ||
big_kernel_lock.node_owners[index].ipi = 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this supposed to be 0, ie. should the be an assert here?
256ade6
to
2379b4c
Compare
fc2d559
to
7f14cda
Compare
7eb3da8
to
0b8154b
Compare
What is the motivation for these changes? If this is RISC-V specific, then it may be better to only modify the behavior for RISC-V by changing it's implementation of |
This comes from trying to understand what is actually happening on RISC-V and why - and concluding this goes through some forth-and-back translation that are not necessary. The current generic way seems to enforce too much given what architectures are doing in the end. Seem this started at x86, then the parm ARM tried to cope with this and now RISC-V struggles also. |
That said, changing this code will have subtle effects on system behavior as it would change the timing of how IPIs are sent and received and so any changes really need to be motivated by some sort of demonstration that the existing implementation is insufficient. |
I tend to second this. If we want to optimise the RISCV case, it can be done in a specialised ipi_send_target for RISCV. Could you list the scenarios that multiple IPI targets are required? Also, for GICv3, the function already groups IPI targets by AFFI1. |
c9155cc
to
90b40dc
Compare
0206ab9
to
f81f941
Compare
e8ab0f5
to
02a5cf5
Compare
603dc41
to
a743106
Compare
2ea8669
to
cae41a5
Compare
573a356
to
7202466
Compare
e9d8ffc
to
0d9505d
Compare
0d9505d
to
4437ef6
Compare
Stick to the logic core view in the generic code and resolve the mask at the lowest layer instead. Signed-off-by: Axel Heider <axelheider@gmx.de>
4437ef6
to
49b3bc3
Compare
Perhaps good to clarify why I'm closing this: Draft stage is fine for when something is not ready to be merged yet because it still needs some work. But the reason to have it as a pull request is to solicit feedback from others. You got that, but haven't made a strong argument why this should be merged, considering it's not necessary, for almost two years. To be clear, I fully support reworking the IPI code and think the current code is terrible. That said, I don't think your commit goes far enough. E.g. |
Closing is fine, with #1135 we have a new driver for this now that adds another good argument for having an |
Stick to the logic core view in the generic code and resolve the mask at the lowest layer instead. That avoids translating forth an back from a logical core ID to an ID that is just another artificial ID on some architectures. Using the logical core ID as much as possible seem the most simple approach.
This also allows supporting the feature that a target mask can be used down to the lowest level. Just there is's finally decided to implement this.