Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 24 Feb 2012 18:07:07 +0700 (NOVT)
From:      Eugene Grosbein <eugen@eg.sd.rdtc.ru>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   kern/165444: [netisr] [patch] incorrect processing of net.isr.bindthreads=0
Message-ID:  <201202241107.q1OB77Bp081798@eg.sd.rdtc.ru>
Resent-Message-ID: <201202241110.q1OBA4qV078729@freefall.freebsd.org>

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

>Number:         165444
>Category:       kern
>Synopsis:       [netisr] [patch] incorrect processing of net.isr.bindthreads=0
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Feb 24 11:10:04 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Eugene Grosbein
>Release:        FreeBSD 8.2-STABLE i386
>Organization:
RDTC JSC
>Environment:
System: FreeBSD eg.sd.rdtc.ru 8.2-STABLE FreeBSD 8.2-STABLE #37: Wed Feb 15 14:22:03 NOVT 2012 root@eg.sd.rdtc.ru:/usr/local/obj/usr/local/src/sys/EG i386

>Description:

	I've tried to use loader tunnable 'net.isr.bindthreads=0'
	for 4-core router. Sometimes each of 4 NETISR kernel threads get
	full cpu mask 0,1,2,3 but sometimes some NETISR threads get bound
	to CPU3 only.

	See also:
http://lists.freebsd.org/pipermail/freebsd-hackers/2012-January/037597.html

>How-To-Repeat:

	See above. The effect is random.

>Fix:

	To ensure correct processing of tunnable, small correction is needed,
	something like this:

--- sys/net/netisr.c.orig	2012-02-24 17:45:37.000000000 +0700
+++ sys/net/netisr.c	2012-02-24 17:47:52.000000000 +0700
@@ -980,12 +980,10 @@
 	if (error)
 		panic("%s: swi_add %d", __func__, error);
 	pc->pc_netisr = nwsp->nws_intr_event;
-	if (netisr_bindthreads) {
-		error = intr_event_bind(nwsp->nws_intr_event, cpuid);
+		error = intr_event_bind(nwsp->nws_intr_event, netisr_bindthreads ? cpuid : NOCPU);
 		if (error != 0)
 			printf("%s: cpu %u: intr_event_bind: %d", __func__,
 			    cpuid, error);
-	}
 	NETISR_WLOCK();
 	nws_array[nws_count] = nwsp->nws_cpu;
 	nws_count++;


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201202241107.q1OB77Bp081798>