summaryrefslogtreecommitdiffstats
path: root/sys
Commit message (Collapse)AuthorAgeFilesLines
* Fix a long-standing deadlock issue with vnode backed md(4) devices:phk2004-03-102-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | On vnode backed md(4) devices over a certain, currently undetermined size relative to the buffer cache our "lemming-syncer" can provoke a buffer starvation which puts the md thread to sleep on wdrain. This generally tends to grind the entire system to a stop because the event that is supposed to wake up the thread will not happen until a fair bit of the piled up I/O requests in the system finish, and since a lot of those are on a md(4) vnode backed device which is currently waiting on wdrain until a fair amount of the piled up ... you get the picture. The cure is to issue all VOP_WRITES on the vnode backing the device with IO_SYNC. In addition to more closely emulating a real disk device with a non-lying write-cache, this makes the writes exempt from rate-limited (there to avoid starving the buffer cache) and consequently prevents the deadlock. Unfortunately performance takes a hit. Add "async" option to give people who know what they are doing the old behaviour.
* Undo the previous commit, which was just plain wrong, and then correctlygad2004-03-101-2/+2
| | | | | | | increase _FreeBSD_version to reflect the 64-bTT change on sparc64. Noticed by: kris Pointy hat to: gad
* Increase __FreeBSD_version to reflect the transition from 32-bit togad2004-03-101-1/+1
| | | | 64-bit time_t on the FreeBSD/sparc64 architecture.
* Change time_t from a 32-bit value to a 64-bit value, on FreeBSD/sparc64gad2004-03-101-1/+1
| | | | | | | only. This is a MAJOR incompatible change for the sparc64 platform, but will not effect FreeBSD on other architectures. Reviewed by: imp for UPDATING, freebsd-sparc for the change itself.
* Eliminate multiple __FBSDID and sys/cdefs.h.bms2004-03-107-15/+0
|
* Remove `$Name$' leftovers from the port version reporting.mlaier2004-03-103-3/+0
| | | | | Noticed by: Craig Rodrigues Approved by: bms(mentor)
* Use the external clock input for our PLL.phk2004-03-101-1/+1
| | | | | | | | | | | This may not be a generally valid configuration, but neither is relying on the PCI clock to be stable. The only currently known and supported hardware is the VPN14x1 from Soekris, and since it has external clock, we fail safe(r) by using it. Unfortunately there is no way to probe this reliably.
* Remove the /* 1.2 */ comment which was orphaned by previous commit.phk2004-03-101-2/+0
|
* Rearrange some of the GEOM debugging tools to be more structured.phk2004-03-105-90/+71
| | | | | | | | | | | | | | | | | | Retire g_sanity() and corresponding debugflag (0x8) Retire g_{stall,release}_events(). Under #ifdef DIAGNOSTIC: Make g_valid_obj() an official function and have it return an an non-zero integer which indicates the kind of object when found. Implement G_VALID_{CLASS,GEOM,CONSUMER,PROVIDER}() macros based on g_valid_obj(). Sprinkle calls to these macros liberally over the infrastructure. Always check that we do not free a live object.
* Fix handling of tap/vmnet flag in relation to cloning and properly enforcephk2004-03-101-10/+8
| | | | | | largest supported unit number for this device driver. Reported by: Kaho Toshikazu <kaho@easy.es.tuat.ac.jp>
* Fix several issues related to the KeInitializeTimer() etc... API stuffwpaul2004-03-102-39/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | that I added recently: - When a periodic timer fires, it's automatically re-armed. We must make sure to re-arm the timer _before_ invoking any caller-supplied defered procedure call: the DPC may choose to call KeCancelTimer(), and re-arming the timer after the DPC un-does the effect of the cancel. - Fix similar issue with periodic timers in subr_ndis.c. - When calling KeSetTimer() or KeSetTimerEx(), if the timer is already pending, untimeout() it first before timeout()ing it again. - The old Atheros driver for the 5211 seems to use KeSetTimerEx() incorrectly, or at the very least in a very strange way that doesn't quite follow the Microsoft documentation. In one case, it calls KeSetTimerEx() with a duetime of 0 and a period of 5000. The Microsoft documentation says that negative duetime values are relative to the current time and positive values are absolute. But it doesn't say what's supposed to happen with positive values that less than the current time, i.e. absolute values that are in the past. Lacking any further information, I have decided that timers with positive duetimes that are in the past should fire right away (or in our case, after only 1 tick). This also takes care of the other strange usage in the Atheros driver, where the duetime is specified as 500000 and the period is 50. I think someone may have meant to use -500000 and misinterpreted the documentation. - Also modified KeWaitForSingleObject() and KeWaitForMultipleObjects() to make the same duetime adjustment, since they have the same rules regarding timeout values. - Cosmetic: change name of 'timeout' variable in KeWaitForSingleObject() and KeWaitForMultipleObjects() to 'duetime' to avoid senseless (though harmless) overlap with timeout() function name. With these fixes, I can get the 5211 card to associate properly with my adhoc net using driver AR5211.SYS version 2.4.1.6.
* Move the AH algorithm list from a static local function variable torwatson2004-03-101-37/+38
| | | | | | | | | a static const global variable in ah_core.c. This makes it more clear that this array does not require synchronization, as well as synchronizing the layout to the ESP algorithm list. This is the version of my patch that Itojun committed to the KAME tree. Obtained from: me, via KAME
* - Make the acquisition of Giant in vm_fault_unwire() conditional on thealc2004-03-103-15/+5
| | | | | | | | | | | | pmap. For the kernel pmap, Giant is not required. In general, for other pmaps, Giant is required by i386's pmap_pte() implementation. Specifically, the use of PMAP2/PADDR2 is synchronized by Giant. Note: In principle, updates to the kernel pmap's wired count could be lost without Giant. However, in practice, we never use the kernel pmap's wired count. This will be resolved when pmap locking appears. - With the above change, cpu_thread_clean() and uma_large_free() need not acquire Giant. (The first case is simply the revival of i386/i386/vm_machdep.c's revision 1.226 by peter.)
* Lock down IP-layer encapsulation library:rwatson2004-03-101-51/+35
| | | | | | | | | | | | | | | | | - Add encapmtx to protect ip_encap.c global variables (encapsulation list). - Unifdef #ifdef 0 pieces of encap_init() which was (and now really is) basically a no-op. - Lock encapmtx when walking encaptab, modifying it, comparing entries, etc. - Remove spl's. Note that currently there's no facilite to make sure outstanding use of encapsulation methods on a table entry have drained bfore we allow a table entry to be removed. As such, it's currently the caller's responsibility to make sure that draining takes place. Reviewed by: mlaier
* Scrub unused variable zeroin_addr.rwatson2004-03-102-3/+0
|
* make sure we had the filedesc lock when calling fdinit when RFCFDG is setjmg2004-03-101-0/+4
| | | | | | | on call to rfork. Submitted by: Brian Buchanan Semi-Reviewed by: rwatson
* Const-poison ethernet and FDDI broadcast address constants, as theyrwatson2004-03-092-2/+2
| | | | are accessed read-only.
* Remove duplicate code.jb2004-03-091-10/+0
| | | | Requested by: bde
* Trim unneeded includes from if_ndis_pccard.c and if_ndis_pci.c. Also removedwpaul2004-03-092-26/+0
| | | | unused variables from if_ndis_pccard.c
* Introduce stf_mtx to protect global softc list in if_stf. Addrwatson2004-03-091-8/+39
| | | | | | | | | | | | stf_destroy() to handle the common softc destruction path for the two destruction sources: interface cloning destroy, and module unload. NOTE: sc_ro, the cached route for stf conversion, is not synchronized against concurrent access in this change, that will follow in a future change. Reviewed by: pjd
* Introduce faith_mtx to protect the if_faith global softc list.rwatson2004-03-091-7/+27
| | | | | | Push if_faith softc destruction logic into faith_destroy() so that it can be called after softc list removal in both the clone destroy and module unload paths.
* If the resource listing obtained from BUS_GET_RESOURCE_LIST() inwpaul2004-03-091-0/+20
| | | | | | | | ndis_probe_pci() doesn't contain an entry for an IRQ resource, try to force one to be routed to us anyway by adding an extra call to bus_alloc_resource(). If this fails, then we have to abort the attach. Patch provided by jhb, tweaked by me.
* Introduce lo_mtx to protect the global loopback softc list. I'm notrwatson2004-03-091-1/+7
| | | | | | | | really sure why we have a softc list for if_loop, given that it can't be unloaded, but that's an issue to revisit in the future as corrupting the softc list would still cause panics. Reviewed by: benno
* Introduce disc_mtx to protect the global softc list in if_disc.rwatson2004-03-091-8/+29
| | | | | | | | | | | Since there are two destroy paths for if_disc interfaces -- module unload and cloan interface destroy, create a new utility function disc_destroy(), which is callded on a softc after it has been removed from the global softc list; the cloaner and module unload entry paths will both remove it before calling disc_destroy(). Reviewed by: pjd
* Fix an integer overflow when dealing with very large volumes. This bugle2004-03-091-1/+1
| | | | | | | | prevented newfs to work on volumes that are larger than 1TB. PR: 63577 Submitted by: Masaki Takakashi <mtakahashi@se.gtd.cosmo.co.jp> Approved by: grog (mentor), bde
* - Don't take sectorsize from first disk. Calculate it by findingpjd2004-03-091-19/+48
| | | | | | | least common multiple of all disks sector sizes. This will allow to safely concatenate disks with different sector sizes. - Mark unused function arguments. - Other minor cleanups.
* Print a space character between string given as a macro argument andpjd2004-03-091-0/+1
| | | | bio description.
* Since vinum doesn't fake disklabels anymore, remove get_volume_label().le2004-03-092-62/+0
| | | | | | | Also, remove stale write_volume_label() declaration; the write_volume_label() function was deleted 8 months ago. Approved by: grog (mentor)
* Simplify some logic in converting a buffer to an integer.njl2004-03-091-1/+3
|
* Use an unsigned int instead of an int for the Get/Set Integer interface.njl2004-03-092-6/+6
| | | | Pointed out by: le
* Reset the text attributes when initializing the console. The EFImarcel2004-03-091-0/+1
| | | | | loader typically doesn't do this so that we end up booting the with whatever the EFI loader has set it to last.
* Hook CPUs up to newbus. CPUs will ultimately be a bus driver so thatnjl2004-03-092-0/+68
| | | | | | | multiple CPU-specific drivers can attach. This is a work in progress so children aren't supported yet. Help from: jhb
* Add #ifdef CPU_SOEKRIS in the missing places around the led_* codejb2004-03-091-1/+10
| | | | | | | that is specific to those boards. This allows this file to compile again with CPU_ELAN enabled, but not CPU_SOEKRIS, for a Compulab board.
* AMD's ELAN documentation says that you write to the SYS_RST registerjb2004-03-091-0/+10
| | | | | | | | | in the Memory Mapped Configuration Region (MMCR) to reset the CPU. If CPU_ELAN is set, try this first to reset the CPU before the traditional way. Without this change, my Compulab board powers down on 'reset' instead of rebooting.
* Bump __FreeBSD_version for the pf install and write comments to UPDATING.mlaier2004-03-081-1/+1
| | | | Approved by: bms(mentor)
* Link pf to the build and install:mlaier2004-03-082-1/+20
| | | | | | | | | | | | | | | | This adds the former ports registered groups: proxy and authpf as well as the proxy user. Make sure to run mergemaster -p in oder to complete make installworld without errors. This also provides the passive OS fingerprints from OpenBSD (pf.os) and an example pf.conf. For those who want to go without pf; it provides a NO_PF knob to make.conf. __FreeBSD_version will be bumped soon to reflect this and to be able to change ports accordingly. Approved by: bms(mentor)
* Mark loadaverage callout as CALLOUT_MPSAFE.rwatson2004-03-081-1/+1
| | | | Reviewed by: jhb
* Add two new sysctls:pjd2004-03-082-4/+92
| | | | | | | | | | | - security.bsd.hardlink_check_uid, when set, means, that unprivileged users are not permitted to create hard links to files not owned by them, - security.bsd.hardlink_check_gid, when set, means, that unprivileged users are not permitted to create hard links to files owned by group they don't belong to. OK'ed by: rwatson
* Add a netgraph node to handle ATM LLC encapsulation. This currently handlesbenno2004-03-086-0/+332
| | | | | | | | | | ethernet (tested) and FDDI (not tested). The main use for this is on ADSL (or other ATM) connections where bridged ethernet is used, PPPoE being a prime example. There is no manual page as yet, I will write one shortly. Reviewed by: harti
* To comply with the spec, do not copy the TOS from the outer IPhsu2004-03-081-6/+6
| | | | | | | header to the inner IP header of the PIM Register if this is a PIM Null-Register message. Submitted by: Pavlin Radoslavov <pavlin@icir.org>
* Include <sys/types.h> for autoconf/automake detection.hsu2004-03-081-0/+2
| | | | Submitted by: Pavlin Radoslavov <pavlin@icir.org>
* Implement a work around for the deadlock avoidance case inalc2004-03-081-0/+7
| | | | | | vm_object_deallocate() so that it doesn't spin forever either. Submitted by: bde
* Add back Giant locks around kmem_free() call from user_ldt cleanup pathpeter2004-03-081-0/+2
| | | | | | during exit. Apparently it isn't safe after all. See uma_large_free(). Pointed out by: alc
* Move a vref call outside of proc locks and Giant. By virtue of the factpeter2004-03-081-5/+4
| | | | | | | that we (p1) are currently running, we hold a reference on p_textvp which means the vnode cannot go away. p2 cannot run yet (and hence cannot exit) so this should be safe to do at this point. As a bonus, it removes a block of under-Giant code that was there to support the vref.
* Other parts of the tree do not protect calls to kmem_free() with Giant,peter2004-03-081-2/+0
| | | | | so remove it from here. The most notable examples include vm_mmap(). This removes one more Giant event from exit(2).
* Stop depending on #include pollution from cpufunc.hpeter2004-03-081-0/+1
|
* MFi386: re-sort non-gcc function prototypes, trim includespeter2004-03-081-44/+30
|
* MFi386: curpcb is no longer null anymore, so do not test for it.peter2004-03-081-3/+1
|
* MFi386: set initial curpcb pcpu variable at startup time rather thanpeter2004-03-081-0/+1
| | | | waiting for a context switch
* MFi386: wait for local apic to become free before using itpeter2004-03-081-4/+2
|
OpenPOWER on IntegriCloud