mbox series

[OpenWrt-Devel,v2,0/3] Speed up caldata/eeprom handling for ar71xx/ath79

Message ID 20190222184836.1047-1-freifunk@adrianschmutzler.de
Headers show
Series Speed up caldata/eeprom handling for ar71xx/ath79 | expand

Message

Adrian Schmutzler Feb. 22, 2019, 6:48 p.m. UTC
Based on the ipq40xx commit from chunkeey, I tried to do the same for
ar71xx/ath79.

This does NOT cover ramips as suggested in an alternate patch.

Note that I am in favor of the unified code library proposed on the
devel list, but until this has been decided this patch will fix the
target-specific files.

Version 2:
Just changed the commit messages, since obviously prefixing statements with
hash is not such a good idea ...
Sorry for the resend.

BTW: The 99.9 % speed improvement seems really unbelievable. Did I do it right?

Adrian Schmutzler (3):
  ath79: Speed up caldata/eeprom handling
  ar71xx: Speed up caldata/eeprom handling
  ar71xx: Speed up mtd extraction in ar71xx.sh

 .../linux/ar71xx/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom  | 6 +++---
 .../ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata      | 6 +++---
 target/linux/ar71xx/base-files/lib/ar71xx.sh                        | 4 ++--
 .../linux/ath79/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom   | 4 ++--
 .../linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata | 6 +++---
 5 files changed, 13 insertions(+), 13 deletions(-)

Comments

Dmitry Tunin Feb. 22, 2019, 6:52 p.m. UTC | #1
пт, 22 февр. 2019 г. в 21:48, Adrian Schmutzler <freifunk@adrianschmutzler.de>:
>
> Based on the ipq40xx commit from chunkeey, I tried to do the same for
> ar71xx/ath79.
>
I want to add that without this patch firmware extraction is not fast
enough to get it in time after a flash. That's why wireless needs a
restart.
I don't think it's crucial to change it also for crc, etc, but it won't harm.
Christian Lamparter Feb. 25, 2019, 5:27 p.m. UTC | #2
Hello,

On Friday, February 22, 2019 7:52:37 PM CET Dmitry Tunin wrote:
> пт, 22 февр. 2019 г. в 21:48, Adrian Schmutzler <freifunk@adrianschmutzler.de>:
> >
> > Based on the ipq40xx commit from chunkeey, I tried to do the same for
> > ar71xx/ath79.
> >
> I want to add that without this patch firmware extraction is not fast
> enough to get it in time after a flash. That's why wireless needs a
> restart.

I have a question for you too. There are currently two competing patches
for the ath79 10-ath9k-eeprom extraction:

https://patchwork.ozlabs.org/patch/1046790/

https://patchwork.ozlabs.org/patch/1047062/

Now, Dmitry' was faster with his version, but Adrian's version
patches everything so which one should it be?

(I'll write some more about the future of the extraction in the
other thread).

Cheers
Christian
Adrian Schmutzler Feb. 25, 2019, 6 p.m. UTC | #3
Hi,

I like Dmitry's approach as it will reduce duplicate code.

I would be happy to send patches for the "rest" (what I did more than him) based on his patch.

I just interpreted the comment

> The only problem here is that not all platforms need it.

as an objection to the unified approach, so I sent my patches representing a "smaller" change.

Best

Adrian

> -----Original Message-----
> From: openwrt-devel [mailto:openwrt-devel-bounces@lists.openwrt.org] On
> Behalf Of Christian Lamparter
> Sent: Montag, 25. Februar 2019 18:28
> To: openwrt-devel@lists.openwrt.org
> Cc: Dmitry Tunin <hanipouspilot@gmail.com>; Adrian Schmutzler
> <freifunk@adrianschmutzler.de>
> Subject: Re: [OpenWrt-Devel] [PATCH v2 0/3] Speed up caldata/eeprom
> handling for ar71xx/ath79
> 
> Hello,
> 
> On Friday, February 22, 2019 7:52:37 PM CET Dmitry Tunin wrote:
> > пт, 22 февр. 2019 г. в 21:48, Adrian Schmutzler
> <freifunk@adrianschmutzler.de>:
> > >
> > > Based on the ipq40xx commit from chunkeey, I tried to do the same for
> > > ar71xx/ath79.
> > >
> > I want to add that without this patch firmware extraction is not fast
> > enough to get it in time after a flash. That's why wireless needs a
> > restart.
> 
> I have a question for you too. There are currently two competing patches
> for the ath79 10-ath9k-eeprom extraction:
> 
> https://patchwork.ozlabs.org/patch/1046790/
> 
> https://patchwork.ozlabs.org/patch/1047062/
> 
> Now, Dmitry' was faster with his version, but Adrian's version
> patches everything so which one should it be?
> 
> (I'll write some more about the future of the extraction in the
> other thread).
> 
> Cheers
> Christian
> 
> 
> 
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Dmitry Tunin Feb. 25, 2019, 6:01 p.m. UTC | #4
I suggest Adrian's. I was too lazy to patch them all. Only merging
this what matters.

пн, 25 февр. 2019 г. в 20:27, Christian Lamparter <chunkeey@gmail.com>:
>
> Hello,
>
> On Friday, February 22, 2019 7:52:37 PM CET Dmitry Tunin wrote:
> > пт, 22 февр. 2019 г. в 21:48, Adrian Schmutzler <freifunk@adrianschmutzler.de>:
> > >
> > > Based on the ipq40xx commit from chunkeey, I tried to do the same for
> > > ar71xx/ath79.
> > >
> > I want to add that without this patch firmware extraction is not fast
> > enough to get it in time after a flash. That's why wireless needs a
> > restart.
>
> I have a question for you too. There are currently two competing patches
> for the ath79 10-ath9k-eeprom extraction:
>
> https://patchwork.ozlabs.org/patch/1046790/
>
> https://patchwork.ozlabs.org/patch/1047062/
>
> Now, Dmitry' was faster with his version, but Adrian's version
> patches everything so which one should it be?
>
> (I'll write some more about the future of the extraction in the
> other thread).
>
> Cheers
> Christian
>
>
Dmitry Tunin Feb. 25, 2019, 6:04 p.m. UTC | #5
пн, 25 февр. 2019 г. в 21:01, Dmitry Tunin <hanipouspilot@gmail.com>:
>
> I suggest Adrian's. I was too lazy to patch them all. Only merging
> this what matters.
>
> пн, 25 февр. 2019 г. в 20:27, Christian Lamparter <chunkeey@gmail.com>:
> >
> > Hello,
> >
> > On Friday, February 22, 2019 7:52:37 PM CET Dmitry Tunin wrote:
> > > пт, 22 февр. 2019 г. в 21:48, Adrian Schmutzler <freifunk@adrianschmutzler.de>:
> > > >
> > > > Based on the ipq40xx commit from chunkeey, I tried to do the same for
> > > > ar71xx/ath79.
> > > >
> > > I want to add that without this patch firmware extraction is not fast
> > > enough to get it in time after a flash. That's why wireless needs a
> > > restart.
> >
> > I have a question for you too. There are currently two competing patches
> > for the ath79 10-ath9k-eeprom extraction:
> >
> > https://patchwork.ozlabs.org/patch/1046790/
> >
> > https://patchwork.ozlabs.org/patch/1047062/
> >
> > Now, Dmitry' was faster with his version, but Adrian's version
> > patches everything so which one should it be?
> >
> > (I'll write some more about the future of the extraction in the
> > other thread).
> >
> > Cheers
> > Christian
> >
> >

Sry for upcommenting. I think that speeding up mac patching is not
really important, because it isn't too slow for a few bytes. But there
is no harm.
Dmitry Tunin Feb. 25, 2019, 6:06 p.m. UTC | #6
пн, 25 февр. 2019 г. в 21:00, Adrian Schmutzler <mail@adrianschmutzler.de>:
>
> Hi,
>
> I like Dmitry's approach as it will reduce duplicate code.

That was not my approach ;-)
>
> I would be happy to send patches for the "rest" (what I did more than him) based on his patch.
>
> I just interpreted the comment
>
> > The only problem here is that not all platforms need it.
>
> as an objection to the unified approach, so I sent my patches representing a "smaller" change.

Well IMHO it is a matter of "taste" in this case. Save some bytes vs
unification.
>
> Best
>
> Adrian
>
> > -----Original Message-----
> > From: openwrt-devel [mailto:openwrt-devel-bounces@lists.openwrt.org] On
> > Behalf Of Christian Lamparter
> > Sent: Montag, 25. Februar 2019 18:28
> > To: openwrt-devel@lists.openwrt.org
> > Cc: Dmitry Tunin <hanipouspilot@gmail.com>; Adrian Schmutzler
> > <freifunk@adrianschmutzler.de>
> > Subject: Re: [OpenWrt-Devel] [PATCH v2 0/3] Speed up caldata/eeprom
> > handling for ar71xx/ath79
> >
> > Hello,
> >
> > On Friday, February 22, 2019 7:52:37 PM CET Dmitry Tunin wrote:
> > > пт, 22 февр. 2019 г. в 21:48, Adrian Schmutzler
> > <freifunk@adrianschmutzler.de>:
> > > >
> > > > Based on the ipq40xx commit from chunkeey, I tried to do the same for
> > > > ar71xx/ath79.
> > > >
> > > I want to add that without this patch firmware extraction is not fast
> > > enough to get it in time after a flash. That's why wireless needs a
> > > restart.
> >
> > I have a question for you too. There are currently two competing patches
> > for the ath79 10-ath9k-eeprom extraction:
> >
> > https://patchwork.ozlabs.org/patch/1046790/
> >
> > https://patchwork.ozlabs.org/patch/1047062/
> >
> > Now, Dmitry' was faster with his version, but Adrian's version
> > patches everything so which one should it be?
> >
> > (I'll write some more about the future of the extraction in the
> > other thread).
> >
> > Cheers
> > Christian
> >
> >
> >
> > _______________________________________________
> > openwrt-devel mailing list
> > openwrt-devel@lists.openwrt.org
> > https://lists.openwrt.org/mailman/listinfo/openwrt-devel
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Adrian Schmutzler Feb. 25, 2019, 6:08 p.m. UTC | #7
So we both step back, same situation again ;-)

I only just read the "Something like this for ar71xx, ath79 and ramips, untested." in Dmitry's proposal, so I would do the following:

Merge my patches, so we have the speed-up (without much code change) quickly.

At some later point either Dmitry or I can/should take up a unified approach and test it thoroughly.

Best

Adrian

> -----Original Message-----
> From: openwrt-devel [mailto:openwrt-devel-bounces@lists.openwrt.org] On
> Behalf Of Dmitry Tunin
> Sent: Montag, 25. Februar 2019 19:01
> To: Christian Lamparter <chunkeey@gmail.com>
> Cc: Adrian Schmutzler <freifunk@adrianschmutzler.de>; openwrt-
> devel@lists.openwrt.org
> Subject: Re: [OpenWrt-Devel] [PATCH v2 0/3] Speed up caldata/eeprom
> handling for ar71xx/ath79
> 
> I suggest Adrian's. I was too lazy to patch them all. Only merging
> this what matters.
> 
> пн, 25 февр. 2019 г. в 20:27, Christian Lamparter <chunkeey@gmail.com>:
> >
> > Hello,
> >
> > On Friday, February 22, 2019 7:52:37 PM CET Dmitry Tunin wrote:
> > > пт, 22 февр. 2019 г. в 21:48, Adrian Schmutzler
> <freifunk@adrianschmutzler.de>:
> > > >
> > > > Based on the ipq40xx commit from chunkeey, I tried to do the same for
> > > > ar71xx/ath79.
> > > >
> > > I want to add that without this patch firmware extraction is not fast
> > > enough to get it in time after a flash. That's why wireless needs a
> > > restart.
> >
> > I have a question for you too. There are currently two competing patches
> > for the ath79 10-ath9k-eeprom extraction:
> >
> > https://patchwork.ozlabs.org/patch/1046790/
> >
> > https://patchwork.ozlabs.org/patch/1047062/
> >
> > Now, Dmitry' was faster with his version, but Adrian's version
> > patches everything so which one should it be?
> >
> > (I'll write some more about the future of the extraction in the
> > other thread).
> >
> > Cheers
> > Christian
> >
> >
> 
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Dmitry Tunin Feb. 25, 2019, 6:16 p.m. UTC | #8
пн, 25 февр. 2019 г. в 21:08, Adrian Schmutzler <mail@adrianschmutzler.de>:
>
> So we both step back, same situation again ;-)
>
> I only just read the "Something like this for ar71xx, ath79 and ramips, untested." in Dmitry's proposal, so I would do the following:
>
> Merge my patches, so we have the speed-up (without much code change) quickly.
>
> At some later point either Dmitry or I can/should take up a unified approach and test it thoroughly.
>
> Best
>
> Adrian
>

That was Petr Štetiar approach to unify. I was a bit concerned that I
can't test it really well on multiple platforms, so I've sent the one
I could.


> > -----Original Message-----
> > From: openwrt-devel [mailto:openwrt-devel-bounces@lists.openwrt.org] On
> > Behalf Of Dmitry Tunin
> > Sent: Montag, 25. Februar 2019 19:01
> > To: Christian Lamparter <chunkeey@gmail.com>
> > Cc: Adrian Schmutzler <freifunk@adrianschmutzler.de>; openwrt-
> > devel@lists.openwrt.org
> > Subject: Re: [OpenWrt-Devel] [PATCH v2 0/3] Speed up caldata/eeprom
> > handling for ar71xx/ath79
> >
> > I suggest Adrian's. I was too lazy to patch them all. Only merging
> > this what matters.
> >
> > пн, 25 февр. 2019 г. в 20:27, Christian Lamparter <chunkeey@gmail.com>:
> > >
> > > Hello,
> > >
> > > On Friday, February 22, 2019 7:52:37 PM CET Dmitry Tunin wrote:
> > > > пт, 22 февр. 2019 г. в 21:48, Adrian Schmutzler
> > <freifunk@adrianschmutzler.de>:
> > > > >
> > > > > Based on the ipq40xx commit from chunkeey, I tried to do the same for
> > > > > ar71xx/ath79.
> > > > >
> > > > I want to add that without this patch firmware extraction is not fast
> > > > enough to get it in time after a flash. That's why wireless needs a
> > > > restart.
> > >
> > > I have a question for you too. There are currently two competing patches
> > > for the ath79 10-ath9k-eeprom extraction:
> > >
> > > https://patchwork.ozlabs.org/patch/1046790/
> > >
> > > https://patchwork.ozlabs.org/patch/1047062/
> > >
> > > Now, Dmitry' was faster with his version, but Adrian's version
> > > patches everything so which one should it be?
> > >
> > > (I'll write some more about the future of the extraction in the
> > > other thread).
> > >
> > > Cheers
> > > Christian
> > >
> > >
> >
> > _______________________________________________
> > openwrt-devel mailing list
> > openwrt-devel@lists.openwrt.org
> > https://lists.openwrt.org/mailman/listinfo/openwrt-devel
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel