Skip to content
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

src/: s/Mutex/ceph::mutex/ #29113

Merged
merged 65 commits into from
Aug 3, 2019
Merged

src/: s/Mutex/ceph::mutex/ #29113

merged 65 commits into from
Aug 3, 2019

Conversation

tchaikov
Copy link
Contributor

@tchaikov tchaikov commented Jul 18, 2019

  • s/Mutex/ceph::mutex/
  • s/Cond/ceph::condition_variable/
  • replace vector<mutex_pointer> with ceph::containers::tiny_vector<>
  • clean up the commits a little bit.
  • remove the "mds: execute PurgeQueue on_error handler in finisher" commits once mds: execute PurgeQueue on_error handler in finisher #29064 is merged
  • run rados qa suite against this change.
  • run rbd qa suite against this change

@tchaikov tchaikov added cleanup core rgw rbd cephfs Ceph File System common bluestore mgr mon messenger Issues involving one of the Ceph messenger implementations DNM labels Jul 18, 2019
@batrick
Copy link
Member

batrick commented Jul 18, 2019

\o/

@tchaikov tchaikov force-pushed the wip-ceph-mutex branch 2 times, most recently from 6ccfb83 to 6f9ced4 Compare July 19, 2019 06:54
@tchaikov
Copy link
Contributor Author

jenkins, retest this please

@@ -33,11 +33,7 @@ class SafeTimerThread : public Thread {
};



Copy link
Contributor

Choose a reason for hiding this comment

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

At some point it might be better just to use replace all our uses of Timer.cc with ceph_timer.h, since it already uses the new concurrency, time, functions, etc,

Copy link
Contributor Author

@tchaikov tchaikov Jul 19, 2019

Choose a reason for hiding this comment

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

yeah, we could make that change in another PR. i think we could even deprecate utime in future, and just use it as an ondisk/wire format.

Copy link
Contributor

Choose a reason for hiding this comment

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

note that conversion from SafeTimer to ceph::timer isn't trivial in cases that rely on the "Safe" part

src/common/Cond.h Outdated Show resolved Hide resolved
src/journal/FutureImpl.h Outdated Show resolved Hide resolved
src/journal/FutureImpl.cc Outdated Show resolved Hide resolved
src/journal/FutureImpl.cc Outdated Show resolved Hide resolved
Signed-off-by: Kefu Chai <kchai@redhat.com>
Signed-off-by: Kefu Chai <kchai@redhat.com>
Signed-off-by: Kefu Chai <kchai@redhat.com>
Signed-off-by: Kefu Chai <kchai@redhat.com>
Signed-off-by: Kefu Chai <kchai@redhat.com>
Signed-off-by: Kefu Chai <kchai@redhat.com>
Signed-off-by: Kefu Chai <kchai@redhat.com>
Signed-off-by: Kefu Chai <kchai@redhat.com>
Signed-off-by: Kefu Chai <kchai@redhat.com>
Signed-off-by: Kefu Chai <kchai@redhat.com>
Signed-off-by: Kefu Chai <kchai@redhat.com>
Signed-off-by: Kefu Chai <kchai@redhat.com>
Signed-off-by: Kefu Chai <kchai@redhat.com>
Signed-off-by: Kefu Chai <kchai@redhat.com>
Signed-off-by: Kefu Chai <kchai@redhat.com>
for using functions like `lockdep_unregister_ceph_context()`

Signed-off-by: Kefu Chai <kchai@redhat.com>
`PG` print details info in the prefix of logging messages if the PG is
being locked by current thread. but `ceph::mutex` is an alias of
`std::mutex` in non-debug mode, so neither `mutex::is_locked_by_me()` nor
`mutex::is_locked()` is supported in non-debug mode. to continue supporting
this feature, `PG::locked_by` is added to memorize the thread id of the owner
of the lock.

Signed-off-by: Kefu Chai <kchai@redhat.com>
as it's replaced by ceph::condition_variable.

Signed-off-by: Kefu Chai <kchai@redhat.com>
as it's replaced by `ceph::mutex`

Signed-off-by: Kefu Chai <kchai@redhat.com>
@tchaikov tchaikov merged commit 0fb6b3c into ceph:master Aug 3, 2019
@tchaikov tchaikov deleted the wip-ceph-mutex branch August 3, 2019 12:16
@wjwithagen
Copy link
Contributor

@tchaikov
Clang complains:

/home/jenkins/workspace/ceph-master/src/osdc/ObjectCacher.cc:1848:22: error: no viable constructor or deduction guide for deduction of template arguments of 'unique_lock'
    std::unique_lock l{lock, std:adopt_lock};

Likely due to a missing :: ??

@wjwithagen
Copy link
Contributor

#29472

@wjwithagen
Copy link
Contributor

@tchaikov
This changeset also causes:

/home/jenkins/workspace/ceph-master/src/tools/rbd_ggate/Server.cc:36:14: error: no member named 'WaitInterval' in 'ceph::condition_variable_debug'
      m_cond.WaitInterval(m_lock, utime_t(1, 0));
      ~~~~~~ ^
/home/jenkins/workspace/ceph-master/src/tools/rbd_ggate/Server.cc:82:10: error: no member named 'Signal' in 'ceph::condition_variable_debug'
  m_cond.Signal();
  ~~~~~~ ^
/home/jenkins/workspace/ceph-master/src/tools/rbd_ggate/Server.cc:89:75: error: expected ';' after return statement
  m_cond.wait(locker, [this] { return !m_io_finished.empty() || m_stopping});
                                                                          ^
                                                                          ;
/home/jenkins/workspace/ceph-master/src/tools/rbd_ggate/Server.cc:109:12: error: no member named 'Wait' in 'ceph::condition_variable_debug'
    m_cond.Wait(m_lock);
    ~~~~~~ ^

Have been trying all kinds of things but I keep getting mismatching function signatures...
Suggestions?

@tchaikov
Copy link
Contributor Author

tchaikov commented Aug 4, 2019

#29474

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bluestore cephfs Ceph File System cleanup common core messenger Issues involving one of the Ceph messenger implementations mgr mon rbd rgw
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants