-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
cds_list_for_each_entry_rcu should use RCU_READ_LOCK_this (that already uses 'this' instead of calling 'THIS') #1619
Comments
I have checked compiler does not optimize it. With current macro After changed the macro I will send a patch to handle it. |
Thank you for your contributions. |
unstale - looks like an easy fix to me. |
Thank you for your contributions. |
Closing this issue as there was no update since my last update on issue. If this is an issue which is still valid, feel free to open it. |
It seems like in most, if not all cases, the list used is from this->private->... (peers for example). This is always done via something like:
So why call 'THIS' again in the RCU_READ_LOCK (twice actually)?
(same for the unlock of course)
A simple change to add something like:
And the same to the RCU_READ_UNLOCK, should reduce some calls to 'THIS'.
Unsure if the compiler takes care of these redundant calls.
The text was updated successfully, but these errors were encountered: