Page MenuHomeFreeBSD

iflib(4): Replace admin taskqueue group with per-interface taskqueues
AcceptedPublic

Authored by krzysztof.galazka_intel.com on Jul 22 2024, 4:26 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Oct 30, 5:29 PM
Unknown Object (File)
Wed, Oct 16, 12:26 AM
Unknown Object (File)
Sep 13 2024, 2:32 AM
Unknown Object (File)
Sep 11 2024, 3:56 PM
Unknown Object (File)
Sep 10 2024, 11:54 PM
Unknown Object (File)
Sep 10 2024, 10:22 PM
Unknown Object (File)
Sep 8 2024, 4:11 PM
Unknown Object (File)
Sep 7 2024, 9:12 AM

Details

Summary

Using one taskqueue group with single thread to execute all admin
tasks may lead to unexpected timeouts when long running task (e.g.
handling a reset after FW update) for one interface prevents
tasks from other interfaces being executed. Taskqueue group API
doesn't let to dynamically add threads, and pre-allocating thread
for each CPU as it's done for traffic queues would be a waste
of resources on systems with small number of interfaces. Replace
global taskqueue group for admin tasks with taskqueue allocated
for each interface to allow independent execution.

Signed-off-by: Krzysztof Galazka <krzysztof.galazka@intel.com>

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 60062
Build 56946: arc lint + arc unit

Event Timeline

Rebased on top of master.
Free taskqueue after releasing interrupts per jhb comment on Github.

jhb added a subscriber: jhb.

This looks ok to me, though I'm not intimately familiar with all of iflib.

This revision is now accepted and ready to land.Mon, Oct 21, 3:52 PM
kbowling added a subscriber: kbowling.

Seems reasonable to me. If there is any work that depends or interacts with these changes it would be nice to see them linked/referenced so we can look at that too but I can't foresee any problems.

sys/net/iflib.c
6339

Can this line be removed entirely?

6401

Can you explain how this works? Looks like we used to have vflr_task but this will not be needed anymore with the per interface task which I suppose could do the same work?

Seems reasonable to me. If there is any work that depends or interacts with these changes it would be nice to see them linked/referenced so we can look at that too but I can't foresee any problems.

There is no dependent work.

sys/net/iflib.c
6401

Uh, I'm sorry, I don't know what I was thinking. I changed iflib_iov_intr_deferred to enqueue a task to admin taskqueue but this task is never initialized. I need to fix that. Thanks for pointing this out.