linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: Persistent module storage [was Linux 2.4 Status / TODO page]
@ 2000-11-07  7:55 David Feuer
  0 siblings, 0 replies; 113+ messages in thread
From: David Feuer @ 2000-11-07  7:55 UTC (permalink / raw)
  To: linux-kernel

I've seen the same arguments over and over again here.  It seems that there 
are two feasible ways to accomplish persistence:  totally kernel and 
totally user-space

The totally kernel-space people want to make a way for modules to store 
persistent data, either in memory, or across boots on disk.  These people 
seem to debate whether modules should be unloaded/loaded upon suspend/resume.

Among the user-space people, there are some who want the status quo, where 
the driver initializes the card, and then a user proggy sets it up the way 
it really should be, which causes the gap problem.

There was also a suggestion (which sounded pretty interesting) where the 
driver would not initialize the card until prompted to do so by a 
user-space program, which would also give it the correct settings.  It 
seems that the big problem with this is that the card may not get 
initialized when it needs to be.  The initialization/state-saver proggy may 
have to be called: on boot, on suspend, on restore, when the hardware is 
physically removed and replaced, when something goes wrong and the user 
wants to reset things, and on shutdown.

I just wanted to try to get all the arguments together on one page.  I hope 
I didn't miss anything, or make any big mistakes.  My own guess is that the 
first option is the most reliable, and that the last one is the most flexible.
--
This message has been brought to you by the letter alpha and the number pi.
David Feuer
David_Feuer@brown.edu

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 113+ messages in thread
* Re: Persistent module storage [was Linux 2.4 Status / TODO page]
@ 2000-11-06 22:48 Wayne.Brown
  0 siblings, 0 replies; 113+ messages in thread
From: Wayne.Brown @ 2000-11-06 22:48 UTC (permalink / raw)
  Cc: Alan Cox, James A. Sutherland, David Woodhouse, Jeff Garzik,
	Dan Hollis, Alan Cox, Oliver Xymoron, Keith Owens, linux-kernel



This sounds to me like the most flexible way to do it.  If the module accepts
parameters then those who want the sound card initialized at every load can put
the desired settings in modules.conf.  The rest of us can just initialize it
once at boot time and the rest of the time the settings will be left untouched.





James A.Sutherland <jas88@cam.ac.uk> on 11/06/2000 11:38:44 AM

To:   Alan Cox <alan@lxorguk.ukuu.org.uk>, jas88@cam.ac.uk (James A. Sutherland)
cc:   dwmw2@infradead.org (David Woodhouse), jgarzik@mandrakesoft.com (Jeff
      Garzik), goemon@anime.net (Dan Hollis), alan@lxorguk.ukuu.org.uk (Alan
      Cox), oxymoron@waste.org (Oliver Xymoron), kaos@ocs.com.au (Keith Owens),
      linux-kernel@vger.kernel.org (bcc: Wayne Brown/Corporate/Altec)

Subject:  Re: Persistent module storage [was Linux 2.4 Status / TODO page]



On Mon, 06 Nov 2000, Alan Cox wrote:
> > So autoload the module with a "dont_screw_with_mixer" option. When the
kernel
> > first boots, initialise the mixer to suitable settings (load the module with
> > "do_screw_with_mixer" or whatever); thereafter, the driver shouldn't change
> > the mixer settings on load.
>
> Which is part of what persistent module data lets you do. And without having
> to mess with dont_screw_with_mixer (which if you get it wrong btw can be
> fatal and hang the hardware)

Eh? You just load the driver once, probably on boot, to configure sane values.
This time round, you use an argument (or an ioctl or whatever) to specify the
values you want. (cat /etc/sysconfig/sound/defaultvolume > /dev/sound/mixer or
whatever). After that, the module can be unloaded and loaded as needed, without
any need to touch the mixer settings except in response to *explicit* "set
volume" commands from userspace.


James.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/





-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 113+ messages in thread
* Re: Linux 2.4 Status / TODO page (Updated as of 2.4.0-test10)
@ 2000-11-06  0:54 David Woodhouse
  2000-11-06  1:28 ` Persistent module storage [was Linux 2.4 Status / TODO page] Keith Owens
  0 siblings, 1 reply; 113+ messages in thread
From: David Woodhouse @ 2000-11-06  0:54 UTC (permalink / raw)
  To: Keith Owens; +Cc: linux-kernel

On Mon, 6 Nov 2000, Keith Owens wrote:

> I'm not sure why you think this can be used for module persistent
> storage.  If a module calls inter_module_register() on load, it should
> call inter_module_unregister() on unload.  All the registered data
> points into the loaded module, remove the module and the storage
> disappears as well.

You can kmalloc() both the im_name and userdata arguments to
inter_module_register and you ought to be able to pass NULL as the owner.

-- 
dwmw2


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 113+ messages in thread

end of thread, other threads:[~2000-11-08 14:56 UTC | newest]

Thread overview: 113+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <3A06A053.56F09ACB@mandrakesoft.com>
2000-11-06 12:29 ` Persistent module storage [was Linux 2.4 Status / TODO page] Keith Owens
2000-11-06 17:07   ` Alan Cox
2000-11-06 18:09     ` Martin Dalecki
2000-11-06 17:30       ` Alan Cox
2000-11-06 17:05 ` Alan Cox
2000-11-06 18:30   ` Paul Jakma
2000-11-06 21:12   ` Martin Mares
2000-11-07  1:17     ` Horst von Brand
2000-11-07  9:59       ` Martin Mares
2000-11-07 10:59     ` Martin Dalecki
2000-11-07 12:27       ` Alan Cox
2000-11-07  7:55 David Feuer
  -- strict thread matches above, loose matches on Subject: below --
2000-11-06 22:48 Wayne.Brown
2000-11-06  0:54 Linux 2.4 Status / TODO page (Updated as of 2.4.0-test10) David Woodhouse
2000-11-06  1:28 ` Persistent module storage [was Linux 2.4 Status / TODO page] Keith Owens
2000-11-06  6:39   ` David Woodhouse
2000-11-06  7:12   ` Oliver Xymoron
2000-11-06  7:17     ` David Woodhouse
2000-11-06  7:25       ` Jeff Garzik
2000-11-06  7:29         ` David Woodhouse
2000-11-06 10:53         ` Alan Cox
2000-11-06 11:03           ` Dan Hollis
2000-11-06 11:04             ` Jeff Garzik
2000-11-06 11:35               ` Alan Cox
2000-11-06 11:36                 ` Jeff Garzik
2000-11-06 11:06             ` David Woodhouse
2000-11-06 11:09               ` Jeff Garzik
2000-11-06 11:20               ` Jeff Garzik
2000-11-06 11:37               ` David Woodhouse
2000-11-06 11:40                 ` Jeff Garzik
2000-11-06 11:47                 ` David Woodhouse
2000-11-06 11:57                   ` Jeff Garzik
2000-11-06 12:03                     ` Alan Cox
2000-11-06 13:12                   ` David Woodhouse
2000-11-06 13:38                     ` Jeff Garzik
2000-11-06 13:56                     ` David Woodhouse
2000-11-06 13:21                   ` David Woodhouse
2000-11-06 13:35                   ` James A. Sutherland
2000-11-06 17:12                     ` Alan Cox
2000-11-06 17:38                       ` James A. Sutherland
2000-11-06 18:39                       ` Paul Jakma
2000-11-06 21:28                         ` Alan Cox
2000-11-06 18:55                     ` Dan Hollis
2000-11-07  0:18                       ` James A. Sutherland
2000-11-07  0:27                         ` Alan Cox
2000-11-07  0:38                           ` James A. Sutherland
2000-11-07 12:07                             ` Alan Cox
2000-11-07 12:13                               ` James A. Sutherland
2000-11-07 12:35                                 ` Alan Cox
2000-11-07 12:49                                   ` James A. Sutherland
2000-11-07 12:52                                     ` Alan Cox
2000-11-07 12:51                                   ` Petko Manolov
2000-11-06 13:40                   ` David Woodhouse
2000-11-06 15:23                     ` James A. Sutherland
2000-11-06 15:34                     ` David Woodhouse
2000-11-06 16:31                       ` Horst von Brand
2000-11-06 17:06                         ` David Woodhouse
2000-11-06 17:25                           ` Alon Ziv
2000-11-06 17:34                             ` Alan Cox
2000-11-06 19:49                               ` Rogier Wolff
2000-11-06 21:34                                 ` Alan Cox
2000-11-06 17:25                           ` David Woodhouse
2000-11-06 19:27                             ` Tim Riker
2000-11-06 21:33                               ` Alan Cox
2000-11-06 23:57                           ` Horst von Brand
2000-11-06 17:23                         ` Alan Cox
2000-11-08 14:56                           ` Jamie Lokier
2000-11-06 18:00                         ` Martin Dalecki
2000-11-06 17:29                           ` Alan Cox
2000-11-06 16:42                       ` James A. Sutherland
2000-11-06 16:57                         ` Horst von Brand
2000-11-06 17:01                           ` James A. Sutherland
2000-11-06 23:54                             ` Horst von Brand
2000-11-07  8:44                               ` James A. Sutherland
2000-11-06 17:12                           ` David Woodhouse
2000-11-06 17:45                             ` James A. Sutherland
2000-11-06 18:37                             ` Paul Jakma
2000-11-07  0:04                             ` Horst von Brand
2000-11-06 17:08                       ` David Woodhouse
2000-11-06 17:33                         ` James A. Sutherland
2000-11-06 23:28                           ` Gerhard Mack
2000-11-07  0:34                             ` James A. Sutherland
2000-11-07  0:42                               ` Gerhard Mack
2000-11-07  0:43                                 ` James A. Sutherland
2000-11-07  1:20                                   ` Gerhard Mack
2000-11-07  8:41                                     ` James A. Sutherland
2000-11-07  1:44                               ` Horst von Brand
2000-11-06 17:44                         ` David Woodhouse
2000-11-06 17:53                           ` James A. Sutherland
2000-11-06 20:46                             ` Evan Jeffrey
2000-11-07  0:23                               ` James A. Sutherland
2000-11-06 15:15                 ` Martin Dalecki
2000-11-06 17:19                   ` Alan Cox
2000-11-06 17:34                     ` David Woodhouse
2000-11-06 18:22                       ` Oliver Xymoron
2000-11-06 18:37                         ` Jeff Garzik
2000-11-06 19:09                           ` Oliver Xymoron
2000-11-07  0:32                             ` Horst von Brand
2000-11-06 21:19                           ` Alan Cox
2000-11-06 18:22                 ` Paul Jakma
2000-11-06 21:18                   ` Alan Cox
2000-11-06 23:00                     ` Paul Jakma
2000-11-07  2:11                       ` Keith Owens
2000-11-06  7:28       ` Oliver Xymoron
2000-11-06  7:32         ` David Woodhouse
2000-11-06  7:45           ` Jeff Garzik
2000-11-06  8:00             ` David Woodhouse
2000-11-06 13:44               ` Andrew Pimlott
2000-11-06  7:48           ` Oliver Xymoron
2000-11-06  8:02             ` David Woodhouse
2000-11-06 18:09               ` Eric W. Biederman
2000-11-06 21:17                 ` Alan Cox
2000-11-07  9:55                   ` Helge Hafting
2000-11-07  2:09                 ` Keith Owens

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).