Repository navigation
mountstats: fix the column order of NFS over RDMA transport stats - #908
Open
amdadulbari wants to merge 1 commit into
Open
amdadulbari wants to merge 1 commit into
amdadulbari wants to merge 1 commit into
Conversation
parseNFSTransportStats assigned the RDMA xprt columns in the field order of the kernel's struct rpcrdma_stats, but the kernel prints them in a different order in xprt_rdma_print_stats() (net/sunrpc/xprtrdma/transport.c): read_chunk write_chunk reply_chunk total_rdma_request total_rdma_reply pullup_copy fixup_copy hardway_register failed_marshal bad_reply nomsg_call mrs_recycled mrs_orphaned mrs_allocated local_inv_needed empty_sendctx_q reply_waits_for_send This order has been stable since the RDMA stats were added; later kernels only append columns. Only the first four RDMA columns were read correctly. Every column after total_rdma_request landed in the wrong field, e.g. the total_rdma_reply byte count was reported as PullupCopyCount, and TotalRdmaReply received the mrs_allocated count. Read the columns in the order the kernel prints them. bcall_count is not printed by the kernel, so BcallCount stays zero. Add a test with a distinct value in every column, and correct the expected values of the existing RDMA test case, which encoded the wrong mapping. Signed-off-by: Md. Amdadul Bari Imad <amdadulbari@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@SuperQ @discordianfish
parseNFSTransportStatsassigned thexprt: rdmacolumns of/proc/<pid>/mountstatsin the field order of the kernel'sstruct rpcrdma_stats, butxprt_rdma_print_stats()(net/sunrpc/xprtrdma/transport.c) prints them in a different order:This order is the same in every kernel since v4.2; later kernels only append columns (current kernels print a constant 0 in the
reply_waits_for_sendposition). Only the first four RDMA columns were mapped correctly; for example thetotal_rdma_replybyte count ended up inPullupCopyCount, andTotalRdmaReplyreceivedmrs_orphaned.bcall_countis never printed, soBcallCountstays zero.Changes:
TestParseNFSTransportStatsRDMAFieldOrder, which uses a distinct value per column (fails before this change).TestMountStats, which encoded the wrong mapping.The mapping was introduced in #558. node_exporter does not expose these fields yet (see prometheus/node_exporter#2825).