-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Denys Vlasenko wrote: >> Actually, the problem seems to be in the close() and open() calls >> for the floppy drive. open takes about 40 seconds and close takes a bit >> more than a minute. > > No, the second long one is read, not close. close is ~instantaneous:
Oh, you're right, sorry. > I don't have floppy at hand, I need you to do some testing. Me neither, that's why I'm having the problem :) > time N probing /dev/fd0 > time N opened the device > time N+LOTS did FDGETDRVTYP, result NN [testlxtc1 - /system #] ./a.out time 1234966094 probing /dev/fd0 time 1234966094 probing /dev/fd1 time 1234966094 probing /dev/fd2 time 1234966094 probing /dev/fd3 time 1234966094 probing /dev/fd4 time 1234966094 probing /dev/fd5 time 1234966094 probing /dev/fd6 time 1234966094 probing /dev/fd7 No opening at all here. > Basically, I want an ioctl which quickly tells me whether > disk is inserted at all. Or if the floppy drive is available at all. The funny thing is, that neither my Thinkpad T4[23] notebooks nor my thinclients actually _HAVE_ a floppy drive. It's just that on these two models, blkid takes ages to complete. On the T42 notebooks I could work around that by simply adding the optional kernel parameter floppy=thinkpad (although there is no floppy drive present) and it worked then. On the thinclients, I'm still struggling to speed things up. I did some testing on my own inspired by your suggestions in the meantime. If I add O_NONBLOCK to the open() call in get_devname.c, I achieve another improvement of about 40 seconds (1m17s currently). And, I did run GNU blkid again and checked the strace output just to find out that they don't even query the floppy devices at all (not even on my desktop system here). Is that probably the difference? ciao, - -- Alexander Griesser (Netzwerkadministration) E-Mail: [email protected] | Web: http://www.lkh-vil.or.at KABEG LKH Villach | Nikolaigasse 43 | 9500 Villach Tel.: +43 4242 208 3061 | Fax.: +43 4242 208 971 2061 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkmcGhMACgkQ66HVD6KUm1rgRQCeMqab7xQ4Y7hi1/u8RGv63aB3 C+wAoKORqT3ovry3gyi2e6yzpdGsRHqT =OX92 -----END PGP SIGNATURE----- _______________________________________________ busybox mailing list [email protected] http://lists.busybox.net/mailman/listinfo/busybox
