# Sunxi, SATA write speed patch

**URL:** <https://forum.openwrt.org/t/sunxi-sata-write-speed-patch/54555>\
**Category:** For Developers\
**Created:** [February 4, 2020, 2:24pm UTC](https://forum.openwrt.org/t/sunxi-sata-write-speed-patch/54555 "2020-02-04T14:24:45Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![lee\_me](https://forum.openwrt.org/user_avatar/forum.openwrt.org/lee_me/32/17758_2.png) [@lee\_me](https://forum.openwrt.org/u/lee_me)\
**Post date:** [February 4, 2020, 2:24pm UTC](https://forum.openwrt.org/t/sunxi-sata-write-speed-patch/54555/1 "2020-02-04T14:24:45Z")

</div>

Dear developers,  
I have been using OpenWrt with Lemaker's Banana Pro. It works wonderful for a router & minidlna server.  
Lately I read about kernel patch for Allwinner A20,  
link below :

> **[A20 SATA write speed improvement](https://forum.armbian.com/topic/10352-a20-sata-write-speed-improvement/)**
>
> I tested the recently added sunxi-dev patch to improve the SATA write speed. Here are the results: Board: Cubietruck OS: Ubuntu Bionic (18.04.2), Armbian 5.86 Kernel: 5.1.0 with and without...

It makes the sata write speed improvement up to 100+ MB/s.  
How to make this patch work on OpenWrt ?  
Or any plan to include this patch to next openwrt version? Thanks

---

<div class="post-metadata">

**Author:** ![olek210](https://forum.openwrt.org/user_avatar/forum.openwrt.org/olek210/32/10152_2.png) [@olek210](https://forum.openwrt.org/u/olek210)\
**Post date:** [February 4, 2020, 4:38pm UTC](https://forum.openwrt.org/t/sunxi-sata-write-speed-patch/54555/2 "2020-02-04T16:38:44Z")

</div>

Hi,  
[This patch](https://github.com/torvalds/linux/commit/120357ea176e420d313cf8cf2ff35fbe233d3bab#diff-df9448eb048da7cae7ece7e8d39c3aee) is in mainline linux since 5.3. Next OpenWRT release should have this patch.  
It should be easy to backport it to snapshot. Do you have hardware for tests?

---

<div class="post-metadata">

**Author:** ![lee\_me](https://forum.openwrt.org/user_avatar/forum.openwrt.org/lee_me/32/17758_2.png) [@lee\_me](https://forum.openwrt.org/u/lee_me)\
**Post date:** [February 5, 2020, 2:19am UTC](https://forum.openwrt.org/t/sunxi-sata-write-speed-patch/54555/3 "2020-02-05T02:19:34Z")

</div>

Hi, thanks for your response.  
I just have one for my daily use.  
How can i help for the test?

---

<div class="post-metadata">

**Author:** ![olek210](https://forum.openwrt.org/user_avatar/forum.openwrt.org/olek210/32/10152_2.png) [@olek210](https://forum.openwrt.org/u/olek210)\
**Post date:** [February 5, 2020, 7:35pm UTC](https://forum.openwrt.org/t/sunxi-sata-write-speed-patch/54555/4 "2020-02-05T19:35:00Z")

</div>

Hi,

1. Make test with latest snapshot (dd, iozone etc.)
2. Build image with patch:

```
git clone https://github.com/olek210/openwrt.git
git checkout sunxi_sata_fifo
make package/symlinks
make menuconfig
#select target and board
make -j9

```

1. make tests.
2. Post here your results 🙂

Then I can open Pull Request.

---

<div class="post-metadata">

**Author:** ![lee\_me](https://forum.openwrt.org/user_avatar/forum.openwrt.org/lee_me/32/17758_2.png) [@lee\_me](https://forum.openwrt.org/u/lee_me)\
**Post date:** [February 8, 2020, 12:20am UTC](https://forum.openwrt.org/t/sunxi-sata-write-speed-patch/54555/5 "2020-02-08T00:20:13Z")

</div>

Hi olek210, thanks for the guide.  
The patch definitely make improvements for sata write speed.  
This is the result screenshots before and after patched using dd.

 ![dd_before](https://forum.openwrt.org/uploads/default/original/3X/0/e/0eb6a0e98638911e93347e0f9cf2b32c90cb9f0d.jpeg) ![dd_after](https://forum.openwrt.org/uploads/default/original/3X/b/1/b17c4183cd9b02526b048b9bb73b274bbeab8d4d.jpeg)

---

<div class="post-metadata">

**Author:** ![olek210](https://forum.openwrt.org/user_avatar/forum.openwrt.org/olek210/32/10152_2.png) [@olek210](https://forum.openwrt.org/u/olek210)\
**Post date:** [February 8, 2020, 8:34pm UTC](https://forum.openwrt.org/t/sunxi-sata-write-speed-patch/54555/6 "2020-02-08T20:34:06Z")

</div>

[Pull Request](https://github.com/openwrt/openwrt/pull/2765)
