Skip to content

Commit

Permalink
Merge pull request ceph#60964 from cyx1231st/wip-crimson-msgr-debug
Browse files Browse the repository at this point in the history
crimson/net: log adjustment / enable ms debug

Reviewed-by: Matan Breizman <[email protected]>
  • Loading branch information
Matan-B authored Dec 15, 2024
2 parents 20d7fe9 + 6c095f0 commit c0dae46
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
1 change: 1 addition & 0 deletions qa/config/crimson_qa_overrides.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ overrides:
osd:
crimson osd obc lru size: 10
debug alienstore: 20
debug ms: 20
flavor: crimson
workunit:
env:
Expand Down
4 changes: 2 additions & 2 deletions src/crimson/net/io_handler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ void IOHandler::do_set_io_state(
{
ceph_assert_always(seastar::this_shard_id() == get_shard_id());
auto prv_state = get_io_state();
logger().debug("{} got {}do_set_io_state(): prv_state={}, new_state={}, "
logger().debug("{} got {} do_set_io_state(): prv_state={}, new_state={}, "
"fa={}, set_notify_out={}, at {}",
conn,
cc_seq.has_value() ? fmt::format("{} ", *cc_seq) : "",
Expand Down Expand Up @@ -984,7 +984,7 @@ void IOHandler::notify_out_dispatch()
});
});
}
if (shard_states->try_enter_out_dispatching()) {
if (shard_states->try_enter_out_dispatching(conn)) {
shard_states->dispatch_in_background(
"do_out_dispatch", conn, [this] {
return do_out_dispatch(*shard_states);
Expand Down
7 changes: 6 additions & 1 deletion src/crimson/net/io_handler.h
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ class IOHandler final : public ConnectionHandler {
in_exit_dispatching = std::nullopt;
}

bool try_enter_out_dispatching() {
bool try_enter_out_dispatching(SocketConnection &conn) {
assert(seastar::this_shard_id() == sid);
if (out_dispatching) {
// already dispatching out
Expand All @@ -327,6 +327,9 @@ class IOHandler final : public ConnectionHandler {
// do not dispatch out
return false;
default:
crimson::get_logger(ceph_subsys_ms).error(
"{} try_enter_out_dispatching() got wrong io_state {}",
conn, io_state);
ceph_abort("impossible");
}
}
Expand Down Expand Up @@ -574,6 +577,8 @@ struct fmt::formatter<crimson::net::IOHandler::io_state_t>
case switched:
name = "switched";
break;
default:
name = "undefined";
}
return formatter<string_view>::format(name, ctx);
}
Expand Down

0 comments on commit c0dae46

Please sign in to comment.