Commit Graph

48774 Commits

Author SHA1 Message Date
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
njl
ada02c6182 Don't call DEVICE_RESUME a second time if DEVICE_SUSPEND fails. The
bus_generic_suspend method does this for us.  Disable interrupts before
entering S1.  This may help some systems suspend to S1 successfully.
2004-08-10 22:02:52 +00:00
alc
7210ecc993 Eliminate the acquisition and release of Giant within physio(). Remove
the spl calls.

Reviewed by: phk@
Discussed with: scottl@
2004-08-10 21:47:11 +00:00
alc
989ca43572 Add a comment describing pmap_extract_and_hold() noting that the protection
check still needs implementation on arm.
2004-08-10 21:43:40 +00:00
alc
5d60b8ae07 Add pmap locking to many of the functions.
Implement the protection check required by the pmap_extract_and_hold()
specification.

Remove the acquisition and release of Giant from pmap_extract_and_hold() and
pmap_protect().

Many thanks to Ken Smith for resolving a sparc64-specific initialization
problem in my original patch.

Tested by: kensmith@
2004-08-10 20:53:26 +00:00
le
8bc23a2edf If we kill the worklist thread of a RAID5 plex we can destroy
the worklist mutex at the same time, so move the mtx_destroy() call
to gv_kill_thread().
2004-08-10 20:51:48 +00:00
le
627d263e7e Lock the topology before calling gv_parse_config, not afterwards. 2004-08-10 20:15:12 +00:00
pjd
2d1d801e5f - Recognize HARDCODED flag when dumping consumer configuration.
- Improve code readabilty a bit.
2004-08-10 19:53:31 +00:00
pjd
f0d4b9a881 Forgot to commit those: introduce hardcoded provider functionality,
which allow to store provider's name in the metadata and avoid
problems when few providers share the same last sector.
2004-08-10 19:52:12 +00:00
marcel
0b97f253fb Comment-out the debugging printf I left in in case there were some
packet related problems. No problems have been reported.
2004-08-10 19:32:33 +00:00
pjd
4792c96714 Fix one of the lastest commit. This bio_caller1 should also be changed to
bio_driver1 (as all the rest).
This introduced a small memory leak, but it wasn't really critical,
because maximum memory for g_stripe_zone is always set, so after few
requests gstripe was working in "economic" mode.
2004-08-10 19:07:55 +00:00
jhb
15d4b7d989 Synchronize the extra SA threading checks and return value handling of
condition variables with that of msleep().

Reviewed by:	davidxu
2004-08-10 17:42:59 +00:00
green
d9efb7d719 Back out all behavioral chnages. 2004-08-10 14:42:48 +00:00