[ovs-dev] [PATCH 2/2] dpif-netdev: Avoid copying netdev_flow_key in emc_processing()

Andy Zhou azhou at nicira.com
Mon Feb 1 20:56:24 UTC 2016


On Mon, Feb 1, 2016 at 11:15 AM, Ben Pfaff <blp at ovn.org> wrote:
> On Fri, Jan 29, 2016 at 07:14:35PM -0800, Andy Zhou wrote:
>> This is essentially the same patch as the original patched posted at:
>> http://openvswitch.org/pipermail/dev/2016-January/064971.html
>>
>> The original commit message:
>>     Before this commit, emc_processing() copied a netdev_flow_key if
>>     there was no exact-match cache (EMC) hit.  This commit eliminates
>>     the copy by constructing the netdev_flow_key in the place it would
>>     be copied.
>>
>>     Found by inspection.
>>
>>     Shahbaz (CCed) reports that this reduces the cost of an EMC miss by
>>     72 cycles in his test case in which the EMC is disabled.
>>     Presumably this is similarly valuable in cases where the EMC merely
>>     has few hits.
>>
>> However, the original patch introduced a slight performance drop for the
>> fast path, where every packets hits the emc cache.  This patch removes
>> the performance drop by only reloading the key variable when a miss
>> happens.
>>
>> CC: Muhammad Shahbaz <mshahbaz at cs.princeton.edu>
>> Signed-off-by: Ben Pfaff <blp at ovn.org>
>> Sgned-off-by: Andy Zhou <azhou at ovn.org>
>
> Oops, I applied my version of this after getting your and Daniele's
> acks.  You'll probably have to respin this series, sorry.

Sure. I rebased and posted a V2.



More information about the dev mailing list