[ovs-dev] [mask array v2] datapath: keep mask array compact when deleting mask

Ben Pfaff blp at nicira.com
Thu May 29 22:37:20 UTC 2014


No rush from my point of view, just going through patchwork.

On Thu, May 29, 2014 at 3:36 PM, Pravin Shelar <pshelar at nicira.com> wrote:
> I will review it by tomorrow.
>
> On Thu, May 29, 2014 at 2:08 PM, Ben Pfaff <blp at nicira.com> wrote:
>> This has been sitting in patchwork for a while. I guess that Pravin or
>> Jesse needs to review it?
>>
>> On Fri, May 16, 2014 at 5:33 PM, Andy Zhou <azhou at nicira.com> wrote:
>>> When deleting a mask from the mask array, we always move the last entry
>>> into its current location. Another approach can be NULL in its current
>>> place, and periodically compact it.
>>>
>>> The approach taken by this patch is more efficient during run time.
>>> During look up, fast path packet don't have to skip over NULL pointers.
>>>
>>> A more important advantage of this approach is that it tries to
>>> keep the mask array index stable by avoiding periodic index reshuffle.
>>>
>>> This patch implements an optimization to further promote index
>>> stability.  By leaving the last entry value intact when moving it to
>>> a new location, the old cache index can 'fix' themselves, by noticing
>>> the index in the cache is outside the valid mask array region. The new
>>> index can be found by scanning the mask pointer within the valid region.
>>>
>>> Signed-off-by: Andy Zhou <azhou at nicira.com>



-- 
"I don't normally do acked-by's.  I think it's my way of avoiding
getting blamed when it all blows up."               Andrew Morton



More information about the dev mailing list