[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: speedup device flushing with devfs

From: David Schweikert
Subject: Re: speedup device flushing with devfs
Date: Sun, 15 Dec 2002 10:22:58 +0100
User-agent: Mutt/1.4i

On Sun, Dec 15, 2002 at 10:06:53 +1100, Andrew Clausen wrote:
> > I made a strace and I did see that parted does try to open
> > part1, part2, ... part15, in that directory, which in turn triggers
> > devfs module probing.
> Hmmm.  What kind of module probing?  Rescanning the partition table?
> (I don't have devfs here...)

My Debian-default modules.conf has:

alias /dev/ide/host*/bus*/target*/lun*/*        /dev/ide
probeall  /dev/ide              ide-probe-mod ide-disk ide-cd ide-tape 

It means every time you try to open for example
/dev/ide/host0/bus0/target0/lun0/partN then it will try to load
ide-probe-mod ide-disk ide-cd ide-tape ide-floppy, which I guess in turn
probe the hardware to see if it is installed. All of this takes a lot of

> > With the following simple patch, the time required is down to 0.05
> > seconds. Is this a good thing or am I going to destroy my disks?
> Why not structure the loop around scanning the directory, rather than
> around iterating through partition numbers?

Being not so confident with the code, I didn't want to change the
behaviour for non-devfs installations. I also wanted to be able to
use _device_get_part_path, etc. The cost of scanning the directory
15 times is really low in any case, so I think that the code as is more
readable and not really unoptimal.


  __| |___   David Schweikert <address@hidden>
 / _` / __|  IT Support Group, D-ITET, ETH-Zurich
| (_| \__ \  Tel: +41(0)1-6327019  Room: ETL F24.1
 \__,_|___/  http://people.ee.ethz.ch/~dws/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]