Commit Graph

135587 Commits

Author SHA1 Message Date
Christian Brueffer
4faa4b080e Clean up after previous revision. 2007-11-25 16:14:32 +00:00
Max Laier
1030a1a9cb pfil(9) locking take 3: Switch to rmlock(9)
This has the benefit that rmlocks have proper support for reader recursion
(in contrast to rwlock(9) which could potential lead to writer stravation).
It also means a significant performance gain, eventhough only visible in
microbenchmarks at the moment.

Discussed on:	-arch, -net
2007-11-25 12:41:47 +00:00
Alan Cox
9c5ce94257 Tidy up: Add comments. Eliminate the pointless
malloc_type_allocated(..., 0) calls that occur when contigmalloc() has
failed.  Eliminate the acquisition and release of the page queues lock
from vm_page_release_contig().  Rename contigmalloc2() to
contigmapping(), reflecting what it does.
2007-11-25 07:42:34 +00:00
Joseph Koshy
c89d1cf588 - Add an overview of the pmc(3) API.
- Defer detailed descriptions of individual functions in the API to
  function-specific manual pages.
2007-11-25 06:50:31 +00:00
Joseph Koshy
677d4530c2 Move the following functions into their own manual pages:
- pmc_attach(), pmc_detach().
- pmc_capabilities(), pmc_cpuinfo(), pmc_ncpu(), pmc_npmc(), pmc_pmcinfo(),
  pmc_width().
- pmc_get_driver_stats().
- pmc_get_msr().
- pmc_read(), pmc_rw(), pmc_write().
- pmc_set().
- pmc_start(), pmc_stop().
2007-11-25 06:38:55 +00:00
Andrew Thompson
80ddfb40e4 Have the lagg interface generate link up/down events, the interface is marked
as up if at least one of its ports also has a link up. This fixes using
carp+lagg together and any other system that relies on linkstate events.

PR:		kern/113956
MFC after:	3 days
2007-11-25 06:30:46 +00:00
Joseph Koshy
a5c506d293 - Document an EAGAIN error return from a PMC_OP_CONFIGURELOG request.
- Document some EINVAL error returns from PMC_OP_CONFIGURELOG,
  PMC_OP_WRITELOG and PMC_OP_FLUSHLOG that were missed earlier.
- Correct a typo: s/PMC_OP_ALLOCATE/PMC_OP_PMCALLOCATE/.
- Describe how log file writing errors are returned by a PMC_OP_FLUSHLOG
  request.
2007-11-25 06:05:41 +00:00
Joseph Koshy
f28834c1a2 - Describe function pmc_init() in its own manual page.
- Describe functions pmc_configure_logfile(), pmc_flush_logfile() and
  pmc_writelog() in their own manual page.
2007-11-25 03:18:42 +00:00
Attilio Rao
0e933b2f3c Update sx(9) lock manpage in order to add missing prototypes for function
sx_slock_sig() and sx_xlock_sig() and their respective explanation.
2007-11-25 01:55:53 +00:00
Attilio Rao
6442838d08 Update rwlock(9) manpage adding missing bits about the rw_init_flags()
function, its options and explaining that recursion for writers can be
selectively enabled.

Reported by: rwatson, Skip Ford <skip at menantico dot com>
2007-11-25 01:53:58 +00:00
Robert Watson
2b19cb1b87 More carefully handle various cases in sysctl_drop(), such as unlocking
the inpcb when there's an inpcb without associated timewait state, and
not unlocking when the inpcb has been freed.  This avoids a kernel panic
when tcpdrop(8) is run on a socket in the TIMEWAIT state.

MFC after:	3 days
Reported by:	Rako <rako29 at gmail dot com>
2007-11-24 18:43:59 +00:00
Robert Watson
3b6efc61a3 Respell 'Conatainer' as 'Container'.
MFC after:	3 days
Reported by:	Toomas Aas <toomas dot aas at raad dot tartu dot ee>
2007-11-24 18:39:01 +00:00
Mike Makonnen
e38d709cd6 Hmmm, must get reading glasses or else change the font on my terminal. That
comma looks like a period.

Noticed by: brueffer
2007-11-24 11:58:54 +00:00
Joseph Koshy
fcdeaa0525 Describe convenience functions `pmc_name_of_{capability,class,cputype,
disposition,event,mode,state}' in their own manual page.
2007-11-24 11:05:36 +00:00
Christian Brueffer
a4b1fac3d2 Minor language cleanup.
MFC after:	3 days
2007-11-24 09:32:45 +00:00
Attilio Rao
4a32616a77 Fix the spinlock static table adding missing spinlocks.
- rm_spinlock has turnstile chain as child
- srclock has callout and clk as child, found by witness "emulation".
  Just move it very high in our ranking
2007-11-24 04:32:32 +00:00
Attilio Rao
2c2bebfcb3 transferlockers() is a very dangerous and hack-ish function as waiters
should never be moved by one lock to another.
As, luckily, nothing in our tree is using it, axe the function.

This breaks lockmgr KPI, so interested, third-party modules should update
their source code with appropriate replacement.

Ok'ed by: ups, rwatson
MFC after: 3 days
2007-11-24 04:22:28 +00:00
Joseph Koshy
1a94fde847 - Improve clarity: use 'scope' to distinguish between process and system
PMCs and 'mode' to distinguish between counting and sampling.
- Document PMC row dispositions.
- Document the requirement for PRIV_PMC_MANAGE privilege when issuing
  PMC_OP_PMCADMIN requests.
2007-11-24 03:48:18 +00:00
John Birrell
962e1ce30f Fix strict alias warnings. 2007-11-23 23:56:03 +00:00
Ruslan Ermilov
5f3a6945d4 Also check setuid executables on ZFS. 2007-11-23 13:00:31 +00:00
Joseph Koshy
115cadfd60 Describe pmc_event_names_of_class() in its own manual page. 2007-11-23 12:30:55 +00:00
Joseph Koshy
1ddf079eed Describe pmc_enable() and pmc_disable() in their own manual page. 2007-11-23 12:21:34 +00:00
Joseph Koshy
8fe4cbb6b7 Describe pmc_allocate() and pmc_release() in their own manual page. 2007-11-23 11:46:08 +00:00
Joseph Koshy
1eb6c69045 Sections of type SHT_GNU_versym use ELF type ELF_T_HALF. Update manual
page and code to match.

Submitted by:	jb
MFC After: 	1 day
2007-11-23 11:29:36 +00:00
Søren Schmidt
506310cd36 Add preliminary SATA ATAPI support for sii 3132/3124 chips. 2007-11-23 08:17:14 +00:00
Sam Leffler
f4558c9a6f correct WMM packet classification:
o use TID_TO_WME_AC on vlan tag priority
o ignore ECN bits in DSCP when mapping IP TOS and use TID_TO_WME_AC

MFC after:	3 days
2007-11-23 06:24:57 +00:00
Sam Leffler
ce8977dff3 o correct re-association indicator dispatched in node join event
o remove misleading "reassociation" msg on sta join

MFC after:	3 days
2007-11-23 06:23:12 +00:00
Sam Leffler
849b4d998c correct sta mode setup: adopt ap's ampdu density and max ampdu size
instead of using local settings

MFC after:	3 days
2007-11-23 06:14:32 +00:00
Sam Leffler
cb42c5bba6 parse htcap ie early so ampdu density and max rx size are available
for constructing the AssocReq frame

MFC after:	3 days
2007-11-23 06:13:39 +00:00
Sam Leffler
d4a401b619 correct TID_TO_WME_AC handling of BE
MFC after:	3 days
2007-11-23 06:12:46 +00:00
Sam Leffler
8039c240fd use the DSPARMS ie to find the home channel for off-channel frames
Reviewed by:	thompsa
MFC after:	1 week
2007-11-23 05:58:37 +00:00
Sam Leffler
a557c018f5 add ieee80211_find_channel_byieee to lookup a channel by ieee channel #
Reviewed by:	thompsa
MFC after:	1 week
2007-11-23 05:57:20 +00:00
Sam Leffler
727fe7f862 update default wme parameters to latest WiFi test plans
Reviewed by:	Allan Lim
MFC after:	3 days
2007-11-23 05:55:06 +00:00
John Birrell
37e19e1d85 Use an intermediate pointer to avoid a strict aliasing warning. 2007-11-23 05:52:13 +00:00
Sam Leffler
28aba29eb9 - add the Planex GW-US54GXS adapter
Submitted by:	Weongyo Jeong <weongyo.jeong@gmail.com>
Obtained from:	openbsd
MFC after:	3 days
2007-11-23 05:44:29 +00:00
David Xu
da4410f25f Simplify code, fix a thread cancellation bug in sem_wait and sem_timedwait. 2007-11-23 05:42:52 +00:00
Joseph Koshy
4c8e514bdc MFP4: Add assembly language symbols used by hwpmc(4)'s callchain capture. 2007-11-23 03:03:30 +00:00
Edwin Groothuis
b71d8e695c Add "with" to make the line go smoother. 2007-11-23 01:52:44 +00:00
Alan Cox
5dfc28704d Add a read/write sysctl for reconfiguring the maximum number of physical
pages that can be wired.

Submitted by:	Eugene Grosbein
PR:		114654
MFC after:	6 weeks
2007-11-23 00:30:19 +00:00
Edwin Groothuis
dba0fd308e Add the -W options, which acts the same as -w but will generate
unique names based on the submitted filename, a strftime(3) format
string and a two digit sequence number.

By default the strftime(3) format string is %Y%m%d (YYYYMMDD), but
this can be changed by the -F option.

PR:		bin/106049 (based on patch in that PR)
Approved by:	grog@ (mentor)
2007-11-23 00:05:29 +00:00
Rui Paulo
4b07bf84dd Move ASMC_FAN_FUNCS in the Macmini structure declaration one line up
so that this macro expands in the right place.

Submitted by:	Ed Schouten <ed at fxq.nl>
Approved by:	njl (mentor)
2007-11-22 23:38:24 +00:00
John Birrell
cfb5b3256b Re-enable -Werror again.
This time, change the default CFLAGS to match the simple defaults that
the tinderboxes use. That is, don't use -fno-strict-aliasing by default.

My last attempt to re-anable -Werror gave me a lesson in what strict
aliasing is all about. There was code in libthr that wasn't 64-bit clean.
The default use of -fno-strict-aliasing hid that.

By using -fno-strict-aliasing by default we were choosing to ignore
problems in code which had the potential to shoot ourselves in the
foot. Sometimes it would be the 64-bit foot. I have both feet. The left
ones are 32 bits and the right ones are 64 bits. Don't ask about my
endian orientation. :-)

The -fno-strict-aliasing compiler arg can still be used if NO_STRING_ALIASING
is define in make.

We are early in the FreeBSD 8 development, so we have the opportunity to
wait and see if this works for us. I am sure that people will complain.
We can easily revert this. All I ask is that we take sides: clean code or
not. YMMV.

Note that by using -fno-strict-aliasing the build won't actually break.
Only where WARNS is set (and -Werror is used) will a compiler warning break
the build. The use of WARNS levels implies (to me at least) that the
developer has taken some care to make the code pass basic checks. This
commit makes those checks just a little bit more strict.
2007-11-22 23:21:12 +00:00
Kris Kennaway
e6d64a0f15 Remove remaining Giant acquisition around vn_fullpath1. This was missed
in r1.106 and has not been required for some years now.

Reviewed by:  jeff
MFC After:    1 week
2007-11-22 21:26:25 +00:00
Simon L. B. Nielsen
f24c80e2ef Remove kernel and module symbol files from disc1 (and the livecd if it
is enabled).  This saves around 80MB (for i386) on the ISO images.

Note that this is only from the install media, not the installed
system where the symbols are still installed, if part of the release.

Should anybody want the symbols which match disc1/livecd, they can
just be extracted from the kernel distribution files.

Reviewed by:	kensmith
2007-11-22 20:06:50 +00:00
Alan Cox
82cfdd5adc Remove an unnecessary call to pmap_remove_all() and the associated "XXX"
comments from vnode_pager_setsize().  This call was introduced in
revision 1.140 to address a problem that no longer exists.
Specifically, pmap_zero_page_area() has replaced a (possibly)
problematic implementation of page zeroing that was based on
vm_pager_map(), bzero(), and vm_pager_unmap().
2007-11-22 20:01:38 +00:00
Joseph Koshy
e805d32b8e - Correct a documentation bug: handles returned from a PMC_OP_PMCALLOCATE
request are 32 bit values, and are not necessarily small.
- Note that the PMC_F_KGMON flag is currently unimplemented.
- Tweak description of an EINVAL error return.
- Add an "AUTHORS" section.
2007-11-22 14:09:26 +00:00
Attilio Rao
557f5e51e9 Cache the value of c_lock as it can change, in the struct,
while the global callout spinlock is not held, and can lead to PF#.

Reported by: dougb, Mark Atkinson <atkin901 at yahoo dot com>
Tested by: dougb
Diagnosed by: jhb
2007-11-22 12:15:54 +00:00
Ruslan Ermilov
c9f54e819c Fix comments. 2007-11-22 10:06:42 +00:00
Pyun YongHyeon
6a087a8722 Fix function prototype for device_shutdown method. 2007-11-22 02:45:00 +00:00
Tai-hwa Liang
e7356456ed Nuking the temporary pointer once it is properly tracked in local storage.
This should fix the double free() bug where there's no tailing newline(\n)
character:

	current# echo -n test | tail
	testAssertion failed: (run->magic == ARENA_RUN_MAGIC), function
	arena_dalloc, file /usr/src/lib/libc/stdlib/malloc.c, line 2448.
	Abort (core dumped)

Reviewed by:	kib
MFC after:	3 days
2007-11-22 01:51:46 +00:00