From: Jeff Layton <jlayton@redhat.com>
To: ceph-devel <ceph-devel@vger.kernel.org>
Subject: should CephContext be a singleton?
Date: Wed, 13 Sep 2017 10:58:35 -0400 [thread overview]
Message-ID: <1505314715.4822.24.camel@redhat.com> (raw)
I recently hit the problem described in this bug when rolling some new
tests for cephfs:
http://tracker.ceph.com/issues/20988
While I hit it in a testcase, I suspect something like ganesha or samba
could also hit this, as they can create several CephContexts in the
course of their duties and their teardown is not necessarily coordinated
in any way.
The problem is basically that the CephContext is a random pile of stuff,
some of which has an effect on global objects (the lockdep stuff, in
particular, but there may be more).
There are a few ways to fix it...we could just ensure that the lockdep
stuff is handled cleanly, but I wonder...is there any real-world
use-case for having multiple CephContexts in a single process image?
It contains stuff like admin sockets, and certain threads are tied to
it, etc. This seems like the sort of thing that should just have a
single instance per process. Should we start moving things in that
direction, or should I look at fixing this another way?
Thanks,
--
Jeff Layton <jlayton@redhat.com>
next reply other threads:[~2017-09-13 14:58 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-13 14:58 Jeff Layton [this message]
2017-09-13 15:09 ` should CephContext be a singleton? Adam C. Emerson
2017-09-13 15:16 ` John Spray
2017-09-13 15:30 ` Adam C. Emerson
2017-09-14 13:28 ` Jeff Layton
2017-09-13 15:22 ` Jeff Layton
2017-09-13 15:16 ` Sage Weil
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1505314715.4822.24.camel@redhat.com \
--to=jlayton@redhat.com \
--cc=ceph-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.