[OpenWrt-Devel] speed up ath10k-caldata extraction for non-ipq40xx

Dmitry Tunin hanipouspilot at gmail.com
Fri Feb 22 06:32:41 EST 2019


This is useful for ath9k extraction as well.

пт, 22 февр. 2019 г. в 13:09, Christian Lamparter <chunkeey at gmail.com>:
>
> Hello,
>
> On Wednesday, February 20, 2019 7:26:55 PM CET Adrian Schmutzler wrote:
> > just saw the commit “ipq40xx: speed up ath10k-caldata extraction”:
> >
> > https://github.com/openwrt/openwrt/commit/a69e101ed1169f562fc030a783cd997d3f066b16
> >
> > Is this specific to ipq40xx for some reason not obvious to me or can other targets like ath79/ar71xx be “enhanced” similarly:
> >
> > https://github.com/openwrt/openwrt/blob/master/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata#L45
> >
> > https://github.com/openwrt/openwrt/blob/master/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata#L33
> >
> > (at least two affected lines in each file)
> >
> > […]
> >
> > dd if=$mtd of=/lib/firmware/$FIRMWARE bs=1 skip=$offset count=$count 2>/dev/null || \
> >
> > […]
> >
> > changed to
> >
> > […]
> >
> > dd if=$mtd of=/lib/firmware/$FIRMWARE bs=$count skip=$offset count=1 iflag=skip_bytes 2>/dev/null || \
> >
> > […]
> >
>
> No this isn't specific to the ipq40xx. In fact as you said on a the
> ath79 device it can make a bigger difference.
>
> For example on my ath79 WD MyNet Range Extender (AR9344-like, s25fl064k)
> it goes from:
>
> strace -c dd if=/dev/mtd6 of=/lib/firmware/test-slow bs=1 count=4096 skip=4096
> 4096+0 records in
> 4096+0 records out
> % time     seconds  usecs/call     calls    errors syscall
> ------ ----------- ----------- --------- --------- ----------------
>  99.37   15.695454        3831      4096           write
>   0.63    0.098808          24      4097           read
>   0.00    0.000050          50         1           writev
>   0.00    0.000044           8         5           close
>   0.00    0.000000           0         4         1 open
>   0.00    0.000000           0         1           execve
>   0.00    0.000000           0         1           getuid
>   0.00    0.000000           0         2           dup2
>   0.00    0.000000           0         2           mprotect
>   0.00    0.000000           0         1           _llseek
>   0.00    0.000000           0         1           prctl
>   0.00    0.000000           0         1           rt_sigaction
>   0.00    0.000000           0         1           rt_sigprocmask
>   0.00    0.000000           0         2           mmap2
>   0.00    0.000000           0         1           fstat64
>   0.00    0.000000           0         1           fcntl64
>   0.00    0.000000           0         1           set_tid_address
>   0.00    0.000000           0         1           set_thread_area
> ------ ----------- ----------- --------- --------- ----------------
> 100.00   15.794356                  8219         1 total
>
> compared to:
>
> strace -c dd if=/dev/mtd6 of=/lib/firmware/test-fast bs=4096 count=1 skip=4096 iflag=skip_bytes
> 1+0 records in
> 1+0 records out
> % time     seconds  usecs/call     calls    errors syscall
> ------ ----------- ----------- --------- --------- ----------------
>  87.12    0.014953       14953         1           write
>   5.29    0.000908         454         2           read
>   3.02    0.000518         129         4         1 open
>   1.42    0.000244         122         2           mprotect
>   1.32    0.000226         113         2           mmap2
>   0.42    0.000072          14         5           close
>   0.31    0.000053          53         1           writev
>   0.22    0.000037          18         2           brk
>   0.15    0.000025          25         1           set_thread_area
>   0.13    0.000022          11         2           dup2
>   0.10    0.000017          17         1           execve
>   0.09    0.000016          16         1           fstat64
>   0.09    0.000015          15         1           prctl
>   0.07    0.000012          12         1           _llseek
>   0.06    0.000011          11         1           rt_sigprocmask
>   0.06    0.000010          10         1           fcntl64
>   0.05    0.000009           9         1           rt_sigaction
>   0.05    0.000008           8         1           set_tid_address
>   0.04    0.000007           7         1           getuid
> ------ ----------- ----------- --------- --------- ----------------
> 100.00    0.017163                    31         1 total
>
>
> So, this should help to speed up the initial installation tremendously.
> Especially if the overlay the device uses jffs2 it seems. If you want
> to provide patches, please do so (and please add some performance
> numbers too).
>
> Cheers,
> Christian
>
>
>
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list