Skip to content

os/bluestore: Wait for running AIOs to complete if new ops overlap with - #35201

Closed
ifed01 wants to merge 1 commit into
ceph:masterfrom
ifed01:wip-ifed-fix-45613
Closed

ifed01 wants to merge 1 commit into
ceph:masterfrom
ifed01:wip-ifed-fix-45613

Conversation

@ifed01

@ifed01 ifed01 commented May 22, 2020

Copy link
Copy Markdown
Contributor

them.

The major candidate for overlapping conflict is code in
BlueFS::_flush_range which zeros preextended WAL.

Fixes: https://tracker.ceph.com/issues/45613
Signed-off-by: Igor Fedotov [email protected]

Checklist

  • References tracker ticket
  • Updates documentation if necessary
  • Includes tests for new functionality or reproducer for bug

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 backend
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox

Comment thread src/os/bluestore/BlockDevice.h Resolved
@ifed01
ifed01 force-pushed the wip-ifed-fix-45613 branch 3 times, most recently from 4080afc to a22f0fc Compare May 25, 2020 11:37
@tchaikov
tchaikov dismissed their stale review May 25, 2020 14:38

comment addressed

@aclamk

aclamk commented May 26, 2020

Copy link
Copy Markdown
Contributor

@ifed01 I do not understand why this soluiton is better then single wait_for_aio() in BlueFS::_flush_range.
Situation where we schedule next write to same region before actually having reaped previous one seems to be an error.
I would rather have ability to detect such conditions (bdev_debug_inflight_ios).
When this patch is applied, aios are always ordered, but detector for inflight collision would catch the would-be condition.
Of course bdev_debug_inflight_ios requires improvement, so it won't halt on read/read collision. #35233

@ifed01

ifed01 commented May 27, 2020 •

Copy link
Copy Markdown
Contributor Author

@ifed01 I do not understand why this soluiton is better then single wait_for_aio() in BlueFS::_flush_range.

Do you mean unconditional wait_for_aio() call on each flush_range? Or waiting after preextended wal filling? Or what?
Anyway the major concern is performance impact - with my patch we only perform waiting when real overlap takes place... And detection algorithm looks quite lightweight itself. Comparing to "inflight ios" detection it doesn't need additional interval_set (which implementation isn't trivial I presume) and it operates on a single IOContext which reduces the lookup scope.

Situation where we schedule next write to same region before actually having reaped previous one seems to be an error.

It primarily depends on the prerequisites we establish to BlockDevice implementations - whether it's caller or callee responsibility to ensure proper ordering. Where burdening it on a caller seems to be more error-prone.
But currently we're getting a mixture which I agree is weird.
Unfortunately I don't see any good enough and easy(!) solution to address every concerns.
Do you have one?

I would rather have ability to detect such conditions (bdev_debug_inflight_ios).
When this patch is applied, aios are always ordered, but detector for inflight collision would catch the would-be condition.
Of course bdev_debug_inflight_ios requires improvement, so it won't halt on read/read collision. #35233

The bad thing about this inspection is that it's not running permanently. Due to performance reasons I presume.. Which makes it rather useless for any usage but development/QA purposes. I discovered it's helpful after I had found the root cause. Which thanks to pretty easy issue reproduction wasn't that hard to find. But I can easily imagine much worse cases one needs to investigate in production.

them.

The major candidate for overlapping conflict is code in
BlueFS::_flush_range which zeros preextended WAL.

Fixes: https://tracker.ceph.com/issues/45613
Signed-off-by: Igor Fedotov <[email protected]>
@ifed01
ifed01 force-pushed the wip-ifed-fix-45613 branch from a22f0fc to 7db3bd5 Compare May 28, 2020 12:23
@aclamk

aclamk commented May 29, 2020

Copy link
Copy Markdown
Contributor

@ifed01 Do you want this change if we merge #35293, and delete prextending WAL files altogether?

@ifed01

ifed01 commented May 29, 2020

Copy link
Copy Markdown
Contributor Author

@ifed01 Do you want this change if we merge #35293, and delete prextending WAL files altogether?

I think we can skip this patch if WAL preextending is gone.

@ifed01

ifed01 commented Jun 9, 2020

Copy link
Copy Markdown
Contributor Author

Closing in favor of #35497

@ifed01 ifed01 closed this Jun 9, 2020
@ifed01
ifed01 deleted the wip-ifed-fix-45613 branch June 9, 2020 13:28
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.

4 participants