Re: [PATCH 11/12] libata: use IRQ expecting

From: Jeff Garzik
Date: Tue Jul 27 2010 - 13:38:02 EST


On 07/02/2010 10:41 AM, Tejun Heo wrote:
Hello, Jeff.

So, something like the following. This should be applied on top of
the two previous libata patches. The amount of code in the hot path
is very small. Compared to the cpu actually taking an interrupt and
accessing hardware, it should be negligible, and this will give us
working and acceptably performing systems in the presence of most
types of IRQ problems.

Thanks.

Subject: [PATCH] libata: use IRQ expecting

Legacy ATA is very susceptible to IRQ delivery problems in both
directions - lost and spurious interrupts. In traditional PATA, the
IRQ line is ultimately out of the controller and driver's control.

Even relatively new SATA controllers share this problem as many still
emulate the traditional IDE interface which doesn't have reliable way
to indicate interrupt pending state and there also is an issue
regarding the interpretation of nIEN on both sides of the cable.

Controllers with native interface have fewer problems compared to the
ones which use SFF but they still are affected by IRQ misrouting or
broken MSI implementations.

IRQ delivery problems on ATA are particularly nasty because it
commonly hosts installation and/or booting.

Most of these problems can be worked around by using the new IRQ
expecting mechanism without adding any noticeable overhead. In ATA,
almost all operations are initiated by the host and the controller
signals progress or completion using IRQ. IRQ expecting can easily be
added in libata core and applied to all libata drivers.

Signed-off-by: Tejun Heo<tj@xxxxxxxxxx>
---
drivers/ata/libata-core.c | 55 ++++++++++++++++++++++++++++++----------------
drivers/ata/libata-eh.c | 4 ++-
drivers/ata/libata-sff.c | 37 +++++++++++++++---------------
include/linux/libata.h | 2 +
4 files changed, 60 insertions(+), 38 deletions(-)

I suppose the few cycles it costs are worth it...

Assuming this new version (from July 2) is tested,

Acked-by: Jeff Garzik <jgarzik@xxxxxxxxxx>


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/