All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
To: Anders Eriksson <aeriksson@fastmail.fm>
Cc: Jeff Garzik <jeff@garzik.org>,
	linux-kernel@vger.kernel.org,
	Linux IDE mailing list <linux-ide@vger.kernel.org>,
	Jens Axboe <jens.axboe@oracle.com>
Subject: Re: -rc3 regression (was Re: 2.6.25-rc2 + smartd = hang )
Date: Tue, 4 Mar 2008 23:46:21 +0100	[thread overview]
Message-ID: <200803042346.21403.bzolnier@gmail.com> (raw)
In-Reply-To: <20080304095701.DDF762DC027@tippex.mynet.homeunix.org>


Hi,

On Tuesday 04 March 2008, Anders Eriksson wrote:
> 
> bzolnier@gmail.com said:
> >> On Tuesday 04 March 2008, Bartlomiej Zolnierkiewicz wrote:
> >> Untested patch which may help in case that set_pio_mode() raced with
> >> the queueing of the special request and block layer doesn't call
> >> ->request_fn_proc again if we were preempted previously (if PREEMPT=y).
> 
> > I need some sleep...  this patch is not going to help (though disabling
> > PREEMPT may be worth a try).  Sorry for the confusion.
> 
> Ok, I'll drop the patch and, recompile without PREEMPT.
> 
> 
> bzolnier@gmail.com said:
> > If the patch doesn't help could you try removing smartd from system startup
> > and see if it could be run later from the command line? 
> 
> That's how I executed during the bisect. It works as a charm without smartd. 
> The moment I run it, boink, the first accessed hd freezed up. The other ones 
> are usable for a while, though the system tend to lock solid after a while.

Thanks, this (and no success with PREEMPT_NONE) changes the perspective a bit.

Could you set your kernel tree to the guilty commit
34f5d5ae35240a11846875d76eb935875ab0c366:

diff --git a/drivers/ide/ide-disk.c b/drivers/ide/ide-disk.c
index 027bf43..717e114 100644
--- a/drivers/ide/ide-disk.c
+++ b/drivers/ide/ide-disk.c
@@ -620,8 +620,10 @@ static int set_multcount(ide_drive_t *drive, int arg)

        if (drive->special.b.set_multmode)
                return -EBUSY;
+
        ide_init_drive_cmd (&rq);
-       rq.cmd_type = REQ_TYPE_ATA_CMD;
+       rq.cmd_type = REQ_TYPE_ATA_TASKFILE;
+
        drive->mult_req = arg;
        drive->special.b.set_multmode = 1;
        (void) ide_do_drive_cmd (drive, &rq, ide_wait);
diff --git a/drivers/ide/ide-taskfile.c b/drivers/ide/ide-taskfile.c
index b8c7e81..9404650 100644
--- a/drivers/ide/ide-taskfile.c
+++ b/drivers/ide/ide-taskfile.c
@@ -781,7 +781,7 @@ int ide_cmd_ioctl (ide_drive_t *drive, unsigned int cmd, uns
                struct request rq;

                ide_init_drive_cmd(&rq);
-               rq.cmd_type = REQ_TYPE_ATA_CMD;
+               rq.cmd_type = REQ_TYPE_ATA_TASKFILE;

                return ide_do_drive_cmd(drive, &rq, ide_wait);
        }
diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c
index 446b128..97894ab 100644
--- a/drivers/ide/ide.c
+++ b/drivers/ide/ide.c
@@ -880,7 +880,7 @@ int set_pio_mode(ide_drive_t *drive, int arg)
                return -EBUSY;

        ide_init_drive_cmd(&rq);
-       rq.cmd_type = REQ_TYPE_ATA_CMD;
+       rq.cmd_type = REQ_TYPE_ATA_TASKFILE;

        drive->tune_req = (u8) arg;
        drive->special.b.set_tune = 1;

and see if manually reverting only ide-taskfile.c change fixes the problem
(so we know that we are looking at the right place).

Also Alt-SysRq-T output for the hang would probably be very useful to tell
what is going on, maybe it is possible to still get it before system fully
stops?

I must admit that after auditing the patch & code for n-th time I still fail
to see the source of the problem (especialy now that the theory about exposing
races in the tuning code has also failed) as the _only_ changes introduced by
the guilty commit are that we are using different rq->cmd_type and testing for
rq->special instead of rq->buffer but both should be NULL. [ as it can be seen
be looking at ide_cmd_ioctl(), execute_drive_cmd() and ide_end_drive_cmd() ]

If anybody has some ideas on what could be wrong please help, in the meantime
I'm going to take a look at smartd code...

Thanks,
Bart

  parent reply	other threads:[~2008-03-04 22:32 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-22 16:51 2.6.25-rc2 + smartd = hang Anders Eriksson
2008-02-22 18:00 ` Jeff Garzik
2008-02-22 18:56   ` Anders Eriksson
2008-02-22 21:25     ` Mark Lord
2008-02-22 21:39       ` Anders Eriksson
2008-02-22 22:00         ` Jeff Garzik
2008-02-23  6:39           ` Andrey Borzenkov
2008-02-23 22:13             ` Anders Eriksson
2008-02-23 22:17         ` Anders Eriksson
2008-02-23 23:12           ` Bartlomiej Zolnierkiewicz
2008-02-24  8:25             ` Anders Eriksson
     [not found]               ` <200802241654.49150.bzolnier@gmail.com>
2008-02-26  8:20                 ` Anders Eriksson
2008-02-26 19:54                   ` Bartlomiej Zolnierkiewicz
2008-02-27  7:53                     ` Anders Eriksson
2008-02-28 14:38                       ` -rc3 regression (was Re: 2.6.25-rc2 + smartd = hang ) Anders Eriksson
2008-02-28 14:38                         ` Anders Eriksson
2008-03-04  0:16                         ` Bartlomiej Zolnierkiewicz
2008-03-04  0:33                           ` Bartlomiej Zolnierkiewicz
2008-03-04  9:57                             ` Anders Eriksson
2008-03-04 15:25                               ` Anders Eriksson
2008-03-04 22:46                               ` Bartlomiej Zolnierkiewicz [this message]
2008-03-04 23:13                                 ` Bartlomiej Zolnierkiewicz
2008-03-05 11:06                                   ` Anders Eriksson
2008-03-05 10:51                                 ` Anders Eriksson
2008-02-26 21:36                   ` 2.6.25-rc2 + smartd = hang Anders Eriksson
2008-02-23 20:49       ` Pavel Machek

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=200803042346.21403.bzolnier@gmail.com \
    --to=bzolnier@gmail.com \
    --cc=aeriksson@fastmail.fm \
    --cc=jeff@garzik.org \
    --cc=jens.axboe@oracle.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.