Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NuttX enable CONFIG_MEMSET_OPTSPEED #7815

Closed
dagar opened this issue Aug 18, 2017 · 6 comments
Closed

NuttX enable CONFIG_MEMSET_OPTSPEED #7815

dagar opened this issue Aug 18, 2017 · 6 comments

Comments

@dagar
Copy link
Member

dagar commented Aug 18, 2017

Setting CONFIG_MEMSET_OPTSPEED (Optimize memset() for speed) on NuttX decreases cpu usage by 2-3% on a pixracer configured as a multicopter. Most of the decrease is in the attitude controller and EKF (probably some of our excessive/unnecessary struct initialization). There's a small increase in flash.

Investigate CONFIG_ARCH_MEMSET as well.

@dagar
Copy link
Member Author

dagar commented Aug 22, 2017

TODO: write basic testing to verify nuttx memset options.

@davids5
Copy link
Member

davids5 commented Aug 24, 2017

@dagar Did you want this in before the NuttX upgrade?

@dagar
Copy link
Member Author

dagar commented Aug 24, 2017

To coincide with heavier NuttX testing?

@davids5
Copy link
Member

davids5 commented Aug 24, 2017

Yes it is 2 birds with one stone. But the rigorous testing may not be needed: It turns out there is no arch specific equivalent for memset like memcpy CONFIG_ARMV7M_MEMCPY - so my fears of a similar error in the calling convention are ill founded.

I have lit CONFIG_MEMSET_OPTSPEED and CONFIG_MEMSET_64BIT on master_nxphlite do you want it on master ?

@dagar
Copy link
Member Author

dagar commented Aug 24, 2017

I think it can wait, it'll be a nice little bonus with the update. Out of curiosity is there a way to bulk change all nuttx-configs for a single change like this or do you have to do each manually?

Fixed by ff8246f

@dagar dagar closed this as completed Aug 24, 2017
@davids5
Copy link
Member

davids5 commented Aug 24, 2017

@dagar For thing like this, I do a scoped search and replace and have a regex tool that converts the modified files list to a list of commit commands. For refreshes it is more a manuals process, running make oldconfig on each target.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants