RE: [PATCH] mempool: optimize get objects with constant n

2023-06-07 Thread Morten Brørup
> From: Morten Brørup > Sent: Wednesday, 7 June 2023 10.34 > > > From: Thomas Monjalon [mailto:tho...@monjalon.net] > > Sent: Wednesday, 7 June 2023 10.10 > > [...] > > What about doing a general comment at the top of the function, > > with the assignment of the pointer at the end of the array:

RE: [PATCH] mempool: optimize get objects with constant n

2023-06-07 Thread Morten Brørup
> From: Thomas Monjalon [mailto:tho...@monjalon.net] > Sent: Wednesday, 7 June 2023 10.10 > > 07/06/2023 10:03, Morten Brørup: > > > From: Thomas Monjalon [mailto:tho...@monjalon.net] > > > Sent: Wednesday, 7 June 2023 09.52 > > > > > > 18/04/2023 14:55, Bruce Richardson: > > > > On Tue, Apr 18, 2

Re: [PATCH] mempool: optimize get objects with constant n

2023-06-07 Thread Thomas Monjalon
07/06/2023 10:03, Morten Brørup: > > From: Thomas Monjalon [mailto:tho...@monjalon.net] > > Sent: Wednesday, 7 June 2023 09.52 > > > > 18/04/2023 14:55, Bruce Richardson: > > > On Tue, Apr 18, 2023 at 01:29:49PM +0200, Morten Brørup wrote: > > > > From: Bruce Richardson [mailto:bruce.richard...@in

RE: [PATCH] mempool: optimize get objects with constant n

2023-06-07 Thread Morten Brørup
> From: Thomas Monjalon [mailto:tho...@monjalon.net] > Sent: Wednesday, 7 June 2023 09.52 > > 18/04/2023 14:55, Bruce Richardson: > > On Tue, Apr 18, 2023 at 01:29:49PM +0200, Morten Brørup wrote: > > > From: Bruce Richardson [mailto:bruce.richard...@intel.com] > > > > On Tue, Apr 11, 2023 at 08:4

Re: [PATCH] mempool: optimize get objects with constant n

2023-06-07 Thread Thomas Monjalon
18/04/2023 14:55, Bruce Richardson: > On Tue, Apr 18, 2023 at 01:29:49PM +0200, Morten Brørup wrote: > > From: Bruce Richardson [mailto:bruce.richard...@intel.com] > > > On Tue, Apr 11, 2023 at 08:48:45AM +0200, Morten Brørup wrote: > > > > + if (__extension__(__builtin_constant_p(n)) && n <=

RE: [PATCH] mempool: optimize get objects with constant n

2023-04-18 Thread Morten Brørup
> From: Morten Brørup > Sent: Tuesday, 18 April 2023 13.30 > > > From: Bruce Richardson [mailto:bruce.richard...@intel.com] > > Sent: Tuesday, 18 April 2023 13.07 > > > > On Tue, Apr 11, 2023 at 08:48:45AM +0200, Morten Brørup wrote: [...] > > > + /* > > > + * The request size i

Re: [PATCH] mempool: optimize get objects with constant n

2023-04-18 Thread Tyler Retzlaff
On Tue, Apr 18, 2023 at 05:50:56PM +0200, Morten Brørup wrote: > > From: Tyler Retzlaff [mailto:roret...@linux.microsoft.com] > > Sent: Tuesday, 18 April 2023 17.45 > > > > On Tue, Apr 18, 2023 at 05:30:27PM +0200, Morten Brørup wrote: > > > > From: Tyler Retzlaff [mailto:roret...@linux.microsoft.

RE: [PATCH] mempool: optimize get objects with constant n

2023-04-18 Thread Morten Brørup
> From: Tyler Retzlaff [mailto:roret...@linux.microsoft.com] > Sent: Tuesday, 18 April 2023 17.45 > > On Tue, Apr 18, 2023 at 05:30:27PM +0200, Morten Brørup wrote: > > > From: Tyler Retzlaff [mailto:roret...@linux.microsoft.com] > > > Sent: Tuesday, 18 April 2023 17.15 > > > > > > On Tue, Apr 18,

Re: [PATCH] mempool: optimize get objects with constant n

2023-04-18 Thread Tyler Retzlaff
On Tue, Apr 18, 2023 at 05:30:27PM +0200, Morten Brørup wrote: > > From: Tyler Retzlaff [mailto:roret...@linux.microsoft.com] > > Sent: Tuesday, 18 April 2023 17.15 > > > > On Tue, Apr 18, 2023 at 12:06:42PM +0100, Bruce Richardson wrote: > > > On Tue, Apr 11, 2023 at 08:48:45AM +0200, Morten Brør

RE: [PATCH] mempool: optimize get objects with constant n

2023-04-18 Thread Morten Brørup
> From: Tyler Retzlaff [mailto:roret...@linux.microsoft.com] > Sent: Tuesday, 18 April 2023 17.15 > > On Tue, Apr 18, 2023 at 12:06:42PM +0100, Bruce Richardson wrote: > > On Tue, Apr 11, 2023 at 08:48:45AM +0200, Morten Brørup wrote: > > > When getting objects from the mempool, the number of obje

Re: [PATCH] mempool: optimize get objects with constant n

2023-04-18 Thread Tyler Retzlaff
On Tue, Apr 18, 2023 at 12:06:42PM +0100, Bruce Richardson wrote: > On Tue, Apr 11, 2023 at 08:48:45AM +0200, Morten Brørup wrote: > > When getting objects from the mempool, the number of objects to get is > > often constant at build time. > > > > This patch adds another code path for this case, s

Re: [PATCH] mempool: optimize get objects with constant n

2023-04-18 Thread Bruce Richardson
On Tue, Apr 18, 2023 at 01:29:49PM +0200, Morten Brørup wrote: > > From: Bruce Richardson [mailto:bruce.richard...@intel.com] > > Sent: Tuesday, 18 April 2023 13.07 > > > > On Tue, Apr 11, 2023 at 08:48:45AM +0200, Morten Brørup wrote: > > > When getting objects from the mempool, the number of obj

Re: [PATCH] mempool: optimize get objects with constant n

2023-04-18 Thread Bruce Richardson
On Tue, Apr 18, 2023 at 01:29:49PM +0200, Morten Brørup wrote: > > From: Bruce Richardson [mailto:bruce.richard...@intel.com] > > Sent: Tuesday, 18 April 2023 13.07 > > > > On Tue, Apr 11, 2023 at 08:48:45AM +0200, Morten Brørup wrote: > > > When getting objects from the mempool, the number of obj

RE: [PATCH] mempool: optimize get objects with constant n

2023-04-18 Thread Morten Brørup
> From: Bruce Richardson [mailto:bruce.richard...@intel.com] > Sent: Tuesday, 18 April 2023 13.07 > > On Tue, Apr 11, 2023 at 08:48:45AM +0200, Morten Brørup wrote: > > When getting objects from the mempool, the number of objects to get is > > often constant at build time. > > > > This patch adds

Re: [PATCH] mempool: optimize get objects with constant n

2023-04-18 Thread Bruce Richardson
On Tue, Apr 11, 2023 at 08:48:45AM +0200, Morten Brørup wrote: > When getting objects from the mempool, the number of objects to get is > often constant at build time. > > This patch adds another code path for this case, so the compiler can > optimize more, e.g. unroll the copy loop when the entir

[PATCH] mempool: optimize get objects with constant n

2023-04-10 Thread Morten Brørup
When getting objects from the mempool, the number of objects to get is often constant at build time. This patch adds another code path for this case, so the compiler can optimize more, e.g. unroll the copy loop when the entire request is satisfied from the cache. On an Intel(R) Xeon(R) E5-2620 v4