Skip to content

os/bluestore: Recompression, part 1. Nice debugs.#54075

Merged
aclamk merged 9 commits intoceph:mainfrom
aclamk:wip-aclamk-bs-nice-print
Aug 12, 2024
Merged

os/bluestore: Recompression, part 1. Nice debugs.#54075
aclamk merged 9 commits intoceph:mainfrom
aclamk:wip-aclamk-bs-nice-print

Conversation

@aclamk
Copy link
Contributor

@aclamk aclamk commented Oct 18, 2023

Introduce printer class that allows to select parts of Blob that are to be printed.
It severly reduced amount of clutter in output.
Usage:
using P = Bluestore::Blob::printer;
dout << blob->printer(P::nick + P::sdisk + P::schk);

Now the Blob printout can look like this:
Blob(rtrvlad disk=0x[12503~e,19589~1,12512~1]000 track=16*4K{4K}[] )
instead of
Blob(0x55555e735790 blob([0x12503000~e000,0x19589000~1000,0x12512000~1000] llen=0x10000 csum crc32c/0x1000/64) use_tracker(0x10*0x1000 0x[1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000]) SharedBlob(0x55555e9e8680 sbid 0x0))

#54075 Nice debugs.
#54504 New write path.
#57448 Segmented onode.
#56975 Main
#57450 Test

Contribution Guidelines

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test dashboard cephadm
  • jenkins test api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox
  • jenkins test windows

Copy link
Contributor

@ifed01 ifed01 left a comment

Choose a reason for hiding this comment

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

Nice!

@github-actions
Copy link

github-actions bot commented Jan 3, 2024

This pull request has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs for another 30 days.
If you are a maintainer or core committer, please follow-up on this pull request to identify what steps should be taken by the author to move this proposed change forward.
If you are the author of this pull request, thank you for your proposed contribution. If you believe this change is still appropriate, please ensure that any feedback has been addressed and ask for a code review.

@github-actions github-actions bot added the stale label Jan 3, 2024
Comment on lines +642 to +675
printer print(uint8_t mode) const {
return printer(*this, mode);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

shouldn't the printer be a singleton? If we add to many prints it will instantiate a printer every time we print something.

@pereman2
Copy link
Contributor

pereman2 commented Jan 4, 2024

unstale

@ifed01
Copy link
Contributor

ifed01 commented Mar 6, 2024

jenkins test make check

@ifed01
Copy link
Contributor

ifed01 commented Mar 6, 2024

jenkins test api

std::ostream &operator<<(std::ostream &out, const maybe_K &k) {
if (((k.x & 0x3ff) == 0) && (k.x != 0)) {
if (k.x != 0x400)
out << (k.x / 0x400);
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: use >> instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

x / 0x400 compiles to shl x, 10, but retains relation to above condition.

@aclamk aclamk force-pushed the wip-aclamk-bs-nice-print branch from 837ed80 to 1cebd19 Compare May 13, 2024 12:14
@aclamk aclamk changed the title os/bluestore: Nice debug prints for Extent and Blob os/bluestore: Recompression, part 1. Nice debugs. May 13, 2024
<< ", " << o.extent_map.spanning_blob_map.size()
<< " spanning blobs" << std::endl;
const BlueStore::ExtentMap& map = o.extent_map;
std::set<BlueStore::Blob*> visited;
Copy link
Contributor

Choose a reason for hiding this comment

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

do we want to create a set of length number_of_extents only to print? Feels like overkill and expensive. If it's marked as shared blob then it shouldn't be hard to parse why there are duplicates.

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe we want to wrap this logic in a "mode", where you say: "okay I want finer grained information or high tailored one"

@aclamk
Copy link
Contributor Author

aclamk commented Jun 28, 2024

jenkins test make check

@aclamk
Copy link
Contributor Author

aclamk commented Jun 28, 2024

jenkins test windows

@aclamk
Copy link
Contributor Author

aclamk commented Jun 28, 2024

jenkins test api

@aclamk aclamk force-pushed the wip-aclamk-bs-nice-print branch from 5a672c0 to 907faba Compare July 1, 2024 10:38
@aclamk
Copy link
Contributor Author

aclamk commented Jul 2, 2024

jenkins test api

@github-actions
Copy link

github-actions bot commented Jul 9, 2024

This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved

@aclamk
Copy link
Contributor Author

aclamk commented Jul 24, 2024

jenkins test api

@aclamk aclamk added aclamk-testing-phoebe bluestore testing and removed aclamk-testing-phoebe bluestore testing labels Aug 1, 2024
@github-actions
Copy link

github-actions bot commented Aug 7, 2024

This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved

@aclamk aclamk force-pushed the wip-aclamk-bs-nice-print branch from a0f4c4e to d6a1b09 Compare August 7, 2024 08:25
@github-actions
Copy link

github-actions bot commented Aug 7, 2024

This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved

aclamk added 9 commits August 7, 2024 10:47
Introduce printer class that allows to select parts of Blob that are to be printed.
It severly reduced amount of clutter in output.
Usage:
using P = Bluestore::Blob::printer;
dout << blob->printer(P::ptr + P::sdisk + P::schk);

Signed-off-by: Adam Kupczyk <akupczyk@ibm.com>
Modify Extent similar to Blob, so that one can use improved Blob printing
when printing extents.

Signed-off-by: Adam Kupczyk <akupczyk@ibm.com>
Now printing Blob can include buffers.
There are 2 variants:
- 'buf' same as original in dump_onode
- 'sbuf' only fundamental params, no ptr etc.

Signed-off-by: Adam Kupczyk <akupczyk@ibm.com>
Added nice replacement for dump_onode function.
Introduce printer class that allows to select parts of Onode that are to be printed.
It severly reduced amount of clutter in output.
Usage:
using P = Bluestore::printer;
dout << blob->print(P::ptr + P::sdisk + P::schk + P::buf + P::attrs);

Signed-off-by: Adam Kupczyk <akupczyk@ibm.com>
- moved operator<< to BlueStore_debug file
- upcased Printer {} flags
- more reliable heap begin detection
- fixup after rebase

Signed-off-by: Adam Kupczyk <akupczyk@ibm.com>
Small improvement on debug output.

Signed-off-by: Adam Kupczyk <akupczyk@ibm.com>
From define in .cc to constexpr in .h

Signed-off-by: Adam Kupczyk <akupczyk@ibm.com>
Now Onode can be printed in selected range.
It is useful in high-level dout modes that operate on a fragment of
entire Onode.

Signed-off-by: Adam Kupczyk <akupczyk@ibm.com>
BufferSpace moved from Blob to Onode.
Moved relevant code from Blob::operator<< to Onode::operator<<.

Signed-off-by: Adam Kupczyk <akupczyk@ibm.com>
@aclamk aclamk force-pushed the wip-aclamk-bs-nice-print branch from d6a1b09 to f400cb1 Compare August 7, 2024 10:54
@aclamk
Copy link
Contributor Author

aclamk commented Aug 8, 2024

jenkins test make check

@aclamk aclamk merged commit 3060f4f into ceph:main Aug 12, 2024
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