Re: [PATCH] ring: optimize corner case for enqueue/dequeue

2022-02-05 Thread David Marchand
On Tue, Jan 11, 2022 at 12:38 PM Andrzej Ostruszka wrote: > 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 sl

RE: [PATCH] ring: optimize corner case for enqueue/dequeue

2022-01-11 Thread Morten Brørup
> From: Andrzej Ostruszka [mailto:a...@semihalf.com] > Sent: Tuesday, 11 January 2022 14.46 > > On Tue, Jan 11, 2022 at 01:00:25PM +0100, Morten Brørup wrote: > [...] > > Also this version of the patch: > > > > Reviewed-by: Morten Brørup > > My apologies Morten, don't know how I missed your tag.

Re: [PATCH] ring: optimize corner case for enqueue/dequeue

2022-01-11 Thread Andrzej Ostruszka
On Tue, Jan 11, 2022 at 01:00:25PM +0100, Morten Brørup wrote: [...] > Also this version of the patch: > > Reviewed-by: Morten Brørup My apologies Morten, don't know how I missed your tag. With regards Andrzej Ostruszka

RE: [PATCH] ring: optimize corner case for enqueue/dequeue

2022-01-11 Thread Morten Brørup
> From: Andrzej Ostruszka [mailto:a...@semihalf.com] > Sent: Tuesday, 11 January 2022 12.38 > > 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