[ovs-dev] [PATCH v4 10/12] ofproto: Postpone sending flow removed messages.
Jarno Rajahalme
jrajahalme at nicira.com
Fri Jun 12 21:00:22 UTC 2015
> On Jun 10, 2015, at 5:57 PM, Jarno Rajahalme <jrajahalme at nicira.com> wrote:
>
>
>> On Jun 10, 2015, at 5:43 PM, Ben Pfaff <blp at nicira.com> wrote:
>>
>> On Tue, Jun 09, 2015 at 05:24:17PM -0700, Jarno Rajahalme wrote:
>>> The final flow stats are available only after there are no references
>>> to the rule. Postpone sending the flow removed message until the
>>> final stats are available.
>>>
>>> Signed-off-by: Jarno Rajahalme <jrajahalme at nicira.com>
>>
>> I'm a little nervous about doing so much work from a postpone callback.
>> This is probably because I tend to think of them in a kernel context,
>> where RCU callbacks run from (if I recall correctly) a softirq, where it
>> isn't safe to do much work. But I don't have a real reason to cite why
>> we shouldn't do this (except that we only have one ovsrcu thread, so
>> that we should avoid doing much work in it). Do you feel comfortable
>> with it?
>
> An alternative would be to queue the message sending via RCU callbacks for the main thread to do by itself later. Want me to try that out?
>
I prepared a patch that generalizes the "rule_executes” queue to a more generic deferred work queue. I kept the queue size limit (1024), although I’m not 100% sure that is appropriate for sending flow removed notifications.
I’ll send a v5 soon with this included.
Jarno
More information about the dev
mailing list