Re: [PATCH 1/1] ring: fix off by 1 mistake

2022-01-11 Thread Andrzej Ostruszka
Thank you Morten, Olivier and Konstantin for taking look at it. I've just sent another version, with updates in commit message suggested by Olivier. With regards Andrzej Ostruszka

RE: [PATCH 1/1] ring: fix off by 1 mistake

2022-01-10 Thread Ananyev, Konstantin
> When enqueueing/dequeueing to/from the ring we try to optimize by manual > loop unrolling. The check for this optimization looks like: > > if (likely(idx + n < size)) { > > where 'idx' points to the first usable element (empty slot for enqueue, > data for dequeue). The correct compariso

Re: [PATCH 1/1] ring: fix off by 1 mistake

2022-01-06 Thread Olivier Matz
Hi Andrzej, On Mon, Jan 03, 2022 at 03:22:01PM +0100, Andrzej Ostruszka wrote: > ring: fix off by 1 mistake I suggest something less scary for the title: ring: optimize corner case for enqueue/dequeue > When enqueueing/dequeueing to/from the ring we try to optimize by manual > loop unrolling.

RE: [PATCH 1/1] ring: fix off by 1 mistake

2022-01-03 Thread Morten Brørup
+Ring queue maintainers: Honnappa Nagarahalli , Konstantin Ananyev > From: Andrzej Ostruszka [mailto:a...@semihalf.com] > Sent: Monday, 3 January 2022 15.22 > > When enqueueing/dequeueing to/from the ring we try to optimize by > manual > loop unrolling. The check for this optimization looks li