PERFORCE change 61122 for review
Julian Elischer
julian at FreeBSD.org
Tue Sep 7 00:02:49 PDT 2004
http://perforce.freebsd.org/chv.cgi?CH=61122
Change 61122 by julian at julian_ref on 2004/09/07 07:02:10
IFC at 61120
Affected files ...
.. //depot/projects/nsched/sys/dev/ed/if_ed.c#6 integrate
.. //depot/projects/nsched/sys/dev/firewire/sbp.c#6 integrate
.. //depot/projects/nsched/sys/kern/kern_event.c#7 integrate
.. //depot/projects/nsched/sys/kern/kern_switch.c#13 integrate
.. //depot/projects/nsched/sys/kern/kern_thr.c#16 integrate
.. //depot/projects/nsched/sys/kern/subr_witness.c#6 integrate
.. //depot/projects/nsched/sys/net/if.c#11 integrate
.. //depot/projects/nsched/sys/netgraph/ng_pptpgre.c#4 integrate
Differences ...
==== //depot/projects/nsched/sys/dev/ed/if_ed.c#6 (text+ko) ====
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/ed/if_ed.c,v 1.233 2004/08/13 23:04:23 rwatson Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/ed/if_ed.c,v 1.234 2004/09/06 21:14:32 glebius Exp $");
/*
* Device driver for National Semiconductor DS8390/WD83C690 based ethernet
@@ -67,7 +67,6 @@
#endif
#include <net/bpf.h>
-#include <net/bridge.h>
#include <machine/md_var.h>
@@ -2810,26 +2809,9 @@
eh = mtod(m, struct ether_header *);
/*
- * Don't read in the entire packet if we know we're going to drop it
- * and no bpf is active.
+ * Get packet, including link layer address, from interface.
*/
- if (!ifp->if_bpf && BDG_ACTIVE( (ifp) ) ) {
- struct ifnet *bif;
-
- ed_ring_copy(sc, buf, (char *)eh, ETHER_HDR_LEN);
- bif = bridge_in_ptr(ifp, eh) ;
- if (bif == BDG_DROP) {
- m_freem(m);
- return;
- }
- if (len > ETHER_HDR_LEN)
- ed_ring_copy(sc, buf + ETHER_HDR_LEN,
- (char *)(eh + 1), len - ETHER_HDR_LEN);
- } else
- /*
- * Get packet, including link layer address, from interface.
- */
- ed_ring_copy(sc, buf, (char *)eh, len);
+ ed_ring_copy(sc, buf, (char *)eh, len);
m->m_pkthdr.len = m->m_len = len;
==== //depot/projects/nsched/sys/dev/firewire/sbp.c#6 (text+ko) ====
@@ -31,7 +31,7 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
- * $FreeBSD: src/sys/dev/firewire/sbp.c,v 1.79 2004/07/20 04:49:44 simokawa Exp $
+ * $FreeBSD: src/sys/dev/firewire/sbp.c,v 1.80 2004/09/06 20:42:34 simokawa Exp $
*
*/
@@ -2787,6 +2787,7 @@
if (ocb == NULL) {
sdev->flags |= ORB_SHORTAGE;
printf("ocb shortage!!!\n");
+ splx(s);
return NULL;
}
STAILQ_REMOVE_HEAD(&sdev->free_ocbs, ocb);
==== //depot/projects/nsched/sys/kern/kern_event.c#7 (text+ko) ====
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/kern_event.c,v 1.79 2004/08/16 03:08:38 green Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/kern_event.c,v 1.80 2004/09/06 19:02:42 jmg Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -334,9 +334,6 @@
{
struct proc *p;
- if (kn->kn_status & KN_DETACHED)
- return;
-
p = kn->kn_ptr.p_proc;
knlist_remove(&p->p_klist, kn, 0);
kn->kn_ptr.p_proc = NULL;
@@ -859,7 +856,8 @@
} else if (kev->flags & EV_DELETE) {
kn->kn_status |= KN_INFLUX;
KQ_UNLOCK(kq);
- kn->kn_fop->f_detach(kn);
+ if (!(kn->kn_status & KN_DETACHED))
+ kn->kn_fop->f_detach(kn);
knote_drop(kn, td);
goto done;
}
@@ -1158,7 +1156,8 @@
* it _INFLUX.
*/
*kevp = kn->kn_kevent;
- kn->kn_fop->f_detach(kn);
+ if (!(kn->kn_status & KN_DETACHED))
+ kn->kn_fop->f_detach(kn);
knote_drop(kn, td);
KQ_LOCK(kq);
kn = NULL;
@@ -1357,7 +1356,8 @@
("KN_INFLUX set when not suppose to be"));
kn->kn_status |= KN_INFLUX;
KQ_UNLOCK(kq);
- kn->kn_fop->f_detach(kn);
+ if (!(kn->kn_status & KN_DETACHED))
+ kn->kn_fop->f_detach(kn);
knote_drop(kn, td);
KQ_LOCK(kq);
}
@@ -1369,7 +1369,8 @@
("KN_INFLUX set when not suppose to be"));
kn->kn_status |= KN_INFLUX;
KQ_UNLOCK(kq);
- kn->kn_fop->f_detach(kn);
+ if (!(kn->kn_status & KN_DETACHED))
+ kn->kn_fop->f_detach(kn);
knote_drop(kn, td);
KQ_LOCK(kq);
}
@@ -1672,7 +1673,8 @@
}
kn->kn_status |= KN_INFLUX;
KQ_UNLOCK(kq);
- kn->kn_fop->f_detach(kn);
+ if (!(kn->kn_status & KN_DETACHED))
+ kn->kn_fop->f_detach(kn);
knote_drop(kn, td);
influx = 1;
KQ_LOCK(kq);
==== //depot/projects/nsched/sys/kern/kern_switch.c#13 (text+ko) ====
@@ -86,7 +86,7 @@
***/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/kern_switch.c,v 1.87 2004/09/06 07:23:14 julian Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/kern_switch.c,v 1.88 2004/09/07 06:38:22 julian Exp $");
#include "opt_sched.h"
@@ -342,9 +342,9 @@
* Totally ignore the ksegrp run queue.
*/
if (kg->kg_avail_opennings != 1) {
- if (limitcount < 100) {
+ if (limitcount < 1) {
limitcount++;
- printf("pid %d: bad slot count (%d)\n",
+ printf("pid %d: corrected slot count (%d->1)\n",
td->td_proc->p_pid, kg->kg_avail_opennings);
}
==== //depot/projects/nsched/sys/kern/kern_thr.c#16 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/kern_thr.c,v 1.25 2004/09/05 02:09:53 julian Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/kern_thr.c,v 1.26 2004/09/07 06:33:39 julian Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@@ -48,11 +48,15 @@
extern int max_threads_per_proc;
extern int max_groups_per_proc;
+SYSCTL_DECL(_kern_threads);
static int thr_scope_sys = 0;
-SYSCTL_DECL(_kern_threads);
SYSCTL_INT(_kern_threads, OID_AUTO, thr_scope_sys, CTLFLAG_RW,
&thr_scope_sys, 0, "sys or proc scope scheduling");
+static int thr_concurency = 0;
+SYSCTL_INT(_kern_threads, OID_AUTO, thr_concurrency, CTLFLAG_RW,
+ &thr_concurrency, 0, "a concurrency value if not default");
+
/*
* Back end support functions.
*/
@@ -133,7 +137,8 @@
sched_init_concurrency(newkg);
} else {
if ((td->td_proc->p_flag & P_HADTHREADS) == 0) {
- sched_set_concurrency(kg, mp_ncpus);
+ sched_set_concurrency(kg,
+ thr_concurrency ? thr_concurrency : (2*mp_ncpus));
}
}
==== //depot/projects/nsched/sys/kern/subr_witness.c#6 (text+ko) ====
@@ -82,7 +82,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/subr_witness.c,v 1.178 2004/08/04 20:31:19 jhb Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/subr_witness.c,v 1.179 2004/09/06 23:27:28 jmg Exp $");
#include "opt_ddb.h"
#include "opt_witness.h"
@@ -192,6 +192,7 @@
#endif
MALLOC_DEFINE(M_WITNESS, "witness", "witness structure");
+SYSCTL_NODE(_debug, OID_AUTO, witness, CTLFLAG_RW, 0, "Witness Locking");
/*
* If set to 0, witness is disabled. If set to 1, witness performs full lock
@@ -204,7 +205,8 @@
*/
static int witness_watch = 1;
TUNABLE_INT("debug.witness_watch", &witness_watch);
-SYSCTL_PROC(_debug, OID_AUTO, witness_watch, CTLFLAG_RW | CTLTYPE_INT, NULL, 0,
+TUNABLE_INT("debug.witness.watch", &witness_watch);
+SYSCTL_PROC(_debug_witness, OID_AUTO, watch, CTLFLAG_RW | CTLTYPE_INT, NULL, 0,
sysctl_debug_witness_watch, "I", "witness is watching lock operations");
#ifdef KDB
@@ -220,7 +222,8 @@
int witness_kdb = 0;
#endif
TUNABLE_INT("debug.witness_kdb", &witness_kdb);
-SYSCTL_INT(_debug, OID_AUTO, witness_kdb, CTLFLAG_RW, &witness_kdb, 0, "");
+TUNABLE_INT("debug.witness.kdb", &witness_kdb);
+SYSCTL_INT(_debug_witness, OID_AUTO, kdb, CTLFLAG_RW, &witness_kdb, 0, "");
/*
* When KDB is enabled and witness_trace is set to 1, it will cause the system
@@ -230,7 +233,8 @@
*/
int witness_trace = 1;
TUNABLE_INT("debug.witness_trace", &witness_trace);
-SYSCTL_INT(_debug, OID_AUTO, witness_trace, CTLFLAG_RW, &witness_trace, 0, "");
+TUNABLE_INT("debug.witness.trace", &witness_trace);
+SYSCTL_INT(_debug_witness, OID_AUTO, trace, CTLFLAG_RW, &witness_trace, 0, "");
#endif /* KDB */
#ifdef WITNESS_SKIPSPIN
@@ -239,8 +243,9 @@
int witness_skipspin = 0;
#endif
TUNABLE_INT("debug.witness_skipspin", &witness_skipspin);
-SYSCTL_INT(_debug, OID_AUTO, witness_skipspin, CTLFLAG_RDTUN, &witness_skipspin, 0,
- "");
+TUNABLE_INT("debug.witness.skipspin", &witness_skipspin);
+SYSCTL_INT(_debug_witness, OID_AUTO, skipspin, CTLFLAG_RDTUN,
+ &witness_skipspin, 0, "");
static struct mtx w_mtx;
static struct witness_list w_free = STAILQ_HEAD_INITIALIZER(w_free);
==== //depot/projects/nsched/sys/net/if.c#11 (text+ko) ====
@@ -27,7 +27,7 @@
* SUCH DAMAGE.
*
* @(#)if.c 8.5 (Berkeley) 1/9/95
- * $FreeBSD: src/sys/net/if.c,v 1.204 2004/09/02 05:07:29 brooks Exp $
+ * $FreeBSD: src/sys/net/if.c,v 1.205 2004/09/06 19:02:42 jmg Exp $
*/
#include "opt_compat.h"
@@ -219,9 +219,6 @@
{
struct knlist *klist = (struct knlist *)kn->kn_hook;
- if (kn->kn_status & KN_DETACHED)
- return;
-
knlist_remove(klist, kn, 0);
}
==== //depot/projects/nsched/sys/netgraph/ng_pptpgre.c#4 (text+ko) ====
@@ -36,7 +36,7 @@
*
* Author: Archie Cobbs <archie at freebsd.org>
*
- * $FreeBSD: src/sys/netgraph/ng_pptpgre.c,v 1.33 2004/05/29 00:51:11 julian Exp $
+ * $FreeBSD: src/sys/netgraph/ng_pptpgre.c,v 1.34 2004/09/06 19:53:58 glebius Exp $
* $Whistle: ng_pptpgre.c,v 1.7 1999/12/08 00:10:06 archie Exp $
*/
@@ -119,7 +119,7 @@
#define PPTP_XMIT_WIN 16 /* max xmit window */
#define PPTP_MIN_RTT (PPTP_TIME_SCALE / 10) /* 100 milliseconds */
#define PPTP_MIN_TIMEOUT (PPTP_TIME_SCALE / 83) /* 12 milliseconds */
-#define PPTP_MAX_TIMEOUT (1 * PPTP_TIME_SCALE) /* 1 second */
+#define PPTP_MAX_TIMEOUT (3 * PPTP_TIME_SCALE) /* 3 seconds */
/* When we recieve a packet, we wait to see if there's an outgoing packet
we can piggy-back the ACK off of. These parameters determine the mimimum
More information about the p4-projects
mailing list