aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Modify netstat -mb to use libmemstat when accessing a core dump or liveRobert Watson2005-11-133-178/+54
| | | | | | | | | | | | | | | | | | | kernel memory and not using sysctl. Previously, libmemstat was used only for the live kernel via sysctl paths. This results in netstat output becoming both more consistent between core dumps and the live kernel, and also more information in the core dump case than previously (i.e., mbuf cache information). Statistics relating to sfbufs still rely on a kvm descriptor as they are not currently exposed via libmemstat. netstat -m operating on a core is still unable to print certain sfbuf stats available on the live kernel. MFC after: 1 week Notes: svn path=/head/; revision=152378
* Add symlinks for kvm access methods for memstat(3).Robert Watson2005-11-131-0/+3
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=152377
* Moderate rewrite of kernel ktrace code to attempt to generally improveRobert Watson2005-11-138-92/+213
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | reliability when tracing fast-moving processes or writing traces to slow file systems by avoiding unbounded queueuing and dropped records. Record loss was previously possible when the global pool of records become depleted as a result of record generation outstripping record commit, which occurred quickly in many common situations. These changes partially restore the 4.x model of committing ktrace records at the point of trace generation (synchronous), but maintain the 5.x deferred record commit behavior (asynchronous) for situations where entering VFS and sleeping is not possible (i.e., in the scheduler). Records are now queued per-process as opposed to globally, with processes responsible for committing records from their own context as required. - Eliminate the ktrace worker thread and global record queue, as they are no longer used. Keep the global free record list, as records are still used. - Add a per-process record queue, which will hold any asynchronously generated records, such as from context switches. This replaces the global queue as the place to submit asynchronous records to. - When a record is committed asynchronously, simply queue it to the process. - When a record is committed synchronously, first drain any pending per-process records in order to maintain ordering as best we can. Currently ordering between competing threads is provided via a global ktrace_sx, but a per-process flag or lock may be desirable in the future. - When a process returns to user space following a system call, trap, signal delivery, etc, flush any pending records. - When a process exits, flush any pending records. - Assert on process tear-down that there are no pending records. - Slightly abstract the notion of being "in ktrace", which is used to prevent the recursive generation of records, as well as generating traces for ktrace events. Future work here might look at changing the set of events marked for synchronous and asynchronous record generation, re-balancing queue depth, timeliness of commit to disk, and so on. I.e., performing a drain every (n) records. MFC after: 1 month Discussed with: jhb Requested by: Marc Olzheim <marcolz at stack dot nl> Notes: svn path=/head/; revision=152376
* Add some cards:Alexander Leidinger2005-11-134-5/+67
| | | | | | | | | | | | | | | | | - several TerraTec TValue [1] - PixelView PlayTV Pro REV-4C [2] In case you have the PixelView card, please tell us the "pciconf -v -l" output on multimedia@FreeBSD.org if it works. There are revisions out there which may not work and we need to know which ones work. PR: 53383 [1], 76002 [2] Submitted by: Tanja Wittke <tawi@gruft.de> [1], barner [1], Dan Angelescu <mrhsaacdoh@yahoo.com> [2] MFC after: 2 months Notes: svn path=/head/; revision=152375
* Don't augment the DRIVER_VERSION "v1.12" with __DATE__ and __TIME__.Jens Schweikhardt2005-11-131-1/+1
| | | | | | | | | | This is the only file of > 1700 files in a buildkernel here doing that. It makes reproducible builds (same source => same binary) impossible. Spotted by: devel/ccache Notes: svn path=/head/; revision=152374
* Define SIGLWP which is an alias for SIGTHR, the reason why I did thisDavid Xu2005-11-131-0/+1
| | | | | | | | | | | is that gdb knows SIGLWP and will pass it to program, otherwise gdb will print out "unknown signal" and discard it, and then thread cancellation won't work for libthr under gdb. MFC: 3 days Notes: svn path=/head/; revision=152373
* Increase WARNS level to 6.Craig Rodrigues2005-11-131-1/+1
| | | | Notes: svn path=/head/; revision=152363
* Convert mount_msdosfs to use nmount().Craig Rodrigues2005-11-131-98/+76
| | | | Notes: svn path=/head/; revision=152362
* In get_pv_entry() use PMAP_LOCK() instead of PMAP_TRYLOCK() when deadlockAlan Cox2005-11-134-4/+16
| | | | | | | cannot possibly occur. Notes: svn path=/head/; revision=152359
* Increase WARNS level to 6.Craig Rodrigues2005-11-131-0/+1
| | | | Notes: svn path=/head/; revision=152358
* Changes to reflect that size_t parameter to build_iovec() is a size_t.Craig Rodrigues2005-11-131-3/+4
| | | | Notes: svn path=/head/; revision=152357
* Increase WARNS level to 6Craig Rodrigues2005-11-131-1/+1
| | | | Notes: svn path=/head/; revision=152356
* Convert mount_cd9660 to use nmount().Craig Rodrigues2005-11-131-46/+53
| | | | Notes: svn path=/head/; revision=152355
* - Make size parameter to build_iovec() a size_t, not an intCraig Rodrigues2005-11-133-8/+31
| | | | | | | | | | - Add build_iovec_argf() helper function, for help converting old mount options which used the mount_argf() function for the mount() syscall. Discussed with: phk Notes: svn path=/head/; revision=152354
* Fixed some magic numbers.Bruce Evans2005-11-131-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | The threshold for not being tiny was too small. Use the usual 2**-12 threshold. This change is not just an optimization, since the general code that we fell into has accuracy problems even for tiny x. Avoiding it fixes 2*1366 args with errors of more than 1 ulp, with a maximum error of 1.167 ulps. The magic number 22 is log(DBL_EPSILON)/2 plus slop. This is bogus for float precision. Use 9 (~log(FLT_EPSILON)/2 plus less slop than for double precision). The code for handling the interval [2**-28, 9_was_22] has accuracy problems even for [9, 22], so this change happens to fix errors of more than 1 ulp in about 2*17000 cases. It leaves such errors in about 2*1074000 cases, with a max error of 1.242 ulps. The threshold for switching from returning exp(x)/2 to returning exp(x/2)^2/2 was a little smaller than necessary. As for coshf(), This was not quite harmless since the exp(x/2)^2/2 case is inaccurate, and fixing it avoids accuracy problems in 2*6 cases, leaving problems in 2*19997 cases. Fixed naming errors in pseudo-code in comments. Notes: svn path=/head/; revision=152353
* Fixed some magic numbers.Bruce Evans2005-11-131-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | The threshold for not being tiny was confusing and too small. Use the usual 2**-12 threshold and simplify the algorithm slightly so that this threshold works (now use the threshold for sinhf() instead of one for 1+expm1()). This is just a small optimization. The magic number 22 is log(DBL_EPSILON)/2 plus slop. This is bogus for float precision. Use 9 (~log(FLT_EPSILON)/2 plus less slop than for double precision). The threshold for switching from returning exp(x)/2 to returning exp(x/2)^2/2 was a little smaller than necessary. This was not quite harmless since the exp(x/2)^2/2 case is inaccurate. Fixing it happens to avoid accuracy problems for 2*6 of the 2*151 args that were handled by the exp(x)/2 case. This leaves accuracy problems for about 2*19997 args near the overflow threshold (~89); the maximum error there is 2.5029 ulps. There are also accuracy probles for args in +-[0.5*ln2, 9] -- 2*188885 args with errors of more than 1 ulp, with a maximum error of 1.384 ulps. Fixed a syntax error and naming errors in pseudo-code in comments. Notes: svn path=/head/; revision=152352
* Correct a grammo and capitalize a few abbreviations.Jens Schweikhardt2005-11-121-4/+4
| | | | Notes: svn path=/head/; revision=152351
* Instead of saving the unit number of the md(4) device name, save theMarcel Moolenaar2005-11-121-23/+26
| | | | | | | | | | | | | | whole name. This does not unnecessarily close the door that in some future we want to test on something other than md(4) devices. Also add a "conf" action so that we can check whether a gctl actually did the right thing or not. It's one thing to check that the result strings are as expected, but it doesn't tell us if the end result is correct. This needs a bit more fleshing out, but for now a visual (i.e. manual) check suffices. Notes: svn path=/head/; revision=152345
* - Minor fixes to raise WARNS level to 6.Craig Rodrigues2005-11-125-52/+223
| | | | | | | | | | | | | | | | | - Teach the mount program to call the nmount() syscall directly - Preserve existing method of calling mount() for UFS, until we clean things up. - Preserve existing method of forking and calling external mount programs for mfs, msdosfs, nfs, nfs4, ntfs, nwfs, nullfs, portalfs, reiserfs, smbfs, udf, umapfs, unionfs - devfs, linprocfs, procfs, ext2fs call nmount() syscall directly, since that is all those external mount programs were doing Reviewed by: phk Discussed on: arch Notes: svn path=/head/; revision=152344
* Imoproved comments for the minimax polynomial.Bruce Evans2005-11-121-10/+11
| | | | | | | | | Removed an unused variable. Fixed some wrong comments and some nearby misformatting. Notes: svn path=/head/; revision=152343
* Make the kern.geom.conftxt sysctl more usable by also dumping theMarcel Moolenaar2005-11-121-5/+4
| | | | | | | | | | | | | | MD class. Previously only the DISK class was dumped. The only consumer of this sysctl is libdisk (i.e. sysinstall) and it tests explicitly for instances of the DISK class. Dumping other classes is therefore harmless. By also dumping the MD class regression tests can be written that use the MD class for operations that would normally be done on the DISK class. The sysctl can now be used to test if those operations took an effect. An example is partitioning. Notes: svn path=/head/; revision=152342
* Tweaked the minimax polynomial and improved its comments.Bruce Evans2005-11-121-5/+5
| | | | Notes: svn path=/head/; revision=152341
* Improved comments for the minimax polynomial.Bruce Evans2005-11-121-4/+4
| | | | Notes: svn path=/head/; revision=152340
* Speed up stale catpages hunting by not running sed(1) for every catpage.Ruslan Ermilov2005-11-121-18/+15
| | | | Notes: svn path=/head/; revision=152339
* Don't check DESTDIR when making distributeworld; the latter expectsRuslan Ermilov2005-11-121-0/+2
| | | | | | | | | DISTDIR. Reported by: nyan Notes: svn path=/head/; revision=152338
* Really fix it this time.Ruslan Ermilov2005-11-121-3/+3
| | | | Notes: svn path=/head/; revision=152337
* Attempt to fix pc98 GENERIC compile breakage.Ruslan Ermilov2005-11-121-3/+3
| | | | Notes: svn path=/head/; revision=152336
* As for the float trig functions, use a minimax polynomial that isBruce Evans2005-11-121-9/+7
| | | | | | | | | | | | | | | specialized for float precision. The new polynomial has degree 8 instead of 14, and a maximum error of 2**-34.34 (absolute) instead of 2**-30.66. This doesn't affect the final error significantly; the maximum error was and is about 0.8879 ulps on amd64 -01. The fdlibm expf() is not used on i386's (the "optimized" asm version is used), but probably should be since it was already significantly faster than the asm version on athlons. The asm version has the advantage of being more accurate, so keep using it for now. Notes: svn path=/head/; revision=152335
* Fix a > 1 year old typo that caused the ulpt driver to try readingIan Dowse2005-11-121-1/+1
| | | | | | | | | | | | | from the printer and discarding the data even if the ulpt device was opened for reading. This resulted in crashes because two conconcurrent read transfers were using the same transfer structure. PR: usb/88886 Reported By: Alex Pivovarov MFC after: 1 week Notes: svn path=/head/; revision=152334
* Fix a stub function so that is has the correct number ofDaniel Eischen2005-11-121-3/+3
| | | | | | | | | arguments. While I'm here, correct a couple of [tab] alignments. Submitted by: bland Notes: svn path=/head/; revision=152333
* style(9) cleanups.Craig Rodrigues2005-11-121-16/+17
| | | | | | | Spotted by: njl, bde Notes: svn path=/head/; revision=152332
* Add "-s" argument to kdump to suppress the display of I/O data.Robert Watson2005-11-122-4/+11
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=152331
* Look through ext2fs file systems as well as ufs.Greg Lehey2005-11-121-1/+1
| | | | | | | | | This should almost certainly be extended to other local file systems as well (ntfs springs to mind), but I don't have the ability to test it. Notes: svn path=/head/; revision=152330
* Add -P flag, it does the same as the -p option, except that theKirill Ponomarev2005-11-124-11/+52
| | | | | | | | | | | | | | given prefix is also used recursively for the dependency packages, if any. If the -P flag appears after any -p flag on the command line, it overrides it's effect, causing pkg_add to use the given prefix recursively. PR: bin/75742 Submitted by: Frerich Raabe <raabe AT kde DOT org> MFC after: 3 days Notes: svn path=/head/; revision=152329
* Significant refactoring of the accounting code to improve locking and VFSRobert Watson2005-11-121-108/+93
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | happiness, as well as correct other bugs: - Replace notion of current and saved accounting credential/vnode with a single credential/vnode and an acct_suspended flag. This simplifies the accounting logic substantially. - Replace acct_mtx with acct_sx, a sleepable lock held exclusively during reconfiguration and space polling, but shared during log entry generation. This avoids holding a mutex over sleepable VFS operations. - Hold the sx lock over the duration of the I/O so that the vnode I/O cannot occur after vnode close, which could occur previously if accounting was disabled as a process exited. - Write the accounting log entry with Giant conditionally acquired based on the file system where the log is stored. Previously, the accounting code relied on the caller acquiring Giant. - Acquire Giant conditionally in the accounting callout based on the file system where the accounting log is stored. Run the callout MPSAFE. - Expose acct_suspended via a read-only sysctl so it is possibly to programmatically determine whether accounting is suspended or not without attempting to parse logs. - Check both acct_vp and acct_suspended lock-free before entering the accounting sx lock in acct(). - When accounting is disabled due to a VBAD vnode (i.e., forceable unmount), generate a log message indicating accounting has been disabled. - Correct a long-standing bug in how free space is calculated and compared to the required space: generate and compare signed results, not unsigned results, or negative free space will cause accounting to not be suspended when required, or worse, incorrectly resumed once negative free space is reached. MFC after: 2 weeks Notes: svn path=/head/; revision=152328
* Make sure only remove one signal by debugger.David Xu2005-11-121-1/+2
| | | | Notes: svn path=/head/; revision=152327
* Add section to start/stop Bluetooth USB devices (via ng_ubt(4))Maksim Yevmenkin2005-11-121-0/+10
| | | | | | | | | Submitted by: Panagiotis Astithas ( past at ebs dot gr ) Reviewed by: brooks, imp MFC after: 1 week Notes: svn path=/head/; revision=152326
* add continued status.David Xu2005-11-121-4/+4
| | | | Notes: svn path=/head/; revision=152325
* Insert missing copyright headers.David Xu2005-11-125-0/+10
| | | | Notes: svn path=/head/; revision=152324
* Document -32 flag in usage() output as well.John Baldwin2005-11-111-1/+1
| | | | | | | | Requested by: ru MFC after: 1 week Notes: svn path=/head/; revision=152323
* Traditionally expand tabs here.Ruslan Ermilov2005-11-111-2/+2
| | | | Notes: svn path=/head/; revision=152322
* Document the -32 switch available on amd64.John Baldwin2005-11-111-0/+4
| | | | | | | | Submitted by: Steve Kargl sgk at troutmask dot apl dot washington dot edu MFC after: 1 week Notes: svn path=/head/; revision=152321
* Fix a bug in dlinfo(RTLD_DI_SERINFOSIZE) requests. For each search pathJohn Baldwin2005-11-111-1/+1
| | | | | | | | | | | | | | | we included the length of the path in the returned size but not the length of the associated Dl_serpath structure. Without this fix, programs attempting to allocate a structure to hold the search path information would allocate too small of a buffer and rtld would overrun the buffer while filling it via a subsequent RTLD_DI_SERINFO request. Submitted by: "William K. Josephson" wkj at morphisms dot net Reviewed by: jdp MFC after: 2 weeks Notes: svn path=/head/; revision=152320
* Add dev/speaker into include/ treeXin LI2005-11-111-0/+2
| | | | Notes: svn path=/head/; revision=152318
* Since speaker.h now lives in sys/dev/speaker, reflect this fact here.Xin LI2005-11-111-1/+1
| | | | Notes: svn path=/head/; revision=152317
* Update PCI ids to add the E200, E200i, P400, and P400i storagePaul Saab2005-11-112-4/+15
| | | | | | | | | controllers. Remove the E400 since it is not a real product. Submitted by: HP Notes: svn path=/head/; revision=152316
* - Store pointer to the link-level address right in "struct ifnet"Ruslan Ermilov2005-11-1181-242/+220
| | | | | | | | | | | | | rather than in ifindex_table[]; all (except one) accesses are through ifp anyway. IF_LLADDR() works faster, and all (except one) ifaddr_byindex() users were converted to use ifp->if_addr. - Stop storing a (pointer to) Ethernet address in "struct arpcom", and drop the IFP2ENADDR() macro; all users have been converted to use IF_LLADDR() instead. Notes: svn path=/head/; revision=152315
* Only signo should be marked with .Fa.David Xu2005-11-111-1/+2
| | | | Notes: svn path=/head/; revision=152314
* List /boot/device.hints entries for the second joystick.Jean-Yves Lefort2005-11-111-0/+2
| | | | | | | Approved by: joel Notes: svn path=/head/; revision=152313
* Use the more appropriate ifnet_byindex() instead of ifaddr_byindex().Ruslan Ermilov2005-11-111-2/+2
| | | | Notes: svn path=/head/; revision=152312