Commit Graph

136624 Commits

Author SHA1 Message Date
jhb
bda1948e7a Add entries for manpages for pmc_x86_get_msr(3), kthread_create(9),
shm_open(3), and shm_unlink(3).
2008-01-11 13:41:31 +00:00
kib
ee6af6f46a Fix unload of the fdc.ko:
Wakeup the thread doing the fdc_detach() when the fdc worker thread exits [1].
Write access to the write-protected floppy shall call device_unbusy() to
pair the device_busy() in the fd_access() [2].

PR:	116537 [1], 116539 [2]
MFC after:	1 week
2008-01-11 11:53:04 +00:00
das
c7fe2c294a - Correct the range check in the double version to catch negative values
that would overflow.
- Style fixes and improved handling of NaNs suggested by bde.
2008-01-11 04:18:25 +00:00
kmacy
bc3858933d Be more aggressive about tx cleaning - when multiples streams were running the tx
queue could fill up and stop getting cleaned.
2008-01-11 02:26:54 +00:00
kmacy
c2d2e21050 If we're not running with multiqueue enabled we need to wait to acquire the
rspq lock. Not doing so was causing us to skip re-enabling the interrupt.

- remove duplicate credits sysctl
- add support for dumping hardware context of the txq
- decrement budget_left when we break out of the process_responses loop
2008-01-10 23:51:34 +00:00
jhb
e6f3a3dd9a Work around problems with the ppbus(4)'s interesting way of managing
interrupt handlers for child devices by adding a dummy handler that is
always present so that the underlying interrupt thread is always around
avoiding panics from stray interrupts.

MFC after:	3 days
2008-01-10 23:43:47 +00:00
jhb
3bcad4568e Pass curthread to various socket routines (socreate(), sobind(), and
soconnect()) instead of &thread0 when establishing a connection to the NFS
server.  Otherwise inconsistent credentials may be used when setting up
the NFS socket.

MFC after:	1 week
Reviewed by:	rwatson
2008-01-10 23:36:00 +00:00
jhb
34de26d108 Add a feature_present(3) function which checks to see if a named kernel
feature is present by checking the kern.features sysctl MIB.

MFC after:	1 week
2008-01-10 22:11:21 +00:00
rwatson
f261f9865b Don't zero td_runtime when billing thread CPU usage to the process;
maintain a separate td_incruntime to hold unbilled CPU usage for
the thread that has the previous properties of td_runtime.

When thread information is requested using the thread monitoring
sysctls, export thread td_runtime instead of process rusage runtime
in kinfo_proc.

This restores the display of individual ithread and other kernel
thread CPU usage since inception in ps -H and top -SH, as well for
libthr user threads, valuable debugging information lost with the
move to try kthreads since they are no longer independent processes.

There is universal agreement that we should rewrite the process and
thread export sysctls, but this commit gets things going a bit
better in the mean time.  Likewise, there are resevations about the
continued validity of statclock given the speed of modern processors.

Reviewed by:		attilio, emaste, jhb, julian
2008-01-10 22:11:20 +00:00
thompsa
2fdbb8b316 Add IFT_BRIDGE to the Ethernet section so l2 addresses are formatted correctly.
PR:		bin/119542
Submitted by:	Niki Denev
2008-01-10 20:53:13 +00:00
brueffer
7acb3fd07e Removed a contraction. 2008-01-10 19:11:37 +00:00
jkim
951f756a2b Fix non-SMP kernel regression introduced in the previous commit.
Reviewed by:	jkoshy
2008-01-10 16:31:14 +00:00
rpaulo
8f9a1372cf Disable the check for errata AE18. On MacBooks (1,1 version) there's
no problem with coretemp and C3 state.

Approved by:	njl (mentor)
2008-01-10 16:09:22 +00:00
des
512275f6c4 A real gem from freebsd-current@ 2008-01-10 14:51:24 +00:00
rwatson
5e4b4e0b32 Remove "lock pushdown" todo item in comment -- I did that for 7.0.
MFC after:	3 weeks
2008-01-10 12:38:17 +00:00
rwatson
ffaa005137 Correct typos in comments.
MFC after:	3 weeks
2008-01-10 12:29:12 +00:00
pjd
340995c5fd When one tries to allocate memory with the M_WAITOK flag and we are short in
address space in kmem map call vm_lowmem event in a loop and wait a bit for
subsystems to reclaim some memory which in turn will reclaim address space as
well.

Note, this is a work-around.

Reviewed by:	alc
Approved by:	alc
MFC after:	3 days
2008-01-10 08:36:38 +00:00
kmacy
257b751f99 Add support for selectively dumping the state of the hardware response queue.
Change ordering of a couple of types.
2008-01-10 06:54:20 +00:00
kmacy
7f86780195 should always free when refcount is 1 2008-01-10 06:52:48 +00:00
sam
5960f63b76 quiet compiler complaint about unused parameters 2008-01-10 04:28:26 +00:00
sam
575808ccee quiet compiler complaint about comparing &v against NULL 2008-01-10 04:26:44 +00:00
edwin
b94bb54417 Make sure that grog is linked to me, and that I (in *-ports*) am
linked to the people I helped out, and add them to the overview
too.

Approved by: grog@
2008-01-10 01:25:40 +00:00
attilio
1e9737002a Bump FreeBSD_version in order to reflect vn_lock() prototype changes. 2008-01-10 01:25:23 +00:00
attilio
73bfa7b891 Update vn_lock() prototype accordingly with the 'thread' argument removal. 2008-01-10 01:23:59 +00:00
attilio
18d0a0dd51 vn_lock() is currently only used with the 'curthread' passed as argument.
Remove this argument and pass curthread directly to underlying
VOP_LOCK1() VFS method. This modify makes the code cleaner and in
particular remove an annoying dependence helping next lockmgr() cleanup.
KPI results, obviously, changed.

Manpage and FreeBSD_version will be updated through further commits.

As a side note, would be valuable to say that next commits will address
a similar cleanup about VFS methods, in particular vop_lock1 and
vop_unlock.

Tested by:	Diego Sardina <siarodx at gmail dot com>,
		Andrea Di Pasquale <whyx dot it at gmail dot com>
2008-01-10 01:10:58 +00:00
edwin
8df9c26bfd http://www.freebsd.org/doc/en_US.ISO8859-1/articles/committers-guide/conventions.html
4.1 point 6:

Add an entry for yourself to src/share/misc/committers-repository.dot,
where repository is either doc, ports or src, depending on the
commit privileges you obtained.

Approved by: grog@
2008-01-10 01:10:31 +00:00
kmacy
7e708f7f6f - make 9k clusters the default unless a tunable is set
- return the error from cxgb_tx_common so that when an error is hit we dont
  spin forever in the taskq thread
- remove unused rxsd_ref
- simplify header_offset calculation for embedded mbuf headers
- fix memory leak by making sure that mbuf header initialization took place
- disable printf's for stalled queue, don't do offload/ctrl queue restart
  when tunnel queue is restarted
- add more diagnostic information about the txq state
- add facility to dump the actual contents of the hardware queue using sysctl
2008-01-10 00:55:42 +00:00
rwatson
a61926cd92 Refine textdump comments slightly.
MFC after:	3 months
2008-01-10 00:26:47 +00:00
scottl
96b8215ee4 Fix a buffer overflow in the processing of various SCSI commands. This likely
fixes a an great number of weird problems that have been reported with this
driver.

PR: 119114
Submitted by: Jens Rehsack
2008-01-09 20:02:56 +00:00
obrien
2678039b69 Improve -u (limit uid lookups) behavior.
Submitted by:	David Frascone <dave@frascone.com>
PR:		119490
2008-01-09 18:06:24 +00:00
obrien
915a8d4b13 This commit was generated by cvs2svn to compensate for changes in r175189,
which included commits to RCS files with non-trunk default branches.
2008-01-09 16:46:14 +00:00
obrien
4bf470afc0 Bring in fix for Binutils PR other/16240: Check for a failure return from
cplus_demangle_type.  This is the rev 1.50-1.51 change.

Our addr2line, etc.. would crash if used on C++ code that contains
certain symbol types.  One example is
_ZN13PatternDriver23StringScalarDeleteValueC1ERKNS_25ConflateStringScalarValueERKNS_25AbstractStringScalarValueERKNS_12TemplateEnumINS_12pdcomplementELZNS_16complement_namesEELZNS_14COMPLEMENTENUMEEEE
2008-01-09 16:46:14 +00:00
bde
2d90a44ac6 Simplify the ifdefs:
- fix this to compile with C++ by casting ints to enums in a few places
  and by using the correct parameter type for _fpsetprec().  Remove
  __cplusplus ifdefs which disabled the buggy code.
- remove __CC_SUPPORTS___INLINE ifdefs.  `__inline' vs `inline', and either
  of these #defined away, are supposed to be handled by very old ifdefs
  in <sys/cdefs.h>.  Thus the __CC_SUPPORTS___INLINE macro is not needed
  here (or anywhere else that it used).  It is less needed here than in
  most places, since this file is userland-only and userland is far from
  supporting INTEL_COMPILER.  The __CC_SUPPORTS___INLINE__ macro which
  was used here is even less needed.  It is to support spelling `inline'
  as `__inline__' instead of the usual spelling `__inline'.

Fix some style bugs that I missed in the previous commit (remove unused
asms and sort more variables).
2008-01-09 15:03:03 +00:00
bde
35b2cbed50 Fix some style bugs (mainly, use explicit shifts when accessing bit-fields
even if the shift count happens to be 0, sort declarations, and spell
__inline normally).
2008-01-09 13:35:31 +00:00
bde
b52cfc10cb Improve some comments. 2008-01-09 10:42:47 +00:00
ru
afa00fb3e4 Revise the TECHNICAL DETAILS section.
Reviewed by:	skv
2008-01-09 09:38:53 +00:00
kmacy
090825944b make nqsets a uint32_t so that sysctl will work
add 2 fields for allowing queue dumping
2008-01-09 08:12:24 +00:00
brueffer
bf42a73d64 Fix typos. 2008-01-09 08:08:56 +00:00
kmacy
a0152fef95 don't decrement ref count below 1 for EXT_PACKET 2008-01-09 08:01:42 +00:00
kmacy
513b32a117 EXT_PACKET is one of the valid mbuf types 2008-01-09 08:01:08 +00:00
kmacy
2d4fcb7dc7 Fix KASSERT in m_free_fast - the LIST_EMPTY check only applies to packet headers.
In the non packet header case there may be data there.
2008-01-09 06:29:49 +00:00
attilio
bb203b2edf Add lockmgr_disown() and relative explanation. 2008-01-09 02:10:32 +00:00
attilio
f0eca36d0b Bump FreeBSD_version in order to reflect lockmgr_disown() function
introduction.
2008-01-09 00:03:50 +00:00
attilio
c3923db2c0 Fix a last second typo about recent lockmgr_disown() introduction. 2008-01-09 00:02:43 +00:00
attilio
9e182da191 Remove explicit calling of lockmgr() with the NULL argument.
Now, lockmgr() function can only be called passing curthread and the
KASSERT() is upgraded according with this.

In order to support on-the-fly owner switching, the new function
lockmgr_disown() has been introduced and gets used in BUF_KERNPROC().
KPI, so, results changed and FreeBSD version will be bumped soon.
Differently from previous code, we assume idle thread cannot try to
acquire the lockmgr as it cannot sleep, so loose the relative check[1]
in BUF_KERNPROC().

Tested by: kris

[1] kib asked for a KASSERT in the lockmgr_disown() about this
condition, but after thinking at it, as this is a well known general
rule, I found it not really necessary.
2008-01-08 23:48:31 +00:00
jhb
1975c09543 Regen for shm_open(2) and shm_unlink(2). 2008-01-08 22:01:26 +00:00
jhb
8cd9437636 Add a new file descriptor type for IPC shared memory objects and use it to
implement shm_open(2) and shm_unlink(2) in the kernel:
- Each shared memory file descriptor is associated with a swap-backed vm
  object which provides the backing store.  Each descriptor starts off with
  a size of zero, but the size can be altered via ftruncate(2).  The shared
  memory file descriptors also support fstat(2).  read(2), write(2),
  ioctl(2), select(2), poll(2), and kevent(2) are not supported on shared
  memory file descriptors.
- shm_open(2) and shm_unlink(2) are now implemented as system calls that
  manage shared memory file descriptors.  The virtual namespace that maps
  pathnames to shared memory file descriptors is implemented as a hash
  table where the hash key is generated via the 32-bit Fowler/Noll/Vo hash
  of the pathname.
- As an extension, the constant 'SHM_ANON' may be specified in place of the
  path argument to shm_open(2).  In this case, an unnamed shared memory
  file descriptor will be created similar to the IPC_PRIVATE key for
  shmget(2).  Note that the shared memory object can still be shared among
  processes by sharing the file descriptor via fork(2) or sendmsg(2), but
  it is unnamed.  This effectively serves to implement the getmemfd() idea
  bandied about the lists several times over the years.
- The backing store for shared memory file descriptors are garbage
  collected when they are not referenced by any open file descriptors or
  the shm_open(2) virtual namespace.

Submitted by:	dillon, peter (previous versions)
Submitted by:	rwatson (I based this on his version)
Reviewed by:	alc (suggested converting getmemfd() to shm_open())
2008-01-08 21:58:16 +00:00
emaste
23d78439c9 Honour the logical current working directory ($PWD) when using config's
-d destdir option.  For an automounted src tree using the logical cwd
in the Makefile keeps amd(8)'s mount timeout refreshed.  Code to check
$PWD's validity cribbed from pwd(1).

Discussed on hackers@.
2008-01-08 21:10:13 +00:00
obrien
7eb385c2d8 un-__P() 2008-01-08 19:08:58 +00:00
rafan
93c568d8f7 - Remove kH and *6 from xterm. They are defined to the same key as @7 (kp_end).
As ncurses has the limitation that it returns the first matched key symbol,
  you can not use END in ncurses based program, like mutt, with xterm.
- Add @8 (kp_enter) definition for xterm so you can use ENTER in xterm with
  ncurses based program.

I also found that NetBSD's xterm does the same thing.

PR:		100150
Reported by:	Arseny Nasokin <tarc at tarc.po.cs.msu.su>
Discussed with:	Thomas Dickey, Ulrich Spoerlein <uspoerlein at gmail.com>
Reviewed by:	freebsd-arch@
MFC after:	2 month
2008-01-08 16:00:24 +00:00