-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
reader_concurrency_semaphore: add trace points for important events #13255
Conversation
Depends on #13173. Only the last 4 commits belong to this PR, the rest belongs to the dependency. |
Using this as a platform: We need a way to prune the trace tree, right now a trace can easily generate huge amounts of work. I think we'll need to assign a level to every tracepoint and a way to indicate what level (<= input) we're interested in. They'll also need a name. /cc @vladzcloudius (you may want to review the series) |
@@ -325,6 +325,7 @@ flat_mutation_reader_v2 read_context::create_reader( | |||
if (reader_opt->permit() != permit) { | |||
on_internal_error(mmq_log, "read_context::create_reader(): passed-in permit is different than saved reader's permit"); | |||
} | |||
permit.set_trace_state(trace_state); |
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.
"refreshkeep" in $subject?
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.
I think I must have changed my mind half-way on how to phrase it and borked it. Will fix.
const tracing::trace_state_ptr& trace_state() const noexcept; | ||
|
||
void set_trace_state(tracing::trace_state_ptr trace_ptr) noexcept; | ||
|
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.
What happens if a read starts with one trace, generates a page, then transfers into another page? We'll get mixed traces no?
} | ||
|
||
void set_trace_state(tracing::trace_state_ptr trace_ptr) noexcept { | ||
_trace_ptr = std::move(trace_ptr); |
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.
(continuing from below). What if _trace_ptr is set?
Perhaps we should create a stitching record that says that old_session continues in new_session.
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.
Note that files etc will all have the old session in them, if they captured it.
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.
I'll respond to the page-bridging question here: if I set the trace pointer on the first page and leave it as-is, all reader concurrency semaphore messages will be in the first session. In the example from the cover letter, all messages would be in the tracing session "8cc80d50-c72d-11ed-8427-14e21cc3ed56".
If I refresh the trace pointer on each page, then each message goes into the session of the relevant page. We seems to have one session per page.
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.
Yes, but let's have an event "resuming read from session {}" or something, to create a link between pages (and to note the fact that we have an 1865 hit).
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.
@avikivity each trace_state is defined by a corresponding session_id
value, which in line corresponds to a single CQL query.
A single CQL (read) query is always limited to a single page.
Hence each new page has to have a new trace_state object if traced.
And now the most interesting question is when that "if traced" holds.
When tracing is enabled from the application (will eventually come down to Scylla using a Trace bit) then things are rather straight forward exactly as @denesb shown in the commit message example - every new page will show up as new session object. And I agree with you, it would definitely make sense to create some way to "connect" different pages. And hence what you suggested (create a trace point that would have "old session id -> new session id" info) makes a lot of sense.
However when Tracing is enabled via probabilistic tracing we may trace some pages out of multi-page read sequence and not the others.
In such a case, on the one hand, it would be interesting to trace the whole multi-page sequence. But on the other hand, implementing this would require us to change the current semantics and the implementation of the probabilistic tracing (quite) a bit.
I don't have a strong opinion but from the debugging perspective having the whole multi-page sequence traced if the first page was picked would make a lot of sense.
Doesn't have to be part of this series however - just a thought.
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.
and to note the fact that we have an 1865 hit
We already have a trace point for this:
Reusing querier [shard 0] | 2023-03-20 10:43:17.395614 | 127.0.0.1 | 116 | 127.0.0.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.
Ok, let's add a link to the previous session then.
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.
I was about to say that this requires intrusive changes like saving the session id in the paging state and whatnot... then remembered that in set_trace_state()
I have the old trace state and the new one and I can just use the new one to create a trace point with the session id extracted from the old one. I hope it will be as simple as it sounds written down.
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.
Guess I'll fix this in a follow-up.
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.
Follow-up here: #13318.
CI state |
The series makes sense (didn't look too deep but you seem to have reviewed it alright). Your idea above definitely makes sense in general, @avikivity. |
perf.cc has two key comparators: key_compare and key_tri_compare. These are very generic name, in fact key_compare directly clashes with a comparator with the same name in types.hh. Avoid the clash by renaming both of these to a more unique name.
And propagate it down to where it is created. This will be used to add trace points for semaphore related events, but this will come in the next patches.
To make sure all tracing done on a certain page will make its way into the appropriate trace session. This is a contination of the previous patch (which added trace pointer to the permit).
Notably, to admission execution and eviction. Registering/unregistering the permit as inactive is not traced, as this happens on every buffer-fill for range scans. Semaphore trace messages have a "[reader_concurrency_semaphore]" prefix to allow them to be clearly associated with the semaphore.
v2:
|
CI state |
|
CI is completely broken, will re-kick it later. |
CI state |
…ous page This method is called on the start of each page, updating the trace state stored on the permit to that of the current page. When doing so, emit a trace message, containing the session id of the previous page, so the per-page sessions can be stiched together later. Note that this message is only emitted if the cached read Example: Tracing session: dcfc1570-ca3c-11ed-88d0-24443f03a8bb activity | timestamp | source | source_elapsed | client ---------------------------------------------------------------------------------------------------------------------------------------+----------------------------+-----------+----------------+----------- Execute CQL3 query | 2023-03-24 08:10:27.271000 | 127.0.0.1 | 0 | 127.0.0.1 Parsing a statement [shard 0] | 2023-03-24 08:10:27.271864 | 127.0.0.1 | -- | 127.0.0.1 Processing a statement [shard 0] | 2023-03-24 08:10:27.271958 | 127.0.0.1 | 94 | 127.0.0.1 Creating read executor for token 3274692326281147944 with all: {127.0.0.1} targets: {127.0.0.1} repair decision: NONE [shard 0] | 2023-03-24 08:10:27.271995 | 127.0.0.1 | 132 | 127.0.0.1 read_data: querying locally [shard 0] | 2023-03-24 08:10:27.271998 | 127.0.0.1 | 135 | 127.0.0.1 Start querying singular range {{3274692326281147944, pk{00026b73}}} [shard 0] | 2023-03-24 08:10:27.272003 | 127.0.0.1 | 140 | 127.0.0.1 [reader concurrency semaphore] admitted immediately [shard 0] | 2023-03-24 08:10:27.272006 | 127.0.0.1 | 143 | 127.0.0.1 [reader concurrency semaphore] executing read [shard 0] | 2023-03-24 08:10:27.272014 | 127.0.0.1 | 150 | 127.0.0.1 Querying cache for range {{3274692326281147944, pk{00026b73}}} and slice {(-inf, +inf)} [shard 0] | 2023-03-24 08:10:27.272022 | 127.0.0.1 | 159 | 127.0.0.1 Page stats: 1 partition(s), 0 static row(s) (0 live, 0 dead), 3 clustering row(s) (3 live, 0 dead) and 0 range tombstone(s) [shard 0] | 2023-03-24 08:10:27.272076 | 127.0.0.1 | 212 | 127.0.0.1 Caching querier with key ab928e0d-b815-46b7-9a02-1fa2d9549477 [shard 0] | 2023-03-24 08:10:27.272084 | 127.0.0.1 | 221 | 127.0.0.1 Querying is done [shard 0] | 2023-03-24 08:10:27.272087 | 127.0.0.1 | 224 | 127.0.0.1 Done processing - preparing a result [shard 0] | 2023-03-24 08:10:27.272106 | 127.0.0.1 | 242 | 127.0.0.1 Request complete | 2023-03-24 08:10:27.271259 | 127.0.0.1 | 259 | 127.0.0.1 Tracing session: dd3092f0-ca3c-11ed-88d0-24443f03a8bb activity | timestamp | source | source_elapsed | client ---------------------------------------------------------------------------------------------------------------------------------------+----------------------------+-----------+----------------+----------- Execute CQL3 query | 2023-03-24 08:10:27.615000 | 127.0.0.1 | 0 | 127.0.0.1 Parsing a statement [shard 0] | 2023-03-24 08:10:27.615223 | 127.0.0.1 | -- | 127.0.0.1 Processing a statement [shard 0] | 2023-03-24 08:10:27.615310 | 127.0.0.1 | 87 | 127.0.0.1 Creating read executor for token 3274692326281147944 with all: {127.0.0.1} targets: {127.0.0.1} repair decision: NONE [shard 0] | 2023-03-24 08:10:27.615346 | 127.0.0.1 | 124 | 127.0.0.1 read_data: querying locally [shard 0] | 2023-03-24 08:10:27.615349 | 127.0.0.1 | 126 | 127.0.0.1 Start querying singular range {{3274692326281147944, pk{00026b73}}} [shard 0] | 2023-03-24 08:10:27.615352 | 127.0.0.1 | 130 | 127.0.0.1 Found cached querier for key ab928e0d-b815-46b7-9a02-1fa2d9549477 and range(s) {{{3274692326281147944, pk{00026b73}}}} [shard 0] | 2023-03-24 08:10:27.615358 | 127.0.0.1 | 135 | 127.0.0.1 Reusing querier [shard 0] | 2023-03-24 08:10:27.615362 | 127.0.0.1 | 139 | 127.0.0.1 Continuing paged query, previous page's trace session is dcfc1570-ca3c-11ed-88d0-24443f03a8bb [shard 0] | 2023-03-24 08:10:27.615364 | 127.0.0.1 | 141 | 127.0.0.1 [reader concurrency semaphore] executing read [shard 0] | 2023-03-24 08:10:27.615371 | 127.0.0.1 | 148 | 127.0.0.1 Page stats: 1 partition(s), 0 static row(s) (0 live, 0 dead), 1 clustering row(s) (1 live, 0 dead) and 0 range tombstone(s) [shard 0] | 2023-03-24 08:10:27.615385 | 127.0.0.1 | 163 | 127.0.0.1 Querying is done [shard 0] | 2023-03-24 08:10:27.615583 | 127.0.0.1 | 360 | 127.0.0.1 Done processing - preparing a result [shard 0] | 2023-03-24 08:10:27.615730 | 127.0.0.1 | 507 | 127.0.0.1 Request complete | 2023-03-24 08:10:27.615518 | 127.0.0.1 | 518 | 127.0.0.1 See the message: Continuing paged query, previous page's trace session is dcfc1570-ca3c-11ed-88d0-24443f03a8bb [shard 0] | 2023-03-24 08:10:27.615364 | 127.0.0.1 | 141 | 127.0.0.1 This is a folow-up to scylladb#13255 Refs: scylladb#12781
…ous page This method is called on the start of each page, updating the trace state stored on the permit to that of the current page. When doing so, emit a trace message, containing the session id of the previous page, so the per-page sessions can be stiched together later. Note that this message is only emitted if the cached read survived between the pages. Example: Tracing session: dcfc1570-ca3c-11ed-88d0-24443f03a8bb activity | timestamp | source | source_elapsed | client ---------------------------------------------------------------------------------------------------------------------------------------+----------------------------+-----------+----------------+----------- Execute CQL3 query | 2023-03-24 08:10:27.271000 | 127.0.0.1 | 0 | 127.0.0.1 Parsing a statement [shard 0] | 2023-03-24 08:10:27.271864 | 127.0.0.1 | -- | 127.0.0.1 Processing a statement [shard 0] | 2023-03-24 08:10:27.271958 | 127.0.0.1 | 94 | 127.0.0.1 Creating read executor for token 3274692326281147944 with all: {127.0.0.1} targets: {127.0.0.1} repair decision: NONE [shard 0] | 2023-03-24 08:10:27.271995 | 127.0.0.1 | 132 | 127.0.0.1 read_data: querying locally [shard 0] | 2023-03-24 08:10:27.271998 | 127.0.0.1 | 135 | 127.0.0.1 Start querying singular range {{3274692326281147944, pk{00026b73}}} [shard 0] | 2023-03-24 08:10:27.272003 | 127.0.0.1 | 140 | 127.0.0.1 [reader concurrency semaphore] admitted immediately [shard 0] | 2023-03-24 08:10:27.272006 | 127.0.0.1 | 143 | 127.0.0.1 [reader concurrency semaphore] executing read [shard 0] | 2023-03-24 08:10:27.272014 | 127.0.0.1 | 150 | 127.0.0.1 Querying cache for range {{3274692326281147944, pk{00026b73}}} and slice {(-inf, +inf)} [shard 0] | 2023-03-24 08:10:27.272022 | 127.0.0.1 | 159 | 127.0.0.1 Page stats: 1 partition(s), 0 static row(s) (0 live, 0 dead), 3 clustering row(s) (3 live, 0 dead) and 0 range tombstone(s) [shard 0] | 2023-03-24 08:10:27.272076 | 127.0.0.1 | 212 | 127.0.0.1 Caching querier with key ab928e0d-b815-46b7-9a02-1fa2d9549477 [shard 0] | 2023-03-24 08:10:27.272084 | 127.0.0.1 | 221 | 127.0.0.1 Querying is done [shard 0] | 2023-03-24 08:10:27.272087 | 127.0.0.1 | 224 | 127.0.0.1 Done processing - preparing a result [shard 0] | 2023-03-24 08:10:27.272106 | 127.0.0.1 | 242 | 127.0.0.1 Request complete | 2023-03-24 08:10:27.271259 | 127.0.0.1 | 259 | 127.0.0.1 Tracing session: dd3092f0-ca3c-11ed-88d0-24443f03a8bb activity | timestamp | source | source_elapsed | client ---------------------------------------------------------------------------------------------------------------------------------------+----------------------------+-----------+----------------+----------- Execute CQL3 query | 2023-03-24 08:10:27.615000 | 127.0.0.1 | 0 | 127.0.0.1 Parsing a statement [shard 0] | 2023-03-24 08:10:27.615223 | 127.0.0.1 | -- | 127.0.0.1 Processing a statement [shard 0] | 2023-03-24 08:10:27.615310 | 127.0.0.1 | 87 | 127.0.0.1 Creating read executor for token 3274692326281147944 with all: {127.0.0.1} targets: {127.0.0.1} repair decision: NONE [shard 0] | 2023-03-24 08:10:27.615346 | 127.0.0.1 | 124 | 127.0.0.1 read_data: querying locally [shard 0] | 2023-03-24 08:10:27.615349 | 127.0.0.1 | 126 | 127.0.0.1 Start querying singular range {{3274692326281147944, pk{00026b73}}} [shard 0] | 2023-03-24 08:10:27.615352 | 127.0.0.1 | 130 | 127.0.0.1 Found cached querier for key ab928e0d-b815-46b7-9a02-1fa2d9549477 and range(s) {{{3274692326281147944, pk{00026b73}}}} [shard 0] | 2023-03-24 08:10:27.615358 | 127.0.0.1 | 135 | 127.0.0.1 Reusing querier [shard 0] | 2023-03-24 08:10:27.615362 | 127.0.0.1 | 139 | 127.0.0.1 Continuing paged query, previous page's trace session is dcfc1570-ca3c-11ed-88d0-24443f03a8bb [shard 0] | 2023-03-24 08:10:27.615364 | 127.0.0.1 | 141 | 127.0.0.1 [reader concurrency semaphore] executing read [shard 0] | 2023-03-24 08:10:27.615371 | 127.0.0.1 | 148 | 127.0.0.1 Page stats: 1 partition(s), 0 static row(s) (0 live, 0 dead), 1 clustering row(s) (1 live, 0 dead) and 0 range tombstone(s) [shard 0] | 2023-03-24 08:10:27.615385 | 127.0.0.1 | 163 | 127.0.0.1 Querying is done [shard 0] | 2023-03-24 08:10:27.615583 | 127.0.0.1 | 360 | 127.0.0.1 Done processing - preparing a result [shard 0] | 2023-03-24 08:10:27.615730 | 127.0.0.1 | 507 | 127.0.0.1 Request complete | 2023-03-24 08:10:27.615518 | 127.0.0.1 | 518 | 127.0.0.1 See the message: Continuing paged query, previous page's trace session is dcfc1570-ca3c-11ed-88d0-24443f03a8bb [shard 0] | 2023-03-24 08:10:27.615364 | 127.0.0.1 | 141 | 127.0.0.1 This is a folow-up to scylladb#13255 Refs: scylladb#12781
…ous page This method is called on the start of each page, updating the trace state stored on the permit to that of the current page. When doing so, emit a trace message, containing the session id of the previous page, so the per-page sessions can be stiched together later. Note that this message is only emitted if the cached read survived between the pages. Example: Tracing session: dcfc1570-ca3c-11ed-88d0-24443f03a8bb activity | timestamp | source | source_elapsed | client ---------------------------------------------------------------------------------------------------------------------------------------+----------------------------+-----------+----------------+----------- Execute CQL3 query | 2023-03-24 08:10:27.271000 | 127.0.0.1 | 0 | 127.0.0.1 Parsing a statement [shard 0] | 2023-03-24 08:10:27.271864 | 127.0.0.1 | -- | 127.0.0.1 Processing a statement [shard 0] | 2023-03-24 08:10:27.271958 | 127.0.0.1 | 94 | 127.0.0.1 Creating read executor for token 3274692326281147944 with all: {127.0.0.1} targets: {127.0.0.1} repair decision: NONE [shard 0] | 2023-03-24 08:10:27.271995 | 127.0.0.1 | 132 | 127.0.0.1 read_data: querying locally [shard 0] | 2023-03-24 08:10:27.271998 | 127.0.0.1 | 135 | 127.0.0.1 Start querying singular range {{3274692326281147944, pk{00026b73}}} [shard 0] | 2023-03-24 08:10:27.272003 | 127.0.0.1 | 140 | 127.0.0.1 [reader concurrency semaphore] admitted immediately [shard 0] | 2023-03-24 08:10:27.272006 | 127.0.0.1 | 143 | 127.0.0.1 [reader concurrency semaphore] executing read [shard 0] | 2023-03-24 08:10:27.272014 | 127.0.0.1 | 150 | 127.0.0.1 Querying cache for range {{3274692326281147944, pk{00026b73}}} and slice {(-inf, +inf)} [shard 0] | 2023-03-24 08:10:27.272022 | 127.0.0.1 | 159 | 127.0.0.1 Page stats: 1 partition(s), 0 static row(s) (0 live, 0 dead), 3 clustering row(s) (3 live, 0 dead) and 0 range tombstone(s) [shard 0] | 2023-03-24 08:10:27.272076 | 127.0.0.1 | 212 | 127.0.0.1 Caching querier with key ab928e0d-b815-46b7-9a02-1fa2d9549477 [shard 0] | 2023-03-24 08:10:27.272084 | 127.0.0.1 | 221 | 127.0.0.1 Querying is done [shard 0] | 2023-03-24 08:10:27.272087 | 127.0.0.1 | 224 | 127.0.0.1 Done processing - preparing a result [shard 0] | 2023-03-24 08:10:27.272106 | 127.0.0.1 | 242 | 127.0.0.1 Request complete | 2023-03-24 08:10:27.271259 | 127.0.0.1 | 259 | 127.0.0.1 Tracing session: dd3092f0-ca3c-11ed-88d0-24443f03a8bb activity | timestamp | source | source_elapsed | client ---------------------------------------------------------------------------------------------------------------------------------------+----------------------------+-----------+----------------+----------- Execute CQL3 query | 2023-03-24 08:10:27.615000 | 127.0.0.1 | 0 | 127.0.0.1 Parsing a statement [shard 0] | 2023-03-24 08:10:27.615223 | 127.0.0.1 | -- | 127.0.0.1 Processing a statement [shard 0] | 2023-03-24 08:10:27.615310 | 127.0.0.1 | 87 | 127.0.0.1 Creating read executor for token 3274692326281147944 with all: {127.0.0.1} targets: {127.0.0.1} repair decision: NONE [shard 0] | 2023-03-24 08:10:27.615346 | 127.0.0.1 | 124 | 127.0.0.1 read_data: querying locally [shard 0] | 2023-03-24 08:10:27.615349 | 127.0.0.1 | 126 | 127.0.0.1 Start querying singular range {{3274692326281147944, pk{00026b73}}} [shard 0] | 2023-03-24 08:10:27.615352 | 127.0.0.1 | 130 | 127.0.0.1 Found cached querier for key ab928e0d-b815-46b7-9a02-1fa2d9549477 and range(s) {{{3274692326281147944, pk{00026b73}}}} [shard 0] | 2023-03-24 08:10:27.615358 | 127.0.0.1 | 135 | 127.0.0.1 Reusing querier [shard 0] | 2023-03-24 08:10:27.615362 | 127.0.0.1 | 139 | 127.0.0.1 Continuing paged query, previous page's trace session is dcfc1570-ca3c-11ed-88d0-24443f03a8bb [shard 0] | 2023-03-24 08:10:27.615364 | 127.0.0.1 | 141 | 127.0.0.1 [reader concurrency semaphore] executing read [shard 0] | 2023-03-24 08:10:27.615371 | 127.0.0.1 | 148 | 127.0.0.1 Page stats: 1 partition(s), 0 static row(s) (0 live, 0 dead), 1 clustering row(s) (1 live, 0 dead) and 0 range tombstone(s) [shard 0] | 2023-03-24 08:10:27.615385 | 127.0.0.1 | 163 | 127.0.0.1 Querying is done [shard 0] | 2023-03-24 08:10:27.615583 | 127.0.0.1 | 360 | 127.0.0.1 Done processing - preparing a result [shard 0] | 2023-03-24 08:10:27.615730 | 127.0.0.1 | 507 | 127.0.0.1 Request complete | 2023-03-24 08:10:27.615518 | 127.0.0.1 | 518 | 127.0.0.1 See the message: Continuing paged query, previous page's trace session is dcfc1570-ca3c-11ed-88d0-24443f03a8bb [shard 0] | 2023-03-24 08:10:27.615364 | 127.0.0.1 | 141 | 127.0.0.1 This is a folow-up to #13255 Refs: #12781 Closes #13318
…eaders needlessly" to branch-5.2' from Botond Dénes The patch doesn't apply cleanly, so a targeted backport PR was necessary. I also needed to cherry-pick two patches from #13255 that the backported patch depends on. Decided against backporting the entire #13255 as it is quite an intrusive change. Fixes: #11803 Closes #13515 * github.com:scylladb/scylladb: reader_concurrency_semaphore: don't evict inactive readers needlessly reader_concurrency_semaphore: add stats to record reason for queueing permits reader_concurrency_semaphore: can_admit_read(): also return reason for rejection
…eaders needlessly" to branch-5.1' from Botond Dénes The patch doesn't apply cleanly, so a targeted backport PR was necessary. I also needed to cherry-pick two patches from #13255 that the backported patch depends on. Decided against backporting the entire #13255 as it is quite an intrusive change. Fixes: #11803 Closes #13516 * github.com:scylladb/scylladb: reader_concurrency_semaphore: don't evict inactive readers needlessly reader_concurrency_semaphore: add stats to record reason for queueing permits reader_concurrency_semaphore: can_admit_read(): also return reason for rejection reader_concurrency_semaphore: add set_resources()
…eaders needlessly" to branch-5.0' from Botond Dénes The patch doesn't apply cleanly, so a targeted backport PR was necessary. I also needed to cherry-pick two patches from #13255 that the backported patch depends on. Decided against backporting the entire #13255 as it is quite an intrusive change. Fixes: #11803 Closes #13517 * github.com:scylladb/scylladb: reader_concurrency_semaphore: don't evict inactive readers needlessly reader_concurrency_semaphore: add stats to record reason for queueing permits reader_concurrency_semaphore: can_admit_read(): also return reason for rejection reader_concurrency_semaphore: add set_resources()
Currently we have no visibility into what happens to a read in the reader concurrency semaphore as far as tracing is concerned. This series fixes that, storing a trace state pointer on the reader permit and using it to add trace messages to important semaphore related events:
This allows for seeing if the read suffered any delay in the semaphore.
Example tracing (2 pages):
Fixes: #12781