All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nick Alcock <nix@esperi.org.uk>
To: Kris Van Hees <kris.van.hees@oracle.com>
Cc: dtrace@lists.linux.dev, dtrace-devel@oss.oracle.com
Subject: Re: [PATCH 03/20] ctf: give shared kernel types a synthetic module owner
Date: Tue, 24 Nov 2026 15:34:28 +0000	[thread overview]
Message-ID: <87v75mgs57.fsf@esperi.org.uk> (raw)
In-Reply-To: <au5C9hJYCjivlKhJ@oracle.com>

On 6 Nov 2026, Kris Van Hees verbalised:

> On Fri, Nov 06, 2026 at 12:40:35PM +0000, Nix wrote:
>> On 30 Oct 2026, Kris Van Hees stated:
>> 
>> > Store the shared dictionary in shared_ctf->dm_ctfp and remove dt_shared_ctf
>> > from the DTrace handle.
>> 
>> This is effectively reversing a change I made ten years ago :P because
>> having it as a separate module was too problematic given that it didn't
>> correspond to a *real* module any more (in particular, we don't want
>> people to be able to look it up by name with `, etc.)
>> 
>> As far as I could tell, all the advantages of being a module were
>> actually disadvantages for the shared dict, and no advantages were left.
>> It's not actually a module, and none of the things you can do to modules
>> should be doable on the shared CTF, and it didn't make the code simpler
>> to conflate the two either.
>> 
>> So... what benefits does this bring?
>
> It makes it cleaner to be able to e.g. share the module data between multiple
> handles within the same process (which we will be doing with the PCP support
> Alan contributed).  It also avoids needing to store the shared_ctf data in the
> handle itself, because it is truly associated with kernel module data.

It... is? I dropped it because there was literally nothing in the
dt_module that actually related to the shared, because it was *not* a
module. I'm wondering if what we're missing here is a layer of
abstraction between modules (which have address ranges, names, probes
associated with them etc) and the CTF stuff, so that modules connect to
one of those, and so dos the shared CTF etc, while still not having the
shared CTF appear to be a module, since it really isn't one.

For sharing stuff between multiple handles, I guess what we really want
is for shared_ctf to be refcounted -- which, conveniently, it already
is! Of course, libdtrace-ctf provides no way to get access to it, but
you shuold find that calling ctf_ref() on a dict will suffice to bump
its refcount when you stuff it into another handle. That might be all
you need. No need to keep around the whole module thing just to
implement a refcount :)

-- 
NULL && (void)

      reply	other threads:[~2026-11-24 15:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-30 19:36 [PATCH 03/20] ctf: give shared kernel types a synthetic module owner Kris Van Hees
2026-11-06 12:40 ` Nix
2026-11-06 21:13   ` Kris Van Hees
2026-11-24 15:34     ` Nick Alcock [this message]

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=87v75mgs57.fsf@esperi.org.uk \
    --to=nix@esperi.org.uk \
    --cc=dtrace-devel@oss.oracle.com \
    --cc=dtrace@lists.linux.dev \
    --cc=kris.van.hees@oracle.com \
    /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.