[dpdk-dev] [PATCH v1] change hugepage sorting to avoid overlapping memcpy

2015-09-09 Thread Ralf Hoffmann
Hi Sergio, On 08.09.2015 14:45, Gonzalez Monroy, Sergio wrote: > Just a few comments/suggestions: > > Add 'eal/linux:' to the commit title, ie: > "eal/linux: change hugepage sorting to avoid overlapping memcpy" > I would modify the patch according to your notes if needed, but if you consider

[dpdk-dev] [PATCH v1] change hugepage sorting to avoid overlapping memcpy

2015-09-08 Thread Gonzalez Monroy, Sergio
On 08/09/2015 14:29, Jay Rolette wrote: > Most of the code in sort_by_physaddr() should be replaced by a call to > qsort() instead. Less code and gets rid of an O(n^2) sort. It's only > init code, but given how long EAL init takes, every bit helps. > Fair enough. Actually, we already use qsort in

[dpdk-dev] [PATCH v1] change hugepage sorting to avoid overlapping memcpy

2015-09-08 Thread Gonzalez Monroy, Sergio
Hi Ralf, Just a few comments/suggestions: Add 'eal/linux:' to the commit title, ie: "eal/linux: change hugepage sorting to avoid overlapping memcpy" On 04/09/2015 11:14, Ralf Hoffmann wrote: > with only one hugepage or already sorted hugepage addresses, the sort > function called memcpy with

[dpdk-dev] [PATCH v1] change hugepage sorting to avoid overlapping memcpy

2015-09-08 Thread Jay Rolette
Most of the code in sort_by_physaddr() should be replaced by a call to qsort() instead. Less code and gets rid of an O(n^2) sort. It's only init code, but given how long EAL init takes, every bit helps. I submitted a patch for this close to a year ago: http://dpdk.org/dev/patchwork/patch/2061/ Ja

[dpdk-dev] [PATCH v1] change hugepage sorting to avoid overlapping memcpy

2015-09-04 Thread Ralf Hoffmann
with only one hugepage or already sorted hugepage addresses, the sort function called memcpy with same src and dst pointer. Debugging with valgrind will issue a warning about overlapping area. This patch changes the bubble sort to avoid this behavior. Also, the function cannot fail any longer. Sig