From: Tejun Heo <htejun@gmail.com>
To: albertl@mail.com
Cc: Linux IDE <linux-ide@vger.kernel.org>,
Doug Maxey <dwm@enoyolf.org>, Jeff Garzik <jeff@garzik.org>,
Alan Cox <alan@lxorguk.ukuu.org.uk>, Mark Lord <mlord@pobox.com>
Subject: Re: [PATCH/RFC 5/9] libata: use freeze()/thaw() for polling
Date: Mon, 18 Jun 2007 14:13:25 +0900 [thread overview]
Message-ID: <46761475.8080509@gmail.com> (raw)
In-Reply-To: <4672067B.5070609@tw.ibm.com>
Hello,
Albert Lee wrote:
> Patch 5/9:
>
> This patch changes polling codes to use freeze()/thaw() for irq off/on.
> ata_qc_set_polling() is also removed since now unused.
>
> The reason for freeze()/thaw(): some ATAPI devices raises INTRQ even if nIEN = 1.
> Using the host adapter irq mask mechanism, if available, is more reliable than using the device nIEN bit.
>
> Considerations:
> 1. the semantic of freeze()/thaw() maybe more than irq off/on?
It usually is irq off/on.
> 2. HSM, the new user of freeze()/thaw(), will call freeze()/thaw() more frequently than EH.
> Can current implemention of freeze()/thaw() handle it?
Yeah, I don't see any reason why it can't be used that way but please
audit each freeze/thaw implementation.
> @@ -5442,7 +5442,7 @@ unsigned int ata_qc_issue_prot(struct at
>
> case ATA_PROT_PIO:
> if (qc->tf.flags & ATA_TFLAG_POLLING)
> - ata_qc_set_polling(qc);
> + ap->ops->freeze(ap);
>
> ata_tf_to_host(ap, &qc->tf);
Wouldn't ata_tf_load() change the ctl value to qc->tf.ctl when issuing
the command?
I'm not really sure about this change because most controller which have
dedicated IRQ mask bit also have dedicated IRQ pending bit (and probably
IRQ clear bit too). With those bits, IRQ during polling is not a big
problem (sata_sil for example). So, the change doesn't really help the
controllers which actually have problems dealing with devices which
raise IRQ regardless of ATA_NIEN.
I don't see any easy way out other than manipulating host IRQ on/off as
IDE does. If we choose to go that way, we can use them in
ata_bmdma_freeze/thaw (they should be named ata_sff_freeze/thaw really)
and use this patch on top of it. Maybe it's better to drop ->freeze()
and ->thaw() altogether and use ->irq_on() and ->irq_off() instead.
Their names are more intuitive IMHO but that's minor.
Jeff, Alan, what do you think about adopting IDE's irq off/on mechanism.
It's ugly and may cause some problems if the IRQ is shared but then
again it has been used for a long time without too much problem and
occasional lost IRQ is much better than dead machine due to screaming
IRQs followed by nobody cared.
Thanks.
--
tejun
next prev parent reply other threads:[~2007-06-18 5:13 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-15 3:11 [PATCH/RFC 0/9] libata: irq_on/off restructuring Albert Lee
2007-06-15 3:15 ` [PATCH/RFC 1/9] libata: remove irq_on from ata_bus_reset() and ata_std_postreset() Albert Lee
2007-06-15 3:17 ` [PATCH/RFC 2/9] libata: add irq_off() for symmetry Albert Lee
2007-06-15 3:19 ` [PATCH/RFC 3/9] libata: add ->irq_off() to LLDDs Albert Lee
2007-06-15 3:21 ` [PATCH/RFC 4/9] libata: call irq_off from bmdma_freeze() Albert Lee
2007-06-15 3:24 ` [PATCH/RFC 5/9] libata: use freeze()/thaw() for polling Albert Lee
2007-06-18 5:13 ` Tejun Heo [this message]
2007-06-15 3:26 ` [PATCH/RFC 6/9] libata: add freeze()/thaw() to old EH LLDDs Albert Lee
2007-06-15 3:30 ` [PATCH/RFC 7/9] libata: pdc_freeze() semantic change Albert Lee
2007-06-18 5:14 ` Tejun Heo
2007-06-15 3:34 ` [PATCH/RFC 8/9] libata: remove writing of tf->ctl from ata_tf_load() Albert Lee
2007-06-15 3:44 ` [PATCH/RFC 9/9] libata: remove irq_on/off and rename freeze()/thaw() to irq_on/off Albert Lee
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=46761475.8080509@gmail.com \
--to=htejun@gmail.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=albertl@mail.com \
--cc=dwm@enoyolf.org \
--cc=jeff@garzik.org \
--cc=linux-ide@vger.kernel.org \
--cc=mlord@pobox.com \
/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).