Subject: Re: LKM support for many filesystems as well as compat_freebsd
To: None <tech-kern@NetBSD.ORG>
From: Guenther Grau <s_grau@ira.uka.de>
List: tech-kern
Date: 08/12/1996 21:33:49
Hi,

> [more than 1 function in a loadable module]
> 
> > Does anyone have any suggestions on how to extend the lkm interface
> > to make things work better for this sort of thing, without hacks?
> 
> I have an extended LKM interface, supporting exactly this, running
> for some months.
> In principle, the "_module" structure is replaced by an array of
> such structures.
> The initialization looks a bit ugly, eg
> ---------------------
> MOD_DRV(ottodrv, &ottocftable, "pci")
> MOD_DEV(ottodev, LM_DT_CHAR, -1, &ottosw)
> 
> BEGIN_MODFUNCS(otto)
> USE_MODFUNC(ottodrv)
> USE_MODFUNC(ottodev)
> END_MODFUNCS
> ---------------------
> However, it is at least a try...

I remember the you presented this extended interface, but I cannot
remember any discussion about it. Anybody from core or anybody else
of the developers out there available for a comment on this interface.
I know you are all busy preparing the release, but I consider support
for loadable modules, a new revamped vm-handling and support for 
multiprocessor machines the three main topic to work on for 1.3,
which would better be called 2.0, because of the large internal changes
involved.

> I'm still not very sure about error handling - what to
> do if one of the submodules cannot initialized or
> de-initialized properly. Also, there is the unsolved
> problem of module cross-dependencies.

I know that the linux sources are no reference implementation, but
did you have a look at their interface? How do they handle these
cases? What about FreeBSD? I don't know anything about their support
for LKMs. Just wanted to know the alternatives to see if they are
good or if they also need improvement.

Just my $0.02,

  Guenther