Bug 353391 - script wastes quadratic time with /sys/block/sdX/sdXN/slaves
script wastes quadratic time with /sys/block/sdX/sdXN/slaves
Status: CLOSED DUPLICATE of bug 277271
Product: Fedora
Classification: Fedora
Component: mkinitrd (Show other bugs)
rawhide
All Linux
low Severity low
: ---
: ---
Assigned To: Peter Jones
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-10-25 18:49 EDT by John Reiser
Modified: 2008-03-13 02:19 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-03-13 02:19:44 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description John Reiser 2007-10-25 18:49:32 EDT
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 18:51:40 EDT
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 02:19:44 EDT

*** 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.