Skip to content

ioatdma: towards raid support

Dan Williams linux-raid lkml netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest29 patches 9 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/29ioat: move to drivers/dma/ioat/drivers/dma/Makefile drivers/dma/ioat/Makefile drivers/dma/ioat/dca.c +5 more+12 -110 replies
2/29ioat: move definitions to dma.hdrivers/dma/ioat/dma.c drivers/dma/ioat/dma.h+16 -140 replies
3/29ioat: convert ioat_probe to pcim/devmdrivers/dma/ioat/dma.c drivers/dma/ioat/dma.h drivers/dma/ioat/hw.h +1 more+68 -1410 replies
4/29ioat: cleanup some long deref chains and 80 column collisionsdrivers/dma/ioat/dma.c drivers/dma/ioat/dma.h+144 -1670 replies
5/29ioat: kill function prototype ifdef guardsdrivers/dma/ioat/dma.h+0 -90 replies
6/29ioat: split ioat_dma_probe into core/version-specific routinesdrivers/dma/ioat/dma.c drivers/dma/ioat/dma.h drivers/dma/ioat/pci.c+200 -1550 replies
7/29ioat: fix type mismatch for ->dmacountdrivers/dma/ioat/dma.h+2 -20 replies
8/29ioat: define descriptor control bit-fielddrivers/dma/ioat/dma.c drivers/dma/ioat/hw.h+34 -320 replies
9/29ioat1: move descriptor allocation from submit to prepdrivers/dma/ioat/dma.c+65 -890 replies
10/29ioat: fix self test interruptsdrivers/dma/ioat/dma.c+2 -10 replies
11/29ioat: prepare the code for ioat[12]_dma_chan splitdrivers/dma/ioat/dma.c drivers/dma/ioat/dma.h+390 -3700 replies
12/29ioat2,3: convert to a true ring bufferdrivers/dma/ioat/Makefile drivers/dma/ioat/dma.c drivers/dma/ioat/dma.h +3 more+1123 -6860 replies
13/29ioat1: kill unused unmap parametersdrivers/dma/ioat/dma.c drivers/dma/ioat/dma.h+0 -40 replies
14/29ioat: add some dev_dbg() callsdrivers/dma/ioat/dma.c drivers/dma/ioat/dma.h drivers/dma/ioat/dma_v2.c +1 more+81 -40 replies
15/29ioat: cleanup completion status readsdrivers/dma/ioat/dma.c drivers/dma/ioat/dma.h drivers/dma/ioat/dma_v2.c +1 more+46 -750 replies
16/29ioat: ignore reserved bits for chancnt and xfercapdrivers/dma/ioat/dma.c drivers/dma/ioat/dma_v2.c+14 -00 replies
17/29ioat: preserve chanctrl bits when re-arming interruptsdrivers/dma/ioat/dma.c drivers/dma/ioat/dma_v2.c drivers/dma/ioat/registers.h+10 -140 replies
18/29ioat: ___devinit annotate the initialization pathsdrivers/dma/ioat/dca.c drivers/dma/ioat/dma.c drivers/dma/ioat/dma.h +2 more+24 -200 replies
19/29ioat1: trim ioat_dma_desc_swdrivers/dma/ioat/dma.c drivers/dma/ioat/dma.h drivers/dma/ioat/hw.h+7 -51 reply
20/29ioat: switch watchdog and reset handler from workqueue to timerdrivers/dma/ioat/dma.c drivers/dma/ioat/dma.h drivers/dma/ioat/dma_v2.c +2 more+388 -4281 reply
21/29ioat2,3: dynamically resize descriptor ringdrivers/dma/ioat/dma.h drivers/dma/ioat/dma_v2.c drivers/dma/ioat/dma_v2.h+187 -312 replies
22/29net_dma: poll for a descriptor after allocation failuredrivers/dma/iovlock.c+10 -01 reply
23/29dw_dmac: implement a private tx_listdrivers/dma/dw_dmac.c drivers/dma/dw_dmac_regs.h+11 -90 replies
24/29fsldma: implement a private tx_listdrivers/dma/fsldma.c drivers/dma/fsldma.h+5 -31 reply
25/29iop-adma: implement a private tx_listarch/arm/include/asm/hardware/iop_adma.h drivers/dma/iop-adma.c+7 -40 replies
26/29ioat: implement a private tx_listdrivers/dma/ioat/dma.c drivers/dma/ioat/dma.h+6 -41 reply
27/29mv_xor: implement a private tx_listdrivers/dma/mv_xor.c drivers/dma/mv_xor.h+6 -50 replies
28/29dmaengine: kill tx_listdrivers/dma/dmaengine.c include/linux/dmaengine.h+0 -41 reply
29/29ioat2, 3: cacheline align software descriptor allocationsdrivers/dma/ioat/dma_v2.c drivers/dma/ioat/dma_v2.h drivers/dma/ioat/pci.c+20 -41 reply

Reviews trailers per patch

1 of 29 patches has a Reviewed-by or Acked-by.

PatchLi YangKumar Gala
1/29
2/29
3/29
4/29
5/29
6/29
7/29
8/29
9/29
10/29
11/29
12/29
13/29
14/29
15/29
16/29
17/29
18/29
19/29
20/29
21/29
22/29
23/29
24/29A-b A-b
25/29
26/29
27/29
28/29
29/29

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 00/29] ioatdma: towards raid support

The v3.2 version of the Intel(R) QuickData Technology specification adds support for raid5 and raid6 offloads. The v3.2 implementation, like v3, reuses the same basic dma descriptor ring mechanism that was introduced for v2 devices. At the same time v3.2 breaks some assumptions of the existing driver with the addition of mechanisms like extended descriptors and interrupt-driven completion callbacks as specified by the async_tx/raid-offload implementation.

The current driver blurs the lines between v1, v2, and v3 making it difficult to append raid functionality without modifying legacy code paths. The primary goal of this patchset is to refactor and isolate the legacy (v1/v2) code paths from feature additions going forward by migrating hardware version specific code to hardware version specific files. It also takes the opportunity to perform some cleanups and optimizations. For example, the conversion from a linked list to a ring-buffer for the v2/v3 descriptor ring makes the code more readable and reduces the size of the software descriptor from 136-bytes to 88-bytes with all the fields needed for NET_DMA fitting into one cacheline.

One robustness fix required by the raid code is the ability to poll for a descriptor while the channel is experiencing an "out of descriptors" condition. This has been added for the v2/v3 ring implementation.

This cleanup is available via git at:

git://git.kernel.org/pub/scm/linux/kernel/git/djbw/async_tx.git ioat-refactor

It will hit -next shortly.

The driver is used by net/ when CONFIG_NET_DMA=y, and will be used by drivers/md/ (after the raid extensions) when CONFIG_ASYNC_TX_DMA=y. Hence the Cc: of netdev and linux-raid.

Regards,
Dan

---

Dan Williams (29):
ioat: move to drivers/dma/ioat/
ioat: move definitions to dma.h
ioat: convert ioat_probe to pcim/devm
ioat: cleanup some long deref chains and 80 column collisions
ioat: kill function prototype ifdef guards
ioat: split ioat_dma_probe into core/version-specific routines
ioat: fix type mismatch for ->dmacount
ioat: define descriptor control bit-field
ioat1: move descriptor allocation from submit to prep
ioat: fix self test interrupts
ioat: prepare the code for ioat[12]_dma_chan split ioat2,3: convert to a true ring buffer
ioat1: kill unused unmap parameters
ioat: add some dev_dbg() calls
ioat: cleanup completion status reads
ioat: ignore reserved bits for chancnt and xfercap
ioat: preserve chanctrl bits when re-arming interrupts
ioat: ___devinit annotate the initialization paths
ioat1: trim ioat_dma_desc_sw
ioat: switch watchdog and reset handler from workqueue to timer ioat2,3: dynamically resize descriptor ring
net_dma: poll for a descriptor after allocation failure
dw_dmac: implement a private tx_list
fsldma: implement a private tx_list
iop-adma: implement a private tx_list
ioat: implement a private tx_list
mv_xor: implement a private tx_list
dmaengine: kill tx_list
ioat2,3: cacheline align software descriptor allocations

 arch/arm/include/asm/hardware/iop_adma.h           |    2 +
 drivers/dma/Makefile                               |    3 +-
 drivers/dma/dmaengine.c                            |    1 -
 drivers/dma/dw_dmac.c                              |   19 +-
 drivers/dma/dw_dmac_regs.h                         |    1 +
 drivers/dma/fsldma.c                               |    7 +-
 drivers/dma/fsldma.h                               |    1 +
 drivers/dma/ioat/Makefile                          |    2 +
 drivers/dma/{ioat_dca.c => ioat/dca.c}             |   13 +-
 drivers/dma/ioat/dma.c                             | 1140 +++++++++++++
 drivers/dma/ioat/dma.h                             |  307 ++++
 drivers/dma/ioat/dma_v2.c                          |  883 ++++++++++
 drivers/dma/ioat/dma_v2.h                          |  147 ++
 drivers/dma/{ioatdma_hw.h => ioat/hw.h}            |   45 +-
 drivers/dma/{ioat.c => ioat/pci.c}                 |  163 +-
 .../dma/{ioatdma_registers.h => ioat/registers.h}  |   34 +-
 drivers/dma/ioat_dma.c                             | 1741 --------------------
 drivers/dma/ioatdma.h                              |  165 --
 drivers/dma/iop-adma.c                             |    9 +-
 drivers/dma/iovlock.c                              |   10 +
 drivers/dma/mv_xor.c                               |    7 +-
 drivers/dma/mv_xor.h                               |    4 +-
 include/linux/dmaengine.h                          |    3 -
 23 files changed, 2647 insertions(+), 2060 deletions(-)
 create mode 100644 drivers/dma/ioat/Makefile
 rename drivers/dma/{ioat_dca.c => ioat/dca.c} (98%)
 create mode 100644 drivers/dma/ioat/dma.c
 create mode 100644 drivers/dma/ioat/dma.h
 create mode 100644 drivers/dma/ioat/dma_v2.c
 create mode 100644 drivers/dma/ioat/dma_v2.h
 rename drivers/dma/{ioatdma_hw.h => ioat/hw.h} (67%)
 rename drivers/dma/{ioat.c => ioat/pci.c} (62%)
 rename drivers/dma/{ioatdma_registers.h => ioat/registers.h} (91%)
 delete mode 100644 drivers/dma/ioat_dma.c
 delete mode 100644 drivers/dma/ioatdma.h