-
Notifications
You must be signed in to change notification settings - Fork 432
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
UCT/GDR_COPY: Optimize memory registration in fast-path #10342
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -75,6 +75,7 @@ nobase_dist_libucs_la_HEADERS = \ | |
type/param.h \ | ||
type/init_once.h \ | ||
type/spinlock.h \ | ||
type/rwlock.h \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can we move "introducing fast rwlock to ucs" to separate PR, including gtest for functionality and performance measurement (print lock overhead using UCS_TEST_MESSAGE + write in the PR desc how fast is new lock compared to glibc) |
||
type/status.h \ | ||
type/thread_mode.h \ | ||
type/cpu_set.h \ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,7 @@ | |
#define UCS_RCACHE_INL_ | ||
|
||
#include "rcache_int.h" | ||
#include <ucs/profile/profile.h> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why needed? |
||
|
||
static UCS_F_ALWAYS_INLINE int | ||
ucs_rcache_region_test(ucs_rcache_region_t *region, int prot, size_t alignment) | ||
|
@@ -80,6 +81,17 @@ ucs_rcache_lookup_unsafe(ucs_rcache_t *rcache, void *address, size_t length, | |
return region; | ||
} | ||
|
||
static UCS_F_ALWAYS_INLINE ucs_rcache_region_t * | ||
ucs_rcache_lookup(ucs_rcache_t *rcache, void *address, size_t length, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can we integrate this optimizations into ucs_rcache_get? |
||
size_t alignment, int prot) | ||
{ | ||
ucs_rcache_region_t *region; | ||
|
||
ucs_rwlock_read_lock(&rcache->pgt_lock); | ||
region = ucs_rcache_lookup_unsafe(rcache, address, length, alignment, prot); | ||
ucs_rwlock_read_unlock(&rcache->pgt_lock); | ||
return region; | ||
} | ||
|
||
static UCS_F_ALWAYS_INLINE void | ||
ucs_rcache_region_put_unsafe(ucs_rcache_t *rcache, ucs_rcache_region_t *region) | ||
|
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.
If we always use one md for mtype, maybe we can avoid ucp_memh as well, just use uct objects?