[dpdk-dev] [PATCH] Avoid possible memory cpoy when sort hugepages

2014-12-11 Thread Qiu, Michael
On 12/11/2014 5:37 AM, Jay Rolette wrote: > On Wed, Dec 10, 2014 at 12:39 PM, Ananyev, Konstantin < > konstantin.ananyev at intel.com> wrote: > >>> I just got through replacing that entire function in my repo with a call >> to qsort() from the standard library last night myself. Faster >>> (althoug

[dpdk-dev] [PATCH] Avoid possible memory cpoy when sort hugepages

2014-12-10 Thread Ananyev, Konstantin
> From: Jay Rolette [mailto:rolette at infiniteio.com] > Sent: Wednesday, December 10, 2014 5:58 PM > To: Ananyev, Konstantin > Cc: Qiu, Michael; Richardson, Bruce; dev at dpdk.org > Subject: Re: [dpdk-dev] [PATCH] Avoid possible memory cpoy when sort hugepages > > > O

[dpdk-dev] [PATCH] Avoid possible memory cpoy when sort hugepages

2014-12-10 Thread Jay Rolette
On Wed, Dec 10, 2014 at 12:39 PM, Ananyev, Konstantin < konstantin.ananyev at intel.com> wrote: > > I just got through replacing that entire function in my repo with a call > to qsort() from the standard library last night myself. Faster > > (although probably not material to most deployments) and

[dpdk-dev] [PATCH] Avoid possible memory cpoy when sort hugepages

2014-12-10 Thread Jay Rolette
On Wed, Dec 10, 2014 at 5:08 AM, Ananyev, Konstantin < konstantin.ananyev at intel.com> wrote: > I wonder why we do need to write our own bubble sort procedure? > Why we can't use standard qsort() here? > Sadly, even bubble sort would be better than the selection sort being used here. It's guaran

[dpdk-dev] [PATCH] Avoid possible memory cpoy when sort hugepages

2014-12-10 Thread Ananyev, Konstantin
> -Original Message- > From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Qiu, Michael > Sent: Wednesday, December 10, 2014 10:59 AM > To: Richardson, Bruce > Cc: dev at dpdk.org > Subject: Re: [dpdk-dev] [PATCH] Avoid possible memory cpoy when sort hugepages >

[dpdk-dev] [PATCH] Avoid possible memory cpoy when sort hugepages

2014-12-10 Thread Qiu, Michael
On 12/10/2014 6:41 PM, Richardson, Bruce wrote: > On Wed, Dec 10, 2014 at 10:25:41AM +0800, Michael Qiu wrote: >> When the first address is the compared address in the loop, >> it will also do memory copy, which is meaningless, >> worse more, when hugepg_tbl is mostly in order. This should >> be a

[dpdk-dev] [PATCH] Avoid possible memory cpoy when sort hugepages

2014-12-10 Thread Bruce Richardson
On Wed, Dec 10, 2014 at 10:25:41AM +0800, Michael Qiu wrote: > When the first address is the compared address in the loop, > it will also do memory copy, which is meaningless, > worse more, when hugepg_tbl is mostly in order. This should > be a big deal in large hugepage memory systerm(like hunderd

[dpdk-dev] [PATCH] Avoid possible memory cpoy when sort hugepages

2014-12-10 Thread Michael Qiu
When the first address is the compared address in the loop, it will also do memory copy, which is meaningless, worse more, when hugepg_tbl is mostly in order. This should be a big deal in large hugepage memory systerm(like hunderd or thousand GB). Meanwhile smallest_idx never be a value of -1,so r