Bug 353391 - script wastes quadratic time with /sys/block/sdX/sdXN/slaves
Summary: script wastes quadratic time with /sys/block/sdX/sdXN/slaves
Keywords:
Status: CLOSED DUPLICATE of bug 277271
Alias: None
Product: Fedora
Classification: Fedora
Component: mkinitrd
Version: rawhide
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Peter Jones
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-10-25 22:49 UTC by John Reiser
Modified: 2008-03-13 06:19 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-03-13 06:19:44 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
summarized strace output involving /sys/block/sdX/sdXN/slaves (6.87 KB, text/plain)
2007-10-25 22:51 UTC, John Reiser
no flags Details

Description John Reiser 2007-10-25 22:49:32 UTC
Description of problem: During a fresh installation from DVD, two shell scripts
each waste time quadratically in the number of partitions on each harddrive.  On
a box with three drives of (4, 7, 15} partitions, system calls such as
---
open("/sys/block/sdc/sdc15/slaves", O_RDONLY|O_NONBLOCK|O_DIRECTORY|0x80000) =
-1 ENOENT
---
 ccount for more than 1% of all system calls during the entire installation.


Version-Release number of selected component (if applicable):
anaconda-11.3.0.45-1


How reproducible: always


Steps to Reproduce:
1. Install on a box that has at least one drive with many partitions.
2. as soon as vtty2 is available:
strace -f -o '|gzip' -p <pid-of-anaconda>  > strace.out &
(you must supply strace on a USB flash drive before boot, and mount the device
yourself.)
3. inspect strace.out (63MB compressed, 1GB uncompressed) for: 
open("/sys/block/sdX/sdXN/slaves", ...) = -1 ENOENT.
  
Actual results: 142,718 such ENOENT when three drives of 4, 7, 15 partitions. 
(Output will be attached to this bz report.)  All calls come from two /sbin/nash
processes.  There are only 13,238,719 system calls in the whole install.  


Expected results: quadratic algorithms are not allowed when they exceed 1% of
the total effort.


Additional info:

Comment 1 John Reiser 2007-10-25 22:51:40 UTC
Created attachment 238151 [details]
summarized strace output involving /sys/block/sdX/sdXN/slaves

The columns are: count, pid, syscall from strace

Comment 2 Alexandre Oliva 2008-03-13 06:19:44 UTC

*** This bug has been marked as a duplicate of 277271 ***


Note You need to log in before you can comment on or make changes to this bug.