Page MenuHomeFreeBSD

pfsync: Call pfsyncintr() directly from pfsync_msg_intr() rather than scheduling a swi
AbandonedPublic

Authored by kp on Nov 14 2018, 9:25 PM.
Tags
None
Referenced Files
F170557562: D17993.id.diff
Sat, Sep 5, 9:54 AM
Unknown Object (File)
Fri, Sep 4, 9:37 AM
Unknown Object (File)
Thu, Sep 3, 5:17 AM
Unknown Object (File)
Thu, Sep 3, 12:14 AM
Unknown Object (File)
Wed, Sep 2, 2:35 PM
Unknown Object (File)
Wed, Sep 2, 9:26 AM
Unknown Object (File)
Tue, Sep 1, 12:03 AM
Unknown Object (File)
Mon, Aug 31, 2:53 PM
Subscribers

Details

Reviewers
None
Group Reviewers
network
Summary

When we're done processing a batch of pfsync_msg we can immediately
proceed to pfsyncintr(), rather than schedule a swi (possibly several
times) during the processing. This reduces the swi scheduling overhead,
and also reduces contention on PFSYNC_LOCK.

Replace pfsync_push() calls in the pfsync_msg_intr() path by simply
setting the PFSYNCF_PUSH flag, because we'll always call pfsyncintr()
later. There's no need to schedule the swi.

In pfsync_q_ins() we don't need to schedule the swi either, because it's
always called through pfsync_msg_intr(), so pfsyncint() is guaranteed to
run.

In all other cases (like when we request an update in response to a
received update) we still schedule the swi. Those flows are unmodified.

Tests show a ~25% improvement in throughput.

Sponsored by: Orange Business Services

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 20815