Raid: enable talitos xor offload for improving performance

Started by unknown sender on Aug 9, 2012 · 8 messages from 4 authors · Last reply Aug 30, 2012

STALE5186d REVIEWED · 1 review, 0 by maintainers

Status: Reviewed.

Revision v7 (7 revisions archived); 1 review trailer.

Revisions (7)
  1. v1 re-posted go to this post re-posted go to this post
  2. v2 [diff against previous]
  3. v3 [diff against previous]
  4. v4 [diff against previous]
  5. v5 [diff against previous]
  6. v6 [diff against previous]
  7. v7 current [diff against previous]

open the first message on its own page

Message details and related content
Hi all,

The following 8 patches enabling fsl-dma and talitos offload raid
operations for improving raid performance and balancing CPU load.

These patches include talitos, fsl-dma and carma module (caram uses
some features of fsl-dma).

Write performance will be improved by 25-30% tested by iozone.
Write performance is improved about 2% after using spin_lock_bh replace
spin_lock_irqsave.
CPU load will be reduced by 8%.

"fwiw, I gave v5 a test-drive, setting up a RAID5 array on ramdisks
[1], and this patchseries, along with FSL_DMA && NET_DMA set seems
to be holding water, so this series gets my:"

Tested-by: Kim Phillips <redacted>

[1] mdadm --create --verbose --force /dev/md0 --level=raid5 --raid-devices=4 \
	/dev/ram[0123]

Changes in v7:
	- add test result which is provided by Kim Phillips;
	- correct one coding style issue in patch 5/8;
	- add comments by Arnd Bergmann in patch 6/8;

Changes in v6:
	- swap the order of original patch 3/6 and 4/6;
	- merge Ira's patch to reduce the size of original patch;
	- merge Ira's patch of carma in 8/8;
	- update documents and descriptions according to Ira's advice;

Changes in v5:
	- add detail description in patch 3/6 about the process of completed
	descriptor, the process is in align with fsl-dma Reference Manual,
	illustrate the potential risk and how to reproduce it;
	- drop the patch 7/7 in v4 according to Timur's comments;

Changes in v4:

43 more lines

Message details and related content
On Thu, Aug 09, 2012 at 04:19:35PM +0800, qiang.liu@freescale.com wrote:
Hi all,

The following 8 patches enabling fsl-dma and talitos offload raid
operations for improving raid performance and balancing CPU load.

These patches include talitos, fsl-dma and carma module (caram uses
some features of fsl-dma).

Write performance will be improved by 25-30% tested by iozone.
Write performance is improved about 2% after using spin_lock_bh replace
spin_lock_irqsave.
CPU load will be reduced by 8%.

"fwiw, I gave v5 a test-drive, setting up a RAID5 array on ramdisks
[1], and this patchseries, along with FSL_DMA && NET_DMA set seems
to be holding water, so this series gets my:"

Tested-by: Kim Phillips <redacted>
The fsldma parts of the series all look great to me.

Thanks,
Ira
[1] mdadm --create --verbose --force /dev/md0 --level=raid5 --raid-devices=4 \
	/dev/ram[0123]

Changes in v7:
	- add test result which is provided by Kim Phillips;
	- correct one coding style issue in patch 5/8;
	- add comments by Arnd Bergmann in patch 6/8;

Changes in v6:
	- swap the order of original patch 3/6 and 4/6;
	- merge Ira's patch to reduce the size of original patch;
	- merge Ira's patch of carma in 8/8;
	- update documents and descriptions according to Ira's advice;

Changes in v5:
	- add detail description in patch 3/6 about the process of completed
	descriptor, the process is in align with fsl-dma Reference Manual,
	illustrate the potential risk and how to reproduce it;
	- drop the patch 7/7 in v4 according to Timur's comments;

Changes in v4:
	- fix an error in talitos when dest addr is same with src addr, dest
	should be freed only one time if src is same with dest addr;
	- correct coding style in fsl-dma according to Ira's comments;
	- fix a race condition in fsl-dma fsl_tx_status(), remove the interface
	which is used to free descriptors in queue ld_completed, this interface
	has been included in fsldma_cleanup_descriptor(), in v3, there is one
	place missed spin_lock protect;
	- split the original patch 3/4 up to 2 patches 3/7 and 4/7 according to
	Li Yang's comments;
	- fix a warning of unitialized cookie;
	- add memory copy self test in fsl-dma;
	- add more detail description about use spin_lock_bh() to instead of
	spin_lock_irqsave() according to Timur's comments.

Changes in v3:
	- change release process of fsl-dma descriptor for resolve the
	potential race condition;
	- add test result when use spin_lock_bh replace spin_lock_irqsave;
	- modify the benchmark results according to the latest patch.

29 more quoted lines

Message details and related content
Hi Vinod,

Would you like to apply this series from patch 2/8 to 7/8) in your tree?
The link as below,
http://patchwork.ozlabs.org/patch/176023/
http://patchwork.ozlabs.org/patch/176024/
http://patchwork.ozlabs.org/patch/176025/
http://patchwork.ozlabs.org/patch/176026/
http://patchwork.ozlabs.org/patch/176027/
http://patchwork.ozlabs.org/patch/176028/

After that, Herbert will merge patch 1/8, http://patchwork.ozlabs.org/patch=
/176022/
and Greg apply patch 8/8, http://patchwork.ozlabs.org/patch/176029/

Thanks.
=20
-----Original Message-----
From: Ira W. Snyder [mailto:<redacted>]
Sent: Friday, August 10, 2012 1:03 AM
To: Liu Qiang-B32616
Cc: <redacted>; <redacted>;
dan.j.williams@intel.com; herbert@gondor.hengli.com.au; arnd@arndb.de;
gregkh@linuxfoundation.org; linuxppc-dev@lists.ozlabs.org; linux-
kernel@vger.kernel.org; dan.j.williams@gmail.com
Subject: Re: [PATCH v7 0/8] Raid: enable talitos xor offload for
improving performance
=20
On Thu, Aug 09, 2012 at 04:19:35PM +0800, qiang.liu@freescale.com wrote:
quoted
Hi all,

The following 8 patches enabling fsl-dma and talitos offload raid
operations for improving raid performance and balancing CPU load.

These patches include talitos, fsl-dma and carma module (caram uses
some features of fsl-dma).

Write performance will be improved by 25-30% tested by iozone.
Write performance is improved about 2% after using spin_lock_bh
replace spin_lock_irqsave.
CPU load will be reduced by 8%.

"fwiw, I gave v5 a test-drive, setting up a RAID5 array on ramdisks
[1], and this patchseries, along with FSL_DMA && NET_DMA set seems to
be holding water, so this series gets my:"

Tested-by: Kim Phillips <redacted>
=20
The fsldma parts of the series all look great to me.
=20
Thanks,
Ira
=20
quoted
[1] mdadm --create --verbose --force /dev/md0 --level=3Draid5 --raid-
devices=3D4 \
quoted
	/dev/ram[0123]

77 more quoted lines

Message details and related content
On Tue, Aug 14, 2012 at 2:04 AM, Liu Qiang-B32616 [off-list ref] wrote:
Hi Vinod,

Would you like to apply this series from patch 2/8 to 7/8) in your tree?
The link as below,
http://patchwork.ozlabs.org/patch/176023/
http://patchwork.ozlabs.org/patch/176024/
http://patchwork.ozlabs.org/patch/176025/
http://patchwork.ozlabs.org/patch/176026/
http://patchwork.ozlabs.org/patch/176027/
http://patchwork.ozlabs.org/patch/176028/
Hi, sorry for the recent silence I've been transitioning and am now
just catching up.  I'll take a look and then it's fine for these to go
through Vinod's tree.

--
Dan
Message details and related content
-----Original Message-----
From: <redacted> [mailto:<redacted>] On
Behalf Of Dan Williams
Sent: Wednesday, August 15, 2012 4:02 AM
To: Liu Qiang-B32616
Cc: <redacted>; <redacted>; arnd@arndb.de;
herbert@gondor.apana.org.au; gregkh@linuxfoundation.org; linuxppc-
dev@lists.ozlabs.org; linux-kernel@vger.kernel.org; linux-
crypto@vger.kernel.org; Ira W. Snyder
Subject: Re: [PATCH v7 0/8] Raid: enable talitos xor offload for
improving performance
=20
On Tue, Aug 14, 2012 at 2:04 AM, Liu Qiang-B32616 [off-list ref]
wrote:
quoted
Hi Vinod,

Would you like to apply this series from patch 2/8 to 7/8) in your tree=
?
quoted
The link as below,
http://patchwork.ozlabs.org/patch/176023/
http://patchwork.ozlabs.org/patch/176024/
http://patchwork.ozlabs.org/patch/176025/
http://patchwork.ozlabs.org/patch/176026/
http://patchwork.ozlabs.org/patch/176027/
http://patchwork.ozlabs.org/patch/176028/
=20
Hi, sorry for the recent silence I've been transitioning and am now
just catching up.  I'll take a look and then it's fine for these to go
through Vinod's tree.
Hello Dan,

Please review, this issue has been continued since many years. I hope we ca=
n fix
it this time. Thanks.
=20
--
Dan
Message details and related content
Hi Dan,

Ping?
Can you apply these patches? Thanks.


- Qiang
-----Original Message-----
From: <redacted> [mailto:<redacted>] On
Behalf Of Dan Williams
Sent: Wednesday, August 15, 2012 4:02 AM
To: Liu Qiang-B32616
Cc: <redacted>; <redacted>; arnd@arndb.de;
herbert@gondor.apana.org.au; gregkh@linuxfoundation.org; linuxppc-
dev@lists.ozlabs.org; linux-kernel@vger.kernel.org; linux-
crypto@vger.kernel.org; Ira W. Snyder
Subject: Re: [PATCH v7 0/8] Raid: enable talitos xor offload for
improving performance
=20
On Tue, Aug 14, 2012 at 2:04 AM, Liu Qiang-B32616 [off-list ref]
wrote:
quoted
Hi Vinod,

Would you like to apply this series from patch 2/8 to 7/8) in your tree=
?
quoted
The link as below,
http://patchwork.ozlabs.org/patch/176023/
http://patchwork.ozlabs.org/patch/176024/
http://patchwork.ozlabs.org/patch/176025/
http://patchwork.ozlabs.org/patch/176026/
http://patchwork.ozlabs.org/patch/176027/
http://patchwork.ozlabs.org/patch/176028/
=20
Hi, sorry for the recent silence I've been transitioning and am now
just catching up.  I'll take a look and then it's fine for these to go
through Vinod's tree.
=20
--
Dan
Message details and related content
On Wed, 2012-08-29 at 11:15 +0000, Liu Qiang-B32616 wrote:
Hi Dan,

Ping?
Can you apply these patches? Thanks.
I'm working my way through them.

The first thing I notice is that xor_chan->desc_lock is taken
inconsistently.  I.e. spin_lock_irqsave() in talitos_process_pending()
and spin_lock_bh() everywhere else.  Have you run these patches with
lockdep?

--
Dan
Message details and related content
PiAtLS0tLU9yaWdpbmFsIE1lc3NhZ2UtLS0tLQ0KPiBGcm9tOiBEYW4gV2lsbGlhbXMgW21haWx0
bzpkamJ3QGZiLmNvbV0NCj4gU2VudDogV2VkbmVzZGF5LCBBdWd1c3QgMjksIDIwMTIgMTA6NTMg
UE0NCj4gVG86IExpdSBRaWFuZy1CMzI2MTYNCj4gQ2M6IHZpbm9kLmtvdWxAaW50ZWwuY29tOyBh
cm5kQGFybmRiLmRlOyBoZXJiZXJ0QGdvbmRvci5hcGFuYS5vcmcuYXU7DQo+IGdyZWdraEBsaW51
eGZvdW5kYXRpb24ub3JnOyBsaW51eHBwYy1kZXZAbGlzdHMub3psYWJzLm9yZzsgbGludXgtDQo+
IGtlcm5lbEB2Z2VyLmtlcm5lbC5vcmc7IGxpbnV4LWNyeXB0b0B2Z2VyLmtlcm5lbC5vcmc7IEly
YSBXLiBTbnlkZXINCj4gU3ViamVjdDogUmU6IFtQQVRDSCB2NyAwLzhdIFJhaWQ6IGVuYWJsZSB0
YWxpdG9zIHhvciBvZmZsb2FkIGZvcg0KPiBpbXByb3ZpbmcgcGVyZm9ybWFuY2UNCj4gDQo+IE9u
IFdlZCwgMjAxMi0wOC0yOSBhdCAxMToxNSArMDAwMCwgTGl1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JhbW1lZCBFcnJvciIuIEknbSB3b25kZXJpbmcgd2hldGhlciBv
dGhlciBoYXJkd2FyZSBhcmUgc2FtZSB3aXRoIGZzbC1kbWEgKHRoZSBpbnRlcnJ1cHQgaXMgYSBu
b3JtYWwgaW50ZXJydXB0LCBidXQgbm90IGFuIGVycm9yKSBpLmUuIHhzY2FsZS1pb3A/DQpJZiBv
dGhlciBoYXJkd2FyZSBhbHNvIHRyaWdnZXIgYW4gaW50ZXJydXB0IGJ5IGFuIGFibm9ybWFsIGVy
cm9yLCBtYXliZSBteSBwYXRjaCAyLzggc2hvdWxkIGJlIHJldmVydGVkIGJlY2F1c2UgaXQgdmlv
bGF0ZXMgdGhlIHJ1bGVzIG9mIHRoaXMgYXR0cmlidXRlLg0KDQpCVFcsIGNvdWxkIHlvdSBwbGVh
c2UgcmVwbHkgaW4gdGhlIHBhdGNoIGlmIHlvdSBoYXZlIGFueSBjb21tZW50cy4gVGhhbmtzLg0K
DQo+IA0KPiAtLQ0KPiBEYW4NCj4gDQo+IA0KDQo=
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help