[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v10 5/8] module: implement module loading
From: |
Fam Zheng |
Subject: |
Re: [Qemu-devel] [PATCH v10 5/8] module: implement module loading |
Date: |
Tue, 17 Sep 2013 14:40:36 +0800 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Tue, 09/17 07:33, Alex Bligh wrote:
>
> On 17 Sep 2013, at 06:55, Fam Zheng wrote:
>
> >>>
> >>> I think I'd just have one flat list
> >>> of modules to load and ditch these MODULE_LOAD_XXXX enums.
> >>
> >> Question is how to deal with qemu vs. qemu-img then. qemu needs
> >> everything and qemu-img needs the block drivers only (and loading
> >> something else probably doesn't work due to unresolved symbols).
> >>
> >
> > With lazy symbol binding (G_MODULE_BIND_LAZY), we can just load all the
> > modules, and wait for subsystem to call module_call_init(MODULE_INIT_*),
> > where
> > the symbols are resolved. As qemu-img.c doesn't init ui, net, it's not a
> > problem to load them ahead.
>
> Why not have one list per executable you build? You know at compile
> time what modules each executable could load. This seems better
> than putting the logic in and run time and having different types
> of modules etc.
>
> One reason to avoid qemu-img (for instance) loading everything (if
> it's present) is init time. I agree dlopen()'ing something that
> never gets called should not eat too much RAM but it seems pointless.
>
OK, good point.
Fam
Re: [Qemu-devel] [PATCH v10 5/8] module: implement module loading, Daniel P. Berrange, 2013/09/16
[Qemu-devel] [PATCH v10 6/8] Makefile: install modules with "make install", Fam Zheng, 2013/09/16
[Qemu-devel] [PATCH v10 7/8] .gitignore: ignore module related files (dll, so, mo), Fam Zheng, 2013/09/16
[Qemu-devel] [PATCH v10 8/8] block: convert block drivers linked with libs to modules, Fam Zheng, 2013/09/16