summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* MEGA Fixes / Cleanupariff2006-03-311-300/+239
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -------------------- - Seal the fate of long standing memory leak (4 years, 7 months) during pcm_unregister(). While destroying cdevs, scan / detect possible children and free its SLIST placeholder properly. - Optimize channel allocation / numbering even further. Do brute cyclic checking only if the channel numbering screwed. - Mega vchan create/destroy cleanup: o Implement pcm_setvchans() so everybody can use it freely instead of implementing their own, be it through sysctl or channel auto allocation. o Increase vchan creation/destruction resiliency: + it's possible to increase/decrease total vchans even during busy playback/recording. Busy channel will be left alone, untouched. Abusive test sample: # play whatever... # while : ; do sysctl hw.snd.pcm0.vchans=1 sysctl hw.snd.pcm0.vchans=10 sysctl hw.snd.pcm0.vchans=100 sysctl hw.snd.pcm0.vchans=200 done # Play something else, leave above loop running frantically. + Seal another 4 years old bug where it is possible to destroy (virtual) channel even when its cdevs being referenced by other process. The "First Come First Served" nature of dsp_clone() is the main culprit of this issue, and usually manifest itself as dangling channel <-> process association. Ensure that all of its cdevs are free from being referenced before destroying it (through ORPHAN_CDEVT() macross). All these fixes (including previous fixes) will be MFCed, later.
* - Increase snddev refcount earlier while accessing through sysctl interfaceariff2006-03-311-27/+34
| | | | | | | to avoid possible device unregister race (impossible to reproduce, yet possible). - Extra sanity check to ensure proper parent channel is being selected. - Reset parent channel once all of its children gone.
* Make the ATAPI sense data accessible when using the ioctl interfacesos2006-03-318-93/+107
| | | | MFC candidate.
* - Release the references acquired by VOP_GETWRITEMOUNT and vfs_getvfs().jeff2006-03-317-31/+62
| | | | | | Discussed with: tegge Tested by: kris Sponsored by: Isilon Systems, Inc.
* - Hold a reference from the time vfs_busy starts until vfs_unbusy isjeff2006-03-311-3/+9
| | | | | | | | | | | called. - vfs_getvfs has to return a reference to prevent the returned mountpoint from changing identities. - Release references acquired via vfs_getvfs. Discussed with: tegge Tested by: kris Sponsored by: Isilon Systems, Inc.
* - GETWRITEMOUNT now returns a referenced mountpoint to prevent itsjeff2006-03-311-1/+15
| | | | | | | | identity from changing. This is possible now that mounts are not freed. Discussed with: tegge Tested by: kris Sponsored by: Isilon Systems, Inc.
* - Allocate mounts from a uma zone that uses UMA_ZONE_NOFREE to preventjeff2006-03-311-8/+32
| | | | | | | | | | | | | | | mount memory from being reclaimed. This resolves a number of race conditions described in vfs_default.c and introduced with the VFS_LOCK_GIANT macros. - Let the mtx and lock remain valid after the mount structure has been freed by using init and fini calls. Technically fini will never be called but is included for completeness. - Consistently use lockmgr directly rather than lockmgr to lock and vfs_unbusy to unlock. Discussed with: tegge Tested by: kris Sponsored by: Isilon Systems, Inc.
* - Define mnt_startzero and mnt_endzero as a range that excludes mnt_mtxjeff2006-03-311-2/+4
| | | | | | | | | and mnt_lock so that the mountpoint can be explicitly zeroed on creation. Discussed with: tegge Tested by: kris Sponsored by: Isilon Systems, Inc.
* - LK_RETRY means nothing when passed to VOP_LOCK. Call vn_lock instead.jeff2006-03-311-1/+2
| | | | | | | | | | - Move the vn_lock of the dvp until after we've unbusied the filesystem to avoid a LOR with the mount point lock. - In the v_mountedhere while loop we acquire a new instance of giant each time through without releasing the first. This would cause us to leak Giant. Sponsored by: Isilon Systems, Inc.
* - Add the B_NEEDSGIANT flag which is only set if the vnode that owns a bufjeff2006-03-313-17/+39
| | | | | | | | | requires Giant. It is set in bgetvp and cleared in brelvp. - Create QUEUE_DIRTY_GIANT for dirty buffers that require giant. - In the buf daemon, only grab giant when processing QUEUE_DIRTY_GIANT and only if we think there are buffers in that queue. Sponsored by: Isilon Systems, Inc.
* Build uart(4) on PowerPC.marcel2006-03-311-2/+1
|
* Allow uart(4) to be built on PowerPC.marcel2006-03-312-0/+55
|
* Add a dummy implementation of bus_space_map().marcel2006-03-311-3/+9
|
* remove these vestiges of gdbserver.. It hasn't built in a long time, andjmg2006-03-312-365/+0
| | | | | now really belongs in gdb, not binutils.. Plus, these don't resemble what the new gdbserver looks like.
* fixup error handling in taskqueue_start_threads: check for kthread_createsam2006-03-301-11/+20
| | | | | | | | failing, print a message when we fail for some reason as most callers do not check the return value (e.g. 'cuz they're called from SYSINIT) Reviewed by: scottl MFC after: 1 week
* Include the sbus attachment of scc(1) when either fhc(4) or sbus(4)marcel2006-03-301-1/+1
| | | | is configured.
* Currently, if writing out a log entry fails, we unlink that log entry from ourcsjp2006-03-301-5/+12
| | | | | | | | | | | | internal list of logfiles. So if writev(2) fails for potentially transient errors like ENOSPC, syslogd requires a restart, even if the filesystem has purged. This change allows syslogd to ignore ENOSPC space errors, so that when the filesystem is cleaned up, syslogd will automatically start logging again without requiring the reset. This makes syslogd(8) a bit more reliable. MFC after: 1 week
* Optimize runtime performance, primary using the following techniques:jasone2006-03-301-285/+294
| | | | | | | | | | | | | | | * Avoid choosing an arena until it's certain that an arena is needed for allocation. * Convert division/multiplication to bitshifting where possible. * Avoid accessing TLS variables in single-threaded code. * Reduce the amount of pointer dereferencing. * Move lock acquisition in critical paths to only protect the the code that requires synchronization, and completely remove locking where possible.
* Expose res_update and friends again. At least, ports/mail/spamilterume2006-03-307-43/+38
| | | | | | | | | uses them. Now, we have res_nupdate and res_nmkupdate as well, but they are still based on our old resolver for binary backward compatibility. So, they don't provide new features such as TSIG support. Reported by: pointyhat via kris
* Revert to using acpi_max_threads instead of the hardcoded value of '3'.scottl2006-03-301-1/+2
|
* Fix more stack corruptions on amd64.bz2006-03-302-19/+11
| | | | | | | | | | | | | | | | | | | Vararg functions have a different calling convention than regular functions on amd64. Casting a varag function to a regular one to match the function pointer declaration will hide the varargs from the caller and we will end up with an incorrectly setup stack. Entirely remove the varargs from these functions and change the functions to match the declaration of the function pointers. Remove the now unnecessary casts. Also change static struct ipprotosw[] to two independent protosw/ip6protosw definitions to remove an unnecessary cast. PR: amd64/95008 Submitted and tested by: Mats Palmgren Reviewed by: rwatson MFC after: 3 days
* Revert previous change, as I fixed MD5(9).pjd2006-03-301-6/+2
|
* Fix a panic on sparc64 related to inproper aligment - we cannot assume,pjd2006-03-301-7/+13
| | | | | | that 'unsigned char *' argument is 4 byte aligned. MFC after: 3 days
* When we attach to either a SAB82532 or a Z8530, print a noticemarcel2006-03-302-0/+4
| | | | | saying that scc(4) should be configured into the kernel. This helps people to migrate away from puc(4) for these devices.
* Add scc(4).marcel2006-03-301-2/+2
|
* o Add scc(4) to the build.marcel2006-03-306-19/+45
| | | | | | o Add the scc(4) manpage to the build. o Update the uart(4) manpage to account for scc(4). o Update the uart(4) module build to include support for scc(4).
* Add support for scc(4).marcel2006-03-306-82/+191
|
* Add scc(4), a driver for serial communications controllers. Thesemarcel2006-03-3012-0/+1616
| | | | | | | | | controllers typically have multiple channels and support a number of serial communications protocols. The scc(4) driver is itself an umbrella driver that delegates the control over each channel and mode to a subordinate driver (like uart(4)). The scc(4) driver supports the Siemens SAB 82532 and the Zilog Z8530 and replaces puc(4) for these devices.
* o Don't make the SER_INT_* defines visible to userland. Theymarcel2006-03-301-0/+7
| | | | | are related to internals, not user-visible state. o Add a typedef for serdev_intr_t and protect it with !LOCORE.
* Style fix.jhb2006-03-301-7/+6
|
* md_hash field in g_eli_metadata structure is not 4 byte aligned, whichpjd2006-03-301-2/+6
| | | | | | | | | | | | | | | case panic on sparc64. The problem is in MD5(9) implementation. The Encode() function takes 'unsigned char *output' as its first argument, which is then assigned to 'u_int32_t *op'. If the 'output' argument is not 4 byte aligned (and in geli(8) case it is not), sparc64 machine will panic. I don't know how to fix MD5(9) in a clean way, so I'm implementing a work-around in geli(8). Reported by: brueffer MFC after: 3 days
* Protect from creating striped and RAID5 plexes with unequally sizedle2006-03-305-68/+112
| | | | subdisks.
* Rebuild gensnmptree(1) on 700014 systems too. While 700014 correspondsru2006-03-301-1/+1
| | | | | | | | | | | | to post January 26 systems where gensnmptree(1) code was already fixed, there was a timeframe between February 14 and February 27 when usr.sbin/bsnmpd/ including gensnmptree was disconnected from build, so if you upgraded in this timeframe, you ended up with the 700014 system but still with a buggy gensnmptree binary. This also means not being able to buildworld now. Reported by: jhb Attention: harti, keramida
* - 'ndisks' variable is not boolean, so compare it with a value.pjd2006-03-301-1/+1
| | | | | | - Keep conditions order consistent with the comment above. MFC after: 3 days
* Fix a bug where, for 6-byte sequences, the top 6 bits get compared totrhodes2006-03-301-1/+1
| | | | | 111111 rather than the top 7 bits being compared against 1111110 causing illegal bytes fe and ff being treated the same as legal bytes fc and fd.
* Add IFF_NEEDSGIANT to kernel PPP support. I have no idea why this wasn'trwatson2006-03-301-1/+1
| | | | | | here, but it should have been. MFC after: 3 days
* regen for 32bit System V shared memoryps2006-03-304-7/+13
|
* Properly support for FreeBSD 4 32bit System V shared memory.ps2006-03-303-7/+179
| | | | | | Submitted by: peter Obtained from: Yahoo! MFC after: 3 weeks
* Remove paranoid thread hijacking check. It cause wierd behaviourariff2006-03-301-8/+2
| | | | | (dangling channel - process association) especially in threaded or fork()ed apps.
* In afd_describe(), don't initialize sizestring. On ia64, gcc(1) willmarcel2006-03-301-1/+1
| | | | | | generate code that calls memset, which we don't have in the kernel. MFC after: 3 days
* Add __collate_load_error and __collate_range_cmp to the list ofdeischen2006-03-303-0/+4
| | | | | | | | | | | | | FBSDprivate locale symbols. These functions are needed by libcompat. Add _cleanup to the list of stdio FBSDprivate symbols. Some third party applications use this. This will be removed and replaced by fcloseall() once libc version is bumped. Add _res to the list of resolv symbols. Found by: portbuilder runs (thanks Kris!)
* On some laptops, under very high loads, the socket event register readimp2006-03-301-2/+13
| | | | | | | | | | | | in the ISR doesn't read the actual socket event register, but instead reads garbage (usually 0xffffffff, but other times other things). This totally violates the PCI spec, but happens rarely enough that a workaround is in order. This adds one test when we have a real interrupt to service (which is very rare), and doesn't affect the usualy 'nothing to see here' case at all. Problem reported by many, but sam@ gave me this workaround after diagnosing the problem.
* Add a mask of valid socket eventsimp2006-03-301-19/+20
| | | | While I'm hear, fix define<sp> to be define<tab>.
* Don't open if we're going away.marcel2006-03-301-0/+4
|
* document the tty files that uart(4) provides like sio(4) and pty(4) bothjmg2006-03-301-0/+14
| | | | | | | | | | do.. This copies only part of the FILES section from sio(4).... We might want to make tty(4) document the files provided, and have each of these document the characters that it uses... Pointed out by: Yasholomew Yashinski MFC after: 3 days
* Always explicitly panic in propogate_priority() if we try to propogatejhb2006-03-291-8/+14
| | | | | | | | | | a lock's priority to a sleeping thread. When we panic, dump a stack trace of the thread that is asleep if DDB is compiled into the kernel just before calling panic(). This is much more informative and useful for debugging than the current behavior of getting a page fault and not having an easy way of determining which thread caused the original problem. MFC after: 1 week
* Autogenerate hardware notes for mfi(4).brueffer2006-03-293-0/+5
|
* Mention that MegaRAID SAS controllers are supported by mfi(4).brueffer2006-03-291-1/+6
|
* Mention that amr(4) supports older MegaRAID hardware and clean up thebrueffer2006-03-291-3/+8
| | | | last vestiges of example.4.
* Fix printf arg on 64-bit arch by casting to an int. The IO port is nevernjl2006-03-291-2/+2
| | | | | | more than a couple digits anyway. Pointy hat to: njl
OpenPOWER on IntegriCloud