linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mark Lord <liml@rtr.ca>
To: Thanos Kyritsis <djart@linux.gr>
Cc: linux-ide@vger.kernel.org,
	Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Subject: Re: [PROBLEM]: hdparm strange behaviour for 2.6.21 and later
Date: Mon, 18 Jun 2007 16:01:02 -0400	[thread overview]
Message-ID: <4676E47E.5050209@rtr.ca> (raw)
In-Reply-To: <200706161958.05313.djart@linux.gr>

Thanos Kyritsis wrote:
> Hello,
> 
> starting with kernel 2.6.21 and up to kernel 2.6.22-rc4, I'm having the 
> following problem:
> 
> /etc/rc.d/rc.local contains the following:
> /usr/sbin/hdparm -q -d1 -q -u1 -q -c1 -q -k1 /dev/hda
> /usr/sbin/hdparm -q -d1 -q -u1 -q -c1 -q -k1 /dev/hdb
> /usr/sbin/hdparm -q -d1 -q -u1 -q -c1 -q -k1 /dev/hdc
> /usr/sbin/hdparm -q -d1 -q -u1 -q -c1 -q -k1 /dev/hdd
> 
> (I'm using Slackware, no Debian-style automated hdparm.conf is running 
> during bootup, that's why these are in rc.local)
> 
> The above seem to somehow lock up the boot procedure just at the point 
> where rc.local gets executed, so the system never reaches login prompt.
> All drivers (kernelspace) and system daemons (userspace) before rc.local 
> do normally load, but there are no strange messages in the console or in 
> the system logs and because I cannot login, I cannot trace it any further. 
> I believe the kernel is in running state because the machine responds to 
> ICMP pings from the ethernet, but since the login prompt is not up, the 
> already running sshd/telnetd do not provide any help.
> 
> The strange thing is that if I remove all the quiet options (-q) from the 
> above commands, everything works like it should. Furthermore, if I 
> comment them out from rc.local, then boot, login, and execute them by 
> hand (with -q), again everything works like it should. Lockup only happens if 
> I run 2 or more hdparm commands, if I leave only one (doesn't matter 
> which one) hdparm command in rc.local (with -q), it works.

Sounds like a (kernel) timing issue.
The "-q" option gets rid of some intermediary printf's,
and nothing else.  So with -q, the ioctl() calls happen
much closer together in time.  Without -q, the intermediary
printf's likely cause a resched, giving the kernel more time
to complete anything left over from the earlier call.

????

Any difference with a modern version of hdparm?

-ml

  reply	other threads:[~2007-06-18 20:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-16 16:58 [PROBLEM]: hdparm strange behaviour for 2.6.21 and later Thanos Kyritsis
2007-06-18 20:01 ` Mark Lord [this message]
2007-06-20 15:07   ` Thanos Kyritsis
2007-06-23 18:28     ` Bartlomiej Zolnierkiewicz
2007-06-24 17:47       ` Thanos Kyritsis
2007-06-27 19:46         ` PREEMPT bug? (was: Re: [PROBLEM]: hdparm strange behaviour for 2.6.21 and later) Bartlomiej Zolnierkiewicz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4676E47E.5050209@rtr.ca \
    --to=liml@rtr.ca \
    --cc=bzolnier@gmail.com \
    --cc=djart@linux.gr \
    --cc=linux-ide@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).