[ovs-dev] [PATCH v3 06/12] cmap: Remove prefetching in cmap_find_batch().

Bodireddy, Bhanuprakash bhanuprakash.bodireddy at intel.com
Tue Oct 18 16:20:52 UTC 2016


>-----Original Message-----
>From: Daniele Di Proietto [mailto:diproiettod at ovn.org]
>Sent: Tuesday, October 18, 2016 4:07 AM
>To: Bodireddy, Bhanuprakash <bhanuprakash.bodireddy at intel.com>
>Cc: dev at openvswitch.org
>Subject: Re: [ovs-dev] [PATCH v3 06/12] cmap: Remove prefetching in
>cmap_find_batch().
>
>
>
>2016-10-14 7:37 GMT-07:00 Bhanuprakash Bodireddy
><bhanuprakash.bodireddy at intel.com>:
>prefetching the data in to the caches isn't improving the performance in
>cmap_find_batch(). Moreover its found that there is slight improvement
>in performance with out prefetching.
>
>This patch removes prefetching from cmap_find_batch().
>
>Signed-off-by: Bhanuprakash Bodireddy
><bhanuprakash.bodireddy at intel.com>
>Co-authored-by: Antonio Fischetti <antonio.fischetti at intel.com>
>Signed-off-by: Antonio Fischetti <antonio.fischetti at intel.com>
>
>I tested this patch in isolation and on my system I didn't notice any
>improvements for a single flow (with EMC disabled), I noticed a slight drop
>instead with 128 flows in the classifier.
>Probably this is due to the fact that I didn't apply yet the first patch of the
>series (the one that increases the batch to 32), so I guess I'll defer this patch
>until we can apply the rest of the series.
>Also, if you guys see an improvement (and since you got some evidence with
>VTune), I don't think it matters that on one particular system (mine) I can't see
>any benefit.
I am testing this on haswell and VTune confirmed our observation. Also prefetching
Is done at 4 places in cmap_find_batch() and at two places the prefetching is done just before
the data is accessed.  
As prefetch instruction has some overhead, prefetching should be done well enough
in advance to have performance gains. Also prefetching too earlier can has negative effect
as the prefetched data can be flushed by other access.  We played around a bit and found
removing the prefetching doesn't impact the performance and hence submitted this patch.

Regards,
Bhanu Prakash. 

>
>Thanks,
>Daniele
>
>



More information about the dev mailing list