CVSROOT:        /cvs
Module name:    src
Changes by:     jmatt...@cvs.openbsd.org        2022/11/21 23:48:32

Modified files:
        sys/dev/pci    : if_mcx.c 

Log message:
Allocate additional command queue slots and use command completion events
to run commands where we can sleep while waiting.  Rather than actually
using it as a queue, just allocate the slots to particular uses.
The first slot is used for polled commands (anything run while cold),
then there's one for general ioctls, one for kstat reads, and one for
link operations.  Since we can sleep while waiting now, we need to serialize
access to the command slots.  This is done with rwlocks for the ioctl and
kstat slots, and link slot is only used from a single instance task.
This also means we don't need to hold the kernel lock while doing kstat
reads.

Using interrupt based command completion drops the time taken to read all
the kstats off mcx interfaces from tens of milliseconds to almost nothing,
which is a pretty big win when you're reading them every few seconds on
busy firewalls.

ok dlg@

Reply via email to