All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jan Beulich" <JBeulich@suse.com>
To: Wei Liu <wei.liu2@citrix.com>,
	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: George Dunlap <george.dunlap@eu.citrix.com>,
	Ian Jackson <Ian.Jackson@eu.citrix.com>,
	xen-devel@lists.xen.org
Subject: Re: RFC: removing hardcoded "modprobe blktap" in xencommons
Date: Mon, 15 Jul 2013 07:13:46 +0100	[thread overview]
Message-ID: <51E3AF3A02000078000E4CA8@nat28.tlf.novell.com> (raw)
In-Reply-To: <20130712180020.GB9829@phenom.dumpdata.com>

>>> On 12.07.13 at 20:00, Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> wrote:
> On Fri, Jul 12, 2013 at 05:12:55PM +0100, Wei Liu wrote:
>> Back before 4.3 release you complaint about the hardcoded modprobe for
>> blktap / blktap2 in xencommons script. I started to look into it this
>> week and tried to do this modprobe automatically in libxl (that's the
>> idea we discussed before 4.3 IIRC).

But you understand that the complaint isn't just about blktap, but
about _all_ of the modprobes there.

>> Unfortunately I didn't manage to find any canonical documents on how a
>> user space process can trigger a modprobe. I've looked at kernel
>> documentations and couldn't find any. Do you have any reference on how
>> to do that?
> 
> Ian and George talked to me on IRC about this. What we found (thanks for
> Greg KH's help) was that you can use 'MODULE_ALIAS("devname:XYZ")'.
> 
> If any user application did an fopen("/dev/XYZ") then said module would be
> automatically loaded.

This works only for drivers for devices with known major:minor, as
otherwise you have a chicken-and-egg problem between udev
needing a way to determine the major:minor pair to create the
/dev node, and the driver wanting to be loaded via udev rules.

Which particularly means that - afaict - drivers (like blktap) using
MISC_DYNAMIC_MINOR aren't suitable for this; I'll be happily
corrected if there nevertheless is a way...

Yet I don't see why this would be needed for backends anyway:
The tool stack knows which backend it needs, and hence can
modprobe its xen-backend:* alias easily enough (i.e. still without
knowing the actual module name).

Jan

  parent reply	other threads:[~2013-07-15  6:13 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-12 16:12 RFC: removing hardcoded "modprobe blktap" in xencommons Wei Liu
2013-07-12 18:00 ` Konrad Rzeszutek Wilk
2013-07-13 17:05   ` Wei Liu
2013-07-15  6:13   ` Jan Beulich [this message]
2013-07-15  6:06 ` Jan Beulich
2013-07-15  7:33   ` Wei Liu
2013-07-15  7:44     ` Jan Beulich
2013-07-15  8:26       ` Wei Liu
2013-07-15  9:34         ` Jan Beulich
2013-07-15  9:38           ` Wei Liu
2013-07-15 14:08             ` George Dunlap
2013-07-15 14:13               ` Jan Beulich
2013-07-17 11:16               ` Ian Jackson
2013-07-18  7:31                 ` Wei Liu
2013-07-18  8:43                   ` George Dunlap
2013-07-18 11:12                     ` Ian Jackson
2013-08-01 13:27                       ` Wei Liu
2013-08-07 15:16                         ` Ian Jackson

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=51E3AF3A02000078000E4CA8@nat28.tlf.novell.com \
    --to=jbeulich@suse.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=george.dunlap@eu.citrix.com \
    --cc=konrad.wilk@oracle.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xen.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.