Re: The necessity of running depmod at boot time

2006-05-25 Thread Clifford Beshers




Joey Hess wrote:

  Marco d'Itri wrote:
  
  
If we can agree that it's not needed anymore (i.e. mandate by policy
that packages need to run depmod on their own) then I will be happy to
remove it from the m-i-t init script.

  
  
A while back Debian would only run depmod on boot if it had not been run
before since the last kernel upgrade. Could you refresh my memory about
why that optimisation was dropped?
  

I don't believe that it was. Looking at the code in sid, I see a call
to 'depmod --quick'. That is supposed to compare timestamps on files
to determine if depmod needs to be run in full. Presumably then, you
should get at most one boot that runs depmod after a kernel change, but
it sounds like Margarita is seeing a full run of depmod every time.

We saw that in Linspire at one point, but I had thought it was
something we had introduced, not inherited. There were two entities
that were making sure things were up-to-date, and the second one was
modifying files on every boot after depmod had gone around and
regenerated everything, creating a vicious circle.

If that is happening, then you may find that the 'depmod --quick' is
fine once that is fixed.





Re: The necessity of running depmod at boot time

2006-05-19 Thread Joey Hess
Marco d'Itri wrote:
 I think because depmod --quick is supposed to be about as fast as find.

YM as fast as test -nt? Doesn't seem to be on a dry cache.

-- 
see shy jo


signature.asc
Description: Digital signature


Re: The necessity of running depmod at boot time

2006-05-19 Thread Marco d'Itri
On May 19, Joey Hess [EMAIL PROTECTED] wrote:

 Marco d'Itri wrote:
  I think because depmod --quick is supposed to be about as fast as find.
 YM as fast as test -nt? Doesn't seem to be on a dry cache.
No, I really meant as fast as find. Which other test do you suggest?

-- 
ciao,
Marco


signature.asc
Description: Digital signature


Re: The necessity of running depmod at boot time

2006-05-19 Thread Steinar H. Gunderson
On Thu, May 18, 2006 at 07:21:33PM -0300, Margarita Manterola wrote:
 Continuing on the goal of optimizing boot time, quite a number of
 seconds (specially in old machines) can be saved by not running depmod
 at boot time.
 
 Currently it is run by these packages' postinst:

Wouldn't it be a good idea to list the packages running depmod in their
_init_ scripts? Currently, you're listing packages which seem to do the right
thing, not the wrong thing.

/* Steinar */
-- 
Homepage: http://www.sesse.net/


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: The necessity of running depmod at boot time

2006-05-18 Thread Marco d'Itri
On May 19, Margarita Manterola [EMAIL PROTECTED] wrote:

 Continuing on the goal of optimizing boot time, quite a number of
 seconds (specially in old machines) can be saved by not running depmod
 at boot time.
If we can agree that it's not needed anymore (i.e. mandate by policy
that packages need to run depmod on their own) then I will be happy to
remove it from the m-i-t init script.

-- 
ciao,
Marco


signature.asc
Description: Digital signature


Re: The necessity of running depmod at boot time

2006-05-18 Thread Mike Hommey
On Thu, May 18, 2006 at 07:21:33PM -0300, Margarita Manterola [EMAIL 
PROTECTED] wrote:
 Continuing on the goal of optimizing boot time, quite a number of
 seconds (specially in old machines) can be saved by not running depmod
 at boot time.
(...)
 It looks like it's quite safe to stop running depmod during boot time,
 since both new kernels and new modules run it at install time.  If
 there are modules that don't run depmod on installation, they should
 do it.
 
 Opinions about this are welcome.

Last time I took a look to that boot depmod, it was supposed to be
launched by the script only if necessary, but for some reason, just was
launched at every single boot. Never figured out why, and forgot to file
a bug.

Mike


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: The necessity of running depmod at boot time

2006-05-18 Thread Joey Hess
Marco d'Itri wrote:
 If we can agree that it's not needed anymore (i.e. mandate by policy
 that packages need to run depmod on their own) then I will be happy to
 remove it from the m-i-t init script.

A while back Debian would only run depmod on boot if it had not been run
before since the last kernel upgrade. Could you refresh my memory about
why that optimisation was dropped?

-- 
see shy jo


signature.asc
Description: Digital signature


Re: The necessity of running depmod at boot time

2006-05-18 Thread Jeroen van Wolffelaar
On Thu, May 18, 2006 at 07:21:33PM -0300, Margarita Manterola wrote:
 Continuing on the goal of optimizing boot time, quite a number of
 seconds (specially in old machines) can be saved by not running depmod
 at boot time.
 
 Currently it is run by these packages' postinst:
 * [long list]
 
 It looks like it's quite safe to stop running depmod during boot time,
 since both new kernels and new modules run it at install time.  If
 there are modules that don't run depmod on installation, they should
 do it.

I think one of the issues here is that it depends on what kernel you
currently use, and iirc there can be a situation where one does not
want to run depmod at installation time, or when that might give wrong
results.

What I think would be best is to have every packages that now requires
running depmod at boot time, will touch a file in
/lib/modules/kernel-api when it has changed the kernel (or modules)
significantly so that it is needed to be run, and at boot time only run
depmod if that touched file exists (and have the file removed after
having run depmod succesfully).

This way, depmod at boot is only run after changes in kernel or modules
once for each given kernel API that's booted.

If the package code in each package for this (for the bit to
conditionally run depmod at installation time too) is not trivial, it
might be worth having a bit about this in some dh_* script, so that the
code in question is only written once. I'm not sure here though, I don't
think it's needed as the majority of the code can be in the package
providing depmod.

--Jeroen

-- 
Jeroen van Wolffelaar
[EMAIL PROTECTED] (also for Jabber  MSN; ICQ: 33944357)
http://Jeroen.A-Eskwadraat.nl


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: The necessity of running depmod at boot time

2006-05-18 Thread Joey Hess
Margarita Manterola wrote:
 Currently it is run by these packages' postinst:
 * kernel/linux-image-*

This takes care to run depmod -F system.map version,
which should make the depmod work even though that kernel isn't running yet.

 * pwc-modules-*
 * ndiswrapper-modules-*
 * linux-wlan-ng-modules-*
 * spca5xx-modules-*
 * kernel-pcmcia-modules-*
 * hostap-modules-*
 * alsa-modules-*
 * pwc-modules-*
 * linux-wlan-ng-modules-*
 * ieee80211softmac-modules-*
 * misdn-modules-*
 * unionfs-modules-*

I've checked a few of these as well as dh_installmodules and none I've
checked bother with -F or the kernel version, so installing a new version
of the kernel, and then third party modules that use it, then rebooting
into the new kernel, will not make the modules available if the depmod
on boot is not run at least the first time booting a new kernel.

Of course, all of these could be fixed to run depmod correctly, although
adding that to dh_installmodules will require some way to determine the
kernel version the modules are built for.

-- 
see shy jo


signature.asc
Description: Digital signature


Re: The necessity of running depmod at boot time

2006-05-18 Thread Joey Hess
Jeroen van Wolffelaar wrote:
 I think one of the issues here is that it depends on what kernel you
 currently use, and iirc there can be a situation where one does not
 want to run depmod at installation time, or when that might give wrong
 results.

FWIW, d-i currently runs depmod at image build time, when a different
kernel is generally running than the one on the image being built, and
we've not had any problems with it since at least the sarge release.
IIRC there were some bugs with it a few years ago.

-- 
see shy jo


signature.asc
Description: Digital signature


Re: The necessity of running depmod at boot time

2006-05-18 Thread Marco d'Itri
On May 19, Joey Hess [EMAIL PROTECTED] wrote:

 A while back Debian would only run depmod on boot if it had not been run
 before since the last kernel upgrade. Could you refresh my memory about
 why that optimisation was dropped?
I think because depmod --quick is supposed to be about as fast as find.

A second reason for which I would like to remove the depmod call is that
-w does not actually work to test if / is mounted read only, so to fix
the script I would need to touch /lib/modules at every boot (#358239).

-- 
ciao,
Marco


signature.asc
Description: Digital signature


Re: The necessity of running depmod at boot time

2006-05-18 Thread Goswin von Brederlow
Jeroen van Wolffelaar [EMAIL PROTECTED] writes:

 I think one of the issues here is that it depends on what kernel you
 currently use, and iirc there can be a situation where one does not
 want to run depmod at installation time, or when that might give wrong
 results.

That used to be the case but for a while now that has been fixed. It
is just a matter of having all packages call depmod properly. (see
other mails).

MfG
Goswin


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]