Project

General

Profile

Actions

Bug #960

closed

parallelize ifnet.if_addrhead

Added by sepherosa about 16 years ago. Updated almost 16 years ago.

Status:
Closed
Priority:
Low
Assignee:
-
Category:
-
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:

Description

Hi,

Following patch parallelizes ifnet.if_addrhead accessing
Change ifnet.if_addrhead is serialized by netisr0

Please review it:
http://leaf.dragonflybsd.org/~sephe/ifaddr.diff5

I have run this patch on all of my boxes for ~one month, so it should
be safe to test, if your box is not two miles away from you :)

Best Regards,
sephe

Actions #1

Updated by dillon about 16 years ago

:Hi,
:
:Following patch parallelizes ifnet.if_addrhead accessing
:Change ifnet.if_addrhead is serialized by netisr0
:
:Please review it:
:http://leaf.dragonflybsd.org/~sephe/ifaddr.diff5
:
:I have run this patch on all of my boxes for ~one month, so it should
:be safe to test, if your box is not two miles away from you :)
:
:Best Regards,
:sephe

It looks reasonable.  I'm not sure if you are going to need a
critical section inside ifa_iflink() and ifa_ifunlink().
I'm a tad worried about ifa_iflink/unlink calls being made from
interrupt threads. It should work even with a migration race.
The overhead will be nasty but those calls aren't in the critical
path so as long as it works I think it is fine.
-Matt
Actions #2

Updated by sepherosa about 16 years ago

On Wed, Mar 5, 2008 at 3:37 AM, Matthew Dillon
<> wrote:

:Hi,

:
:Following patch parallelizes ifnet.if_addrhead accessing
:Change ifnet.if_addrhead is serialized by netisr0
:
:Please review it:
:http://leaf.dragonflybsd.org/~sephe/ifaddr.diff5
:
:I have run this patch on all of my boxes for ~one month, so it should
:be safe to test, if your box is not two miles away from you :)
:
:Best Regards,
:sephe

It looks reasonable. I'm not sure if you are going to need a
critical section inside ifa_iflink() and ifa_ifunlink().

I'm a tad worried about ifa_iflink/unlink calls being made from
interrupt threads. It should work even with a migration race.

The overhead will be nasty but those calls aren't in the critical
path so as long as it works I think it is fine.

Well, that's also what uneases me too.
I will generate a more involved patch :)

Best Regards,
sephe

Actions #3

Updated by sepherosa about 16 years ago

On Wed, Mar 5, 2008 at 3:37 AM, Matthew Dillon
<> wrote:

:Hi,

:
:Following patch parallelizes ifnet.if_addrhead accessing
:Change ifnet.if_addrhead is serialized by netisr0
:
:Please review it:
:http://leaf.dragonflybsd.org/~sephe/ifaddr.diff5
:
:I have run this patch on all of my boxes for ~one month, so it should
:be safe to test, if your box is not two miles away from you :)
:
:Best Regards,
:sephe

It looks reasonable. I'm not sure if you are going to need a
critical section inside ifa_iflink() and ifa_ifunlink().

I'm a tad worried about ifa_iflink/unlink calls being made from
interrupt threads. It should work even with a migration race.

The overhead will be nasty but those calls aren't in the critical
path so as long as it works I think it is fine.

OK, it is done, please review it:
http://leaf.dragonflybsd.org/~sephe/ifaddr.diff8

Some additional changes:
- Add SI_SUB_PRE_DRIVERS so all ifaddr threads are ready before NIC
driver is attaching
- Move netisr_init to SI_SUB_PRE_DRIVERS, so ifaddr threads could
register themselves for port syncing

Best Regards,
sephe

Actions #4

Updated by hasso almost 16 years ago

Committed.

Actions

Also available in: Atom PDF