Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 9 Apr 2020 12:17:35 +0300
From:      =?UTF-8?B?w5Z6a2FuIEtJUklL?= <ozkan.kirik@gmail.com>
To:        freebsd-net@freebsd.org, freebsd-ipfw <freebsd-ipfw@freebsd.org>
Cc:        Luigi Rizzo <rizzo@iet.unipi.it>, "Andrey V. Elsukov" <bu7cher@yandex.ru>
Subject:   dummynet performance
Message-ID:  <CAAcX-AEamLFbAucFXYJ0k3FePddYC7M-OtQRsTgQ3UWz_z%2BBBA@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
Hello,

I wonder if it is possible to update dummynet code multi-threading capable
practically?
My idea is below:
- A new sysctl tunable will be defined as
"net.inet.ip.dummynet.thread_count" (default 1)
- To distribute tasks along threads, each sched instance can be assigned to
different thread.
- By default, all schedulers assigned to thread 0 if no thread_id is set.
With a new option named "thr_id" affinity can be set. as below:
  ipfw sched 1 config type QFQ   (by defaut thr_id = 0)
  ipfw sched 2 config type QFQ thr_id 1
  ipfw sched 3 config type QFQ thr_id 2
  ipfw sched 4 config type FIFO thr_id 3
  ipfw sched 5 config type FIFO thr_id 3  ( sched 4 & 5 assigned to same
thread 3 )

I think this approach is more easy then completely rewrite or other
solutions.

What is the right way to do this? Where to start?
I read the explanations in /usr/src/sys/netpfil/ipfw/dummynet.txt

On this line below, multiple threads (count can be get from sysctl
"net.inet.ip.dummynet. thread_count" tunable)
https://github.com/freebsd/freebsd/blob/master/sys/netpfil/ipfw/ip_dummynet.c#L2556

Thanks



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAAcX-AEamLFbAucFXYJ0k3FePddYC7M-OtQRsTgQ3UWz_z%2BBBA>