All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	Will Deacon <will@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	K <prasad@linux.vnet.ibm.com>,
	Masami Hiramatsu <mhiramat@kernel.org>,
	rostedt <rostedt@goodmis.org>,
	Alexei Starovoitov <ast@kernel.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Tejun Heo <tj@kernel.org>
Subject: Re: [RFC PATCH 8/9] block: genhd: export-GPL generic disk device type
Date: Fri, 10 Apr 2020 09:31:59 -0400 (EDT)	[thread overview]
Message-ID: <1077145172.30265.1586525519875.JavaMail.zimbra@efficios.com> (raw)
In-Reply-To: <20200410063357.GA1663942@kroah.com>

----- On Apr 10, 2020, at 2:33 AM, Greg Kroah-Hartman gregkh@linuxfoundation.org wrote:

> On Thu, Apr 09, 2020 at 03:35:42PM -0400, Mathieu Desnoyers wrote:
>> Iteration on class devices is exported for use by GPL modules, but
>> there is no exported function for getting the generic disk device type
>> which is required to perform iteration on the generic disks.
>> 
>> Export a new getter for disk device type for use by GPL modules. This is
>> useful for tracing a meaningful list of block devices from tracers
>> implemented as GPL modules.
>> 
>> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
>> Cc: Tejun Heo <tj@kernel.org>
>> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>> Cc: Thomas Gleixner <tglx@linutronix.de>
>> ---
>>  block/genhd.c         | 9 +++++++++
>>  include/linux/genhd.h | 2 ++
>>  2 files changed, 11 insertions(+)
> 
> I understand your need here, however we do not export things for
> modules, when there are no in-kernel module users, sorry.
> 
> I have your last thread somewhere in my todo pile, to try to respond as
> to how to make this not be an issue for you, sorry I haven't gotten to
> it.

Thanks for taking time to look into this.

Unfortunately, having commit 0bd476e6c6 "kallsyms: unexport kallsyms_lookup_name()
and kallsyms_on_each_symbol()" now merged into mainline before that discussion
was completed now makes it an immediate issue. I would have preferred to have more
time to discuss the possible solutions before seeing that commit upstream.

> Why can't you just add a tracepoint instead of having to dig through
> this mess?  Wouldn't that solve a lot of these issues for block devices?

The problem here is that it's not something which can be exported with "just"
a tracepoint. This is really a "kernel state dumping" facility meant to be
used by kernel tracers. We can indeed use tracepoints as data-export hooking
mechanism (I actually do this already within the LTTng statedump module), but
we need a function symbol which can be called by the tracer to trigger a dump
of the relevant kernel data structures.

I'm very much open to contribute any parts of the LTTng statedump facility
to the kernel, but last time this was discussed (a few years ago), I recall
that dumping kernel state was not deemed useful for the use-cases targeted
by perf and ftrace maintainers. But maybe the situation has changed now ?

For LTTng, this statedump facility is the underlying foundation which allows
doing stateful analyses at post-processing.

Thanks,

Mathieu

-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com

  reply	other threads:[~2020-04-10 13:32 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-09 19:35 [RFC PATCH 0/9] Export information needed by the LTTng kernel tracer Mathieu Desnoyers
2020-04-09 19:35 ` [RFC PATCH 1/9] tracepoint: call vmalloc_sync_mappings() on registration Mathieu Desnoyers
2020-04-09 19:35 ` [RFC PATCH 2/9] bpf: allow up to 13 arguments for tracepoints Mathieu Desnoyers
2020-04-09 19:35 ` [RFC PATCH 3/9] writeback: tracing: pass global_wb_domain as tracepoint parameter Mathieu Desnoyers
2020-04-09 22:33   ` Alexei Starovoitov
2020-04-10 11:54     ` Mathieu Desnoyers
2020-04-09 19:35 ` [RFC PATCH 4/9] stacktrace: export-GPL stack_trace_save_user Mathieu Desnoyers
2020-04-12  8:31   ` Christoph Hellwig
2020-04-09 19:35 ` [RFC PATCH 5/9] sched: export-GPL task_prio Mathieu Desnoyers
2020-04-09 19:35 ` [RFC PATCH 6/9] mm: export-GPL get_pageblock_migratetype Mathieu Desnoyers
2020-04-12  8:14   ` Christoph Hellwig
2020-04-09 19:35 ` [RFC PATCH 7/9] block: genhd: export-GPL gendisk_name Mathieu Desnoyers
2020-04-09 19:35 ` [RFC PATCH 8/9] block: genhd: export-GPL generic disk device type Mathieu Desnoyers
2020-04-10  6:33   ` Greg Kroah-Hartman
2020-04-10 13:31     ` Mathieu Desnoyers [this message]
2020-04-10 15:44     ` Steven Rostedt
2020-04-11  6:45       ` Greg Kroah-Hartman
2020-04-09 19:35 ` [RFC PATCH 9/9] block: genhd: export-GPL generic disk block class Mathieu Desnoyers

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=1077145172.30265.1586525519875.JavaMail.zimbra@efficios.com \
    --to=mathieu.desnoyers@efficios.com \
    --cc=akpm@linux-foundation.org \
    --cc=ast@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mhiramat@kernel.org \
    --cc=prasad@linux.vnet.ibm.com \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    --cc=tj@kernel.org \
    --cc=will@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.