Commit Graph

48786 Commits

Author SHA1 Message Date
scottl
6a255763d7 Destroy mutexes on detach. 2004-08-12 05:31:17 +00:00
scottl
6c91b9a2fa Change FREE() to free() 2004-08-12 05:09:17 +00:00
scottl
1db9aa9537 Remove the AAC_LOCK macros. They no longer abstract anything and only
obfuscate the code.  No functional differences.
2004-08-12 05:05:06 +00:00
scottl
1904a6897a Release the sync fib after the controller has been shut down. This also
releases the I/O lock instead of just leaking it.
2004-08-12 04:47:32 +00:00
rwatson
0d13c1f3d6 Set IFF_NEEDSGIANT for fwe network interface since the firewire
framework isn't yet MPSAFE.

Approved by:	simokawa
2004-08-12 03:02:16 +00:00
njl
023fb85f64 Fix the PRT entry code in acpi_pci_link to always add the entry, even if
there is no irq link.  Since we now use the stored copy of PRT, not the
one that used to be passed into acpi_pcib_route_interrupt(), we need it in
the list. [1]

Fix a bug in acpi_pci_find_prt() where we weren't checking the bus, thus
choosing the wrong PRT entry to use for routing the link.  Also, add a
printf for the case where the PRT entry is not found as this should not
happen.

Tested by:	marcel [1]
2004-08-12 02:06:19 +00:00
rwatson
c1da641947 When udp_send() fails, make sure to free the control mbufs as well as
the data mbuf.  This was done in most error cases, but not the case
where the inpcb pointer is surprisingly NULL.
2004-08-12 01:34:27 +00:00
pjd
d1919d7938 MFp4: Simplify code a bit:
- Remove kern.geom.mirror.sync_block_size sysctl. It is quite obvious that we
  want to use the biggest size possible.
- Do not use UMA zone for sync data allocations. There could be only one
  synchronization request per synchronized disk at a time, so allocate memory
  for one request on whole synchronization process related to one disk.

Tested by synchronizing one component (out of three) and by synchronizing
two components (out of three) in parallel.
2004-08-11 23:41:53 +00:00
davidxu
54683a131e Mark end of frames. 2004-08-11 23:23:05 +00:00
pjd
2f865036c5 Actually, HARDCODED flag isn't stored in metadata, so don't bother
dumping it.
2004-08-11 22:16:42 +00:00
pjd
e5e3810748 - Fix typo.
- Dump HARDCODED flag.
2004-08-11 22:12:44 +00:00
truckman
09614db818 Deorbit the fxp tuning hint (hint.fxp.UNIT_NUMBER.ipcbxmit_disable)
introduced in if_fxp.c revision 1.180.  The bug fix committed in
revision 1.180 fixed the packet truncation problem.
2004-08-11 21:41:25 +00:00
marius
4ae1646ed5 Unbreak after struct resource was hidden. Tested with EBus front-end on
Sun AXe board.
2004-08-11 21:19:31 +00:00
marius
12f47e5a96 - Use the rman_get_* functions instead of reaching into struct resource.
- Remove __RMAN_RESORUCE_VISIBLE again. It's no longer required either
  because of the above change or because struct rman is no longer hidden.

Reviewed by:	grehan
Tested by:	cross-compile on i386
2004-08-11 21:09:40 +00:00
julian
765ec5c83b Properly keep track of how many kses are on the system run queue(s). 2004-08-11 20:54:48 +00:00
njl
e4f9b5dde9 Add some more verbose warning/error messages to help with users reporting
problems with irq routing.
2004-08-11 20:37:24 +00:00
gibbs
43882d2992 Correctly export the size of our softc to newbus in our EISA attachement.
This avoids a panic upon first softc field reference.
2004-08-11 20:35:55 +00:00
andre
d87fe3ee1e Backout removal of UMA_ZONE_NOFREE flag for all zones which are established
for structures with timers in them.  It might be that a timer might fire
even when the associated structure has already been free'd.  Having type-
stable storage in this case is beneficial for graceful failure handling and
debugging.

Discussed with:	bosko, tegge, rwatson
2004-08-11 20:30:08 +00:00
andre
3dc2f7c661 Convert the routing table to use an UMA zone for rtentries. The zone is
called "rtentry".

This saves a considerable amount of kernel memory.  R_Zmalloc previously
used 256 byte blocks (plus kmalloc overhead) whereas UMA only needs 132
bytes.

Idea from:	OpenBSD
2004-08-11 17:26:56 +00:00
imp
5e29f016e3 Remove badly broken pcic driver for NEWCARD 2004-08-11 17:24:42 +00:00
imp
177078fee8 Remove pcic for NEWCARD 2004-08-11 17:23:32 +00:00
imp
c56d510f5b Remove references to pcic for newcard from NOTES. 2004-08-11 17:22:37 +00:00
andre
a6a5e26503 Remove the UMA_ZONE_NOFREE flag to all uma_zcreate() calls in the IP and
TCP code.  This flag would have prevented giving back excessive free slabs
to the global pool after a transient peak usage.
2004-08-11 17:08:31 +00:00
njl
41ff46537c Re-work ACPI PCI IRQ routing (_PRT, link devices). The old approach was
incomplete in that the PRT routing was not aware of link programming.
Fix this by doing all routing through the link devices.  The new algorithm
for setting up links is:

1. Read _CRS to get current setting.  If invalid (not in _PRS), then set
   to 0.
2. Attempt to call _DIS on the link.  If successful, mark the link as not
   routed.  Otherwise, assume it still is.

Then when a routing request occurs:

3. Update weights for all IRQs
4. Attempt to route the initial IRQ if valid
5. If that fails, walk through the sorted list, attempting to route IRQs.
6. Configure the trigger/polarity based on _PRS.

Other changes:
* Add acpi_pci_find_prt() to look up the PRT entry for a given device and
  acpi_pci_link_route() to select/route the best IRQ for it.
* Remove duplicated code in acpi_pcib_route_interrupt() that picked the
  first IRQ from _PRS.
* Remove unneeded arguments from acpi_pcib_resume() and friends.
* Ignore _STA on link devices but report if it seems strange.
* Add a prt_source handle to the PRT structure since the ACPI struct
  ACPI_PCI_ROUTING_TABLE uses a fixed-size entry for it.  We'll need to
  dynamically size this object if we want to use it the same way ACPI-CA
  does.  Null-terminate the source.

Tested by:	Luo Hong <luohong99_at_mails.tsinghua.edu.cn>,
		Jeffrey Katcher <jmkatcher_at_yahoo.com>
Info from:	jhb, Len Brown (Intel)
2004-08-11 14:52:50 +00:00
pjd
1f559bc298 Increase default kern.geom.stripe.maxmem to 50 elements. 2004-08-11 12:57:17 +00:00
andre
2dba36f65b Make use of in_localip() function and replace previous direct LIST_FOREACH
loops over INADDR_HASH.
2004-08-11 12:32:10 +00:00
harti
ecf74a0083 Exclusion list for easier import. 2004-08-11 12:25:09 +00:00
harti
f199ec9d83 This commit was generated by cvs2svn to compensate for changes in r133492,
which included commits to RCS files with non-trunk default branches.
2004-08-11 12:21:36 +00:00
harti
222df4eab2 Virgin import of NgATM shared kernel/user part 1.1 2004-08-11 12:21:36 +00:00
pjd
8623e8af4d When sending request once again because of ENOMEM, reset bio_children
and bio_inbed fields to 0. Without this change we can end up with
I/O leakage in some rare situations.
I tested this change by putting failure probability mechanism simlar
to this used in NOP class into g_clone_bio(9) function, so it was
able to return NULL with the given probability.

Discussed with:	phk
2004-08-11 12:04:35 +00:00
andre
a93503bce5 Add the function in_localip() which returns 1 if an internet address is for
the local host and configured on one of its interfaces.
2004-08-11 11:49:48 +00:00
andre
957506e985 Only invoke verify_path() for verrevpath and versrcreach when we have an IP packet. 2004-08-11 11:41:11 +00:00
pjd
dd8a1c6e2a Try harder to not panic on 'stop -f'.
After the commit, this command should be really safe to use.
2004-08-11 11:10:46 +00:00
andre
3d16b5d93e Only check for local broadcast addresses if the mbuf is flagged with M_BCAST. 2004-08-11 10:49:56 +00:00
andre
47aa08bf94 Consistently use NULL for pointer comparisons. 2004-08-11 10:46:15 +00:00
andre
d03ce8b4a3 Make IP fastforwarding ALTQ-aware by adding the input traffic conditioner
check and disabling the early output interface queue length check.
2004-08-11 10:42:59 +00:00
andre
000bdd697d RFC 2292 requires to check msg_controllen, in case that the kernel returns
an empty list for some reasons.

Obtained from:

 NetBSD: socket.h,v 1.62 2001/09/07 08:13:01 itojun
 OpenBSD: socket.h,v 1.39 2001/09/07 16:45:25 itojun

MFC after:	2 weeks
2004-08-11 10:18:49 +00:00
andre
0ad10fdbdf Correct the displayed bandwidth calculation for a readout via sysctl. The
saved value does not have to be scaled with HZ; it is already in bytes per
second.  Only the multiply by eight remains to show bits per second (bps).
2004-08-11 10:12:16 +00:00
marcel
a1d07a8a1f In set_regs(), flush the dirty registers onto the backingstore before
we update the registers. That way we don't have any dirty registers to
worry about and also know that bsp=bspstore, which makes updating the
RSE related registers predictable.
This is not the end of it. We need more validity checks, but for now
this allows us to complete the gdb testsuite without crashing the
kernel.
2004-08-11 05:29:13 +00:00
rwatson
ecf3da4376 Add 'axe' interface to NOTES so it is built with LINT as with other USB
network interface device drivers.
2004-08-11 04:44:49 +00:00
rwatson
4bd194b32a Assert the locks of inpcbinfo's and inpcb's passed into in_pcbconnect()
and in_pcbconnect_setup(), since these functions frob the port and
address state of inpcbs.
2004-08-11 04:35:20 +00:00
scottl
a3fba64440 Revert rev 1.93 and replace it by grabbing the vr lock before calling
mii_pollstat().  The previous was causing the vr lock to recurse.

PR:	kern/70189
2004-08-11 04:30:49 +00:00
rwatson
eed836416f Replace a reference to splnet() with a reference to locking in a comment. 2004-08-11 03:43:10 +00:00
rwatson
ff6c4b1448 Mark USB ethernet devices as IFF_NEEDSGIANT, since the USB framework
if_start routines cannot currently be entered without Giant.  When
the kernel is running with debug.mpsafenet != 0, this will defer
if_start execution to a task queue thread holding Giant, which may
introduce additional latency, but avoid incorrect execution.

Suggested by:	dfr
2004-08-11 03:38:55 +00:00
rwatson
ede585e991 Perform a lockless read to test whether an entropy havesting fifo is
full, avoiding the cost of mutex operations if it is.  We re-test
once the mutex is acquired to make sure it's still true before doing
the -modify-write part of the read-modify-write.  Note that due to
the maximum fifo depth being pretty deep, this is unlikely to improve
harvesting performance yet.

Approved by:	markm
2004-08-11 03:33:32 +00:00
marcel
fbbaea5f90 Add __elfN(dump_thread). This function is called from __elfN(coredump)
to allow dumping per-thread machine specific notes. On ia64 we use this
function to flush the dirty registers onto the backingstore before we
write out the PRSTATUS notes.

Tested on: alpha, amd64, i386, ia64 & sparc64
Not tested on: arm, powerpc
2004-08-11 02:35:06 +00:00
rwatson
36e89f928c Add ADAPTIVE_GIANT to GENERIC on i386, with the intent of making it
a standard configuration similar to [NO_]ADAPTIVE_MUTEXES.  This
feature causes Giant to be included in the set of mutexes adaptively
spun on.  It appears to have a positive effect on performance on SMP
across several workloads, including measurements of a 16% improvement
on buildworld, and 30%+ improvement for MySQL using the supersmack
benchmark with Giant over the network stack; a 6% improvement without
Giant on the network stack (as a result of less giant contention).
2004-08-11 01:34:18 +00:00
rwatson
371cf09cf7 In v_addpollinfo(), we allocate storage to back vp->v_pollinfo. However,
we may sleep when doing so; check that we didn't race with another thread
allocating storage for the vnode after allocation is made to a local
pointer, and only update the vnode pointer if it's still NULL.  Otherwise,
accept that another thread got there first, and release the local storage.

Discussed with:	jmg
2004-08-11 01:27:53 +00:00
emax
6e0dfecf1c Set IFF_RUNNING flag on the interface as soon as the control device is opened. 2004-08-11 00:12:27 +00:00
rwatson
bea97d03fe Modify vnode locking key: the v_pollinfo pointer itself is protected
by Giant; the contents are protected by the pollinfo mutex.  We rely
on Giant to prevent races in assigning the value of v_pollinfo.
2004-08-10 23:52:45 +00:00