From: Tejun Heo <htejun@gmail.com>
To: Tejun Heo <htejun@gmail.com>, linux-ide@vger.kernel.org
Subject: Re: Current qc_defer implementation may lead to infinite recursion
Date: Tue, 12 Feb 2008 18:05:15 +0900 [thread overview]
Message-ID: <47B1614B.5020209@gmail.com> (raw)
In-Reply-To: <877iha3621.fsf@denkblock.local>
Elias Oltmanns wrote:
> Tejun Heo <htejun@gmail.com> wrote:
>> Elias Oltmanns wrote:
>>> +static int piix_qc_defer(struct ata_queued_cmd *qc)
>>> +{
>>> + static struct ata_port *ap = NULL;
>>> + struct ata_queued_cmd qcmd[ATA_MAX_QUEUE];
>> missing static?
>
> Oh well, I must have been too tired already yesterday. There are a few
> more things I got wrong last time. Please see the new patch at the end
> of this email.
>
> This time I applied the patch to 2.6.24.1 and performed a
>
> # cat large-file > /dev/null &
> # tail -f /var/log/kern.log
>
> and aborted once the output of dump_stack() had occurred. This proves
> that piix_qc_defer() has declined the same command 100 times in
> succession. However, this will only happen if the status of all the
> commands enqueued for one port hasn't changed in the meantime. This
> suggests to me that the threads scheduled for command execution and
> completion aren't served for some reason. Any ideas?
Blocked counts of 1 will cause busy looping because when blk_run_queue()
returns because it's recursing too deep, it schedules unplug work right
away, so it will easily loop 100 times. Max blocked counts should be
adjusted to two (needs some testing before actually submitting the
change). But that still shouldn't cause any lock up. What happens if
you remove the 100 times limit? Does the machine hang on IO?
Thanks.
--
tejun
next prev parent reply other threads:[~2008-02-12 9:05 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-10 17:54 Current qc_defer implementation may lead to infinite recursion Elias Oltmanns
2008-02-11 5:06 ` Tejun Heo
2008-02-11 7:57 ` Elias Oltmanns
2008-02-11 8:43 ` Tejun Heo
2008-02-11 22:03 ` Elias Oltmanns
2008-02-12 1:14 ` Tejun Heo
2008-02-12 8:57 ` Elias Oltmanns
2008-02-12 9:05 ` Tejun Heo [this message]
2008-02-12 9:43 ` Elias Oltmanns
2008-02-12 12:56 ` Tejun Heo
2008-02-18 20:03 ` Elias Oltmanns
2008-04-12 8:02 ` Elias Oltmanns
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=47B1614B.5020209@gmail.com \
--to=htejun@gmail.com \
--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).