... there are still problems, I need to rethink the approach.
Giovanni
need advice to implement blocking ring buffer
Moderators: RoccoMarco, lbednarz, utzig, tfAteba, barthess
- Giovanni
- Site Admin
- Posts: 14455
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
- alex31
- Posts: 379
- Joined: Fri May 25, 2012 10:23 am
- Location: toulouse, france
- Has thanked: 38 times
- Been thanked: 62 times
- Contact:
Re: need advice to implement blocking ring buffer
... there are still problems, I need to rethink the approach.
I just connect to the forum to say that it was working for me now, but apparently, not completely ...
what kind of problems have you detected with the present code ?
Alexandre
- alex31
- Posts: 379
- Joined: Fri May 25, 2012 10:23 am
- Location: toulouse, france
- Has thanked: 38 times
- Been thanked: 62 times
- Contact:
Re: need advice to implement blocking ring buffer
Only problem that i see for now is a performance problem, using 32 bytes buffers, random length read write, i bench 250kb/s witch chPipes, and 350 kb/s with mine on stm32f4 (-O0, -g) , otherwise, seems to work.
- Giovanni
- Site Admin
- Posts: 14455
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: need advice to implement blocking ring buffer
Hi,
I already made changes, you probably tested the latest code which corrected the problem I mentioned.
It still requires better tests, good to know it is working on your side anyway.
Performance may benefit from a larger buffer, it is mostly memcpy() anyway. It could improve by using critical zones instead of mutexes but that would have other undesirable side effects.
Giovanni
I already made changes, you probably tested the latest code which corrected the problem I mentioned.
It still requires better tests, good to know it is working on your side anyway.
Performance may benefit from a larger buffer, it is mostly memcpy() anyway. It could improve by using critical zones instead of mutexes but that would have other undesirable side effects.
Giovanni
Who is online
Users browsing this forum: No registered users and 29 guests