Project

General

Profile

Actions

Bug #940

closed

dispatch tcp_close to the correct CPU to run

Added by sepherosa about 16 years ago. Updated over 15 years ago.

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

0%

Estimated time:

Description

Hi all,

In tcp_timer_2msl() we need to dispatch tcp_close() to the correct CPU
instead of calling it directly:
http://leaf.dragonflybsd.org/~sephe/tcp_timer.c.diff

Best Regards,
sephe

Actions #1

Updated by dillon about 16 years ago

:Hi all,
:
:In tcp_timer_2msl() we need to dispatch tcp_close() to the correct CPU
:instead of calling it directly:
:http://leaf.dragonflybsd.org/~sephe/tcp_timer.c.diff
:
:Best Regards,
:sephe

It should already be on the correct cpu since the callout API is
all cpu localized. The only other entry point is via the pru_*
dispatch but I'm pretty sure that is cpu localized via
kern/uipc_msg.c.
If you haven't already, I recommend we assert that it is on the
correct cpu rather then route it to the correct cpu (which it
should already be on).
However, even though it will be on the correct cpu there could be
a threading issue... it won't be in the same thread as the tcp
protocol thread. The threads are not preemptive but the could
still be a problem.
-Matt
Matthew Dillon
<>
Actions #2

Updated by sepherosa about 16 years ago

If I added code in tcp_timer_before tcp_close() to printf mycpuid and
tp->tt_cpu, I got 1 for mycpuid and 0 for tp->tt_cpu.

Umm, yeah.

Best Regards,
sephe

Actions #3

Updated by sepherosa over 15 years ago

The real cause had been found out and fix was committed

Actions

Also available in: Atom PDF