Skip to contentSkip to conversation

implement and use port_task

PATCH In review Tejun Heo 3 participants 5 messages Mar 5, 2006 – Mar 9, 2006 libata

lore
Share & tools
lore

Tejun Heo

author
#0 lore raw

PATCH 1/1 implement and use port_task

Hello, Jeff and Albert.

This patchset implements port_task and replace pio_task and packet_task with it. port_task isn't very different from pio_task or packet_task - it's straight forward generalization. The port_task is a per-port task avaliable to low level drivers which is managed by libata core layer.

Differences from pio/packet task.

* Not limited to PIO HSM implementation. Other drivers can use it.

* Synchronization against EH core layer is done within libata core layer, not in PIO HSM implementation (ata_qc_timeout()).

Thanks.

--
tejun

#1 lore raw

Hi Jeff,

Quoted 11 lines

This patchset implements port_task and replace pio_task and packet_task with it. port_task isn't very different from pio_task or packet_task - it's straight forward generalization. The port_task is a per-port task avaliable to low level drivers which is managed by libata core layer.

Differences from pio/packet task.

* Not limited to PIO HSM implementation. Other drivers can use it.

Quoted 8 lines

* Synchronization against EH core layer is done within libata core layer, not in PIO HSM implementation (ata_qc_timeout()).

Thanks.

--
tejun

Something related to the PIO HSM.
After the task renaming by this patchset, the task name is changed from pio_task to port_task. Should we add polling DMA support to the polling HSM?
It could make the polling HSM more complete.

Polling DMA does no performance gain. However, DMA has crc check, so it won't be worse than PIO when irq is not working.

Albert

author
#2 lore raw
Quoted 22 lines · Albert Lee

Hi Jeff,

Quoted 10 lines

This patchset implements port_task and replace pio_task and packet_task with it. port_task isn't very different from pio_task or packet_task - it's straight forward generalization. The port_task is a per-port task avaliable to low level drivers which is managed by libata core layer.

Differences from pio/packet task.

* Not limited to PIO HSM implementation. Other drivers can use it.

Quoted 8 lines

* Synchronization against EH core layer is done within libata core layer, not in PIO HSM implementation (ata_qc_timeout()).

Thanks.

--
tejun

Quoted 8 lines

Something related to the PIO HSM.
After the task renaming by this patchset, the task name is changed from pio_task to port_task. Should we add polling DMA support to the polling HSM?
It could make the polling HSM more complete.

Polling DMA does no performance gain. However, DMA has crc check, so it won't be worse than PIO when irq is not working.

Hmmm... Does irq-pio branch still have polling pio support? I hope we can implement polling without impacting normal code path in some generic way (pseudo periodic interrupts and each interrupt handler returning without doing any harm if nothing has happened should work). I don't think complicating HSM with DMA-by-polling is a good idea. It's not like all low level drivers can share single implementation of HSM.

Thanks.

Signature · 1 line
tejun
#3 lore raw
In reply to Albert Lee
Quoted 7 lines · Albert Lee

Something related to the PIO HSM.
After the task renaming by this patchset, the task name is changed from pio_task to port_task. Should we add polling DMA support to the polling HSM?
It could make the polling HSM more complete.

Polling DMA does no performance gain. However, DMA has crc check, so it won't be worse than PIO when irq is not working.

Polling DMA support with nIEN=1 is theoretically invalid. You are not supposed to touch the ATA shadow register set until after receiving an irq event.

On chipsets where nIEN=0 and the chip's IntrMask is also zero, its doable.

I'm satisfied with simply never doing polling DMA, and change our mind only if a critical need arises.

Jeff

#4 lore raw
Quoted 12 lines · Jeff Garzik

Polling DMA support with nIEN=1 is theoretically invalid. You are not supposed to touch the ATA shadow register set until after receiving an irq event.

On chipsets where nIEN=0 and the chip's IntrMask is also zero, its doable.

I'm satisfied with simply never doing polling DMA, and change our mind only if a critical need arises.

Understand. After checking the code, polling DMA looks bad idea. Thanks for the advice.

BTW, Tejun's proposal of pseudo periodic interrupts reminds me of some patches to integrate the polling pio with irq-pio. Will submit the patches for your review later.

Albert