Skip to content
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

prov/lnx: Convert peer table to use buffer pools #10597

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

amirshehataornl
Copy link
Contributor

Convert peer table to use buffer pools in order to utilize the built-in capabilities of expanding the table as more peers are added dynamically.

The peer table is protected by a read/write lock. Locking/unlocking callbacks are set only if needed.

Convert peer table to use buffer pools in order to utilize the built-in
capabilities of expanding the table as more peers are added dynamically.

The peer table is protected by a read/write lock. Locking/unlocking
callbacks are set only if needed.

Signed-off-by: Amir Shehata <[email protected]>
Comment on lines +205 to +207
void (*lpt_rlock)(pthread_rwlock_t *l);
void (*lpt_wlock)(pthread_rwlock_t *l);
void (*lpt_unlock)(pthread_rwlock_t *l);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the fine tuning of the locks here is unnecessary and we can just use the lock in the util_av (which we can turn into a mutex to optimize out). If an application is interested in performant threading, then they should be using separate domains (and thus AVs) for their threads.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants