Commit graph

137440 commits

Author SHA1 Message Date
Konstantin Belousov a0b0d286bc Return ENOSYS instead of 0 for the unknown futex operations.
Submitted by: rdivacky
Reported and tested by: Gary Stanley <gary velocity-servers net>
2008-03-02 14:00:50 +00:00
Ruslan Ermilov b18c84b4db Set AR=gnu-ar and RANLIB=gnu-ranlib on systems where we are forced
to use GNU tools.  Remove the _WITH_GNUAR knob.

Prodded by:	obrien
2008-03-02 11:10:46 +00:00
Bjoern A. Zeeb c3b02504bc Some "cleanup" of tcp_mss():
- Move the assigment of the socket down before we first need it.
  No need to do it at the beginning and then drop out the function
  by one of the returns before using it 100 lines further down.
- Use t_maxopd which was assigned the "tcp_mssdflt" for the corrrect
  AF already instead of another #ifdef ? : #endif block doing the same.
- Remove an unneeded (duplicate) assignment of mss to t_maxseg just before
  we possibly change mss and re-do the assignment without using t_maxseg
  in between.

Reviewed by:	silby
No objections:	net@ (silence)
MFC after:	5 days
2008-03-02 08:40:47 +00:00
Jeff Roberson 62fa74d95a Add support for the new cpu topology api:
- When searching for affinity search backwards in the tree from the last
   cpu we ran on while the thread still has affinity for the group.   This
   can take advantage of knowledge of shared L2 or L3 caches among a
   group of cores.
 - When searching for the least loaded cpu find the least loaded cpu via
   the least loaded path through the tree.  This load balances system bus
   links, individual cache levels, and hyper-threaded/SMT cores.
 - Make the periodic balancer recursively balance the highest and lowest
   loaded cpu across each link.

Add support for cpusets:
 - Convert the cpuset to a simple native cpumask_t while the kernel still
   only supports cpumask.
 - Pass the derived cpumask down through the cpu_search functions to
   restrict the result cpus.
 - Make the various steal functions resilient to failure since all threads
   can not run on all cpus any longer.

General improvements:
 - Precisely track the lowest priority thread on every runq with
   tdq_setlowpri().  Before it was more advisory but this ended up having
   pathological behaviors.
 - Remove many #ifdef SMP conditions to simplify the code.
 - Get rid of the old cumbersome tdq_group.  This is more naturally
   expressed via the cpu_group tree.

Sponsored by:	Nokia
Testing by:	kris
2008-03-02 08:20:59 +00:00
Jeff Roberson 81aa71755b - Remove the old smp cpu topology specification with a new, more flexible
tree structure that encodes the level of cache sharing and other
   properties.
 - Provide several convenience functions for creating one and two level
   cpu trees as well as a default flat topology.  The system now always
   has some topology.
 - On i386 and amd64 create a seperate level in the hierarchy for HTT
   and multi-core cpus.  This will allow the scheduler to intelligently
   load balance non-uniform cores.  Presently we don't detect what level
   of the cache hierarchy is shared at each level in the topology.
 - Add a mechanism for testing common topologies that have more information
   than the MD code is able to provide via the kern.smp.topology tunable.
   This should be considered a debugging tool only and not a stable api.

Sponsored by:	Nokia
2008-03-02 07:58:42 +00:00
Jeff Roberson bc72ba9cca - Add cpuset to the build.
Sponsored by:	Nokia
2008-03-02 07:52:26 +00:00
Jeff Roberson 0d985e498d Add a simple utility for manipulating cpusets. Man page will be available
soon.
 - Lists of cpus may be specified with -l with ranges specified as low-high and
   commas between individual cpus and ranges.  ie -l 0-2,4,6-8.
 - cpuset can modified -p pids, -t tids, or -s cpusetids.
 - cpuset can -g get the current mask for any of the above.

Sponsored by:	Nokia
2008-03-02 07:51:29 +00:00
Jeff Roberson 4da2b9d42f - Regen for cpuset
Sponsored by:	Nokia
2008-03-02 07:41:10 +00:00
Jeff Roberson d7f687fc9b Add cpuset, an api for thread to cpu binding and cpu resource grouping
and assignment.
 - Add a reference to a struct cpuset in each thread that is inherited from
   the thread that created it.
 - Release the reference when the thread is destroyed.
 - Add prototypes for syscalls and macros for manipulating cpusets in
   sys/cpuset.h
 - Add syscalls to create, get, and set new numbered cpusets:
   cpuset(), cpuset_{get,set}id()
 - Add syscalls for getting and setting affinity masks for cpusets or
   individual threads: cpuid_{get,set}affinity()
 - Add types for the 'level' and 'which' parameters for the cpuset.  This
   will permit expansion of the api to cover cpu masks for other objects
   identifiable with an id_t integer.  For example, IRQs and Jails may be
   coming soon.
 - The root set 0 contains all valid cpus.  All thread initially belong to
   cpuset 1.  This permits migrating all threads off of certain cpus to
   reserve them for special applications.

Sponsored by:	Nokia
Discussed with:	arch, rwatson, brooks, davidxu, deischen
Reviewed by:	antoine
2008-03-02 07:39:22 +00:00
Jeff Roberson 885d51a38a - Add a new sched_affinity() api to be used in the upcoming cpuset
implementation.
 - Add empty implementations of sched_affinity() to 4BSD and ULE.

Sponsored by:	Nokia
2008-03-02 07:19:35 +00:00
Kai Wang 517dbe2e45 - Do not malloc buffer for 0-size member when reading from archive.
- Fix a malloc buffer overrun: Use a while loop to check whether
  the string buffer is big enough after resizing, since doubling
  once might not be enough when a very long member name or symbol
  name is provided.
- Fix typo.

Reported by:	Michael Plass <mfp49_freebsd@plass-family.net>
Tested by:	Michael Plass <mfp49_freebsd@plass-family.net>
Reviewed by:	jkoshy
Approved by:	jkoshy
2008-03-02 07:01:01 +00:00
Joseph Koshy 48f9a2656a Translate the r_info field of ELF relocation records when converting
between 64 and 32 bit variants.

Submitted by:		kaiw
2008-03-02 06:33:10 +00:00
Marcel Moolenaar 10020e9d34 Add the SMI VTOC8 disk label option. 2008-03-02 06:24:29 +00:00
Marcel Moolenaar 252dfdbdbd Remove makefiles for geom_apple and geom_gpt. These are non-existent
for while.
2008-03-02 05:59:25 +00:00
Marcel Moolenaar da50cd3932 Add geom_part module. 2008-03-02 05:54:34 +00:00
David Schultz e43c8f6acc Hook up sqrtl() to the build. 2008-03-02 01:48:17 +00:00
David Schultz c6f56f9f41 MD implementations of sqrtl(). 2008-03-02 01:48:08 +00:00
David Schultz c6a4447b64 MI implementation of sqrtl(). This is very slow and should
be overridden when hardware sqrt is available.
2008-03-02 01:47:58 +00:00
Marcel Moolenaar 909f20c80d Add support for VTOC8 labels (aka sun disk labels). When a label does
not have VTOC information about the partitions, it will be created.
This is because the VTOC information is used for the partition type
and FreeBSD's sunlabel(8) does not create nor use VTOC information.
For this purpose, new tags have been added to support FreeBSD's
partition types.
2008-03-02 00:52:49 +00:00
Marcel Moolenaar 8775db6f50 Make the vm_pmap field of struct vmspace the last field in the
structure. This allows per-CPU variations of struct pmap on a
single architecture without affecting the machine-independent
fields. As such, the PMAP variations don't affect the ABI. They
become part of it.
2008-03-01 22:54:42 +00:00
Bjoern A. Zeeb af92e6cf95 Fix indentation (whitespace changes only).
MFC after:	6 days
2008-03-01 22:27:15 +00:00
Attilio Rao 5bb4b07c5f Split the kernel / userland interface with propert _KERNEL stub.
This should have been always there, but an userland brekage for the
recent lockmgr modifies showed it.
2008-03-01 22:14:45 +00:00
Justin T. Gibbs b601964112 In est_acpi_info(), initialize count before passing its pointer to
CPUFREQ_DRV_SETTINGS().  The value of count on input is used to
prefent overflow of the settings buffer passed into CPUFREQ_DRV_SETTINGS().

This corrects the "est: CPU supports Enhanced Speedstep, but is not recognized."
error on my system.

MFC after: 1 week
2008-03-01 21:58:34 +00:00
Attilio Rao 78a25172e3 Fix lockstatus sorting on the top list. 2008-03-01 21:24:07 +00:00
Attilio Rao 8e6fdb9e56 Connect lockmgr_args(9) to the build. 2008-03-01 20:39:56 +00:00
Attilio Rao 7f527abc56 - Add the informations for lockmgr_args(9)
- Sort rightly lockstatus(9) in the manpage
2008-03-01 20:36:50 +00:00
Attilio Rao 008f392e2e Update lockmgr manpage with last lockmgr modifies:
- Remove LK_SLEEPFAIL and LK_NOWAIT for lockinit() and add LK_QUIET and
  LK_NOPROFILE
- Include sys/lock.h as mandatory for the lockmgr support
2008-03-01 20:05:20 +00:00
Attilio Rao 5673e99646 Bump __FreeBSD_version in order to reflect:
- lockwaiters() axing out
- BUF_LOCKWAITERS() axing out
- brelvp() prototype changing
- lockinit() accepted arguments() range changing
2008-03-01 19:53:26 +00:00
Attilio Rao 7fbfba7bf8 - Handle buffer lock waiters count directly in the buffer cache instead
than rely on the lockmgr support [1]:
  * bump the waiters only if the interlock is held
  * let brelvp() return the waiters count
  * rely on brelvp() instead than BUF_LOCKWAITERS() in order to check
    for the waiters number
- Remove a namespace pollution introduced recently with lockmgr.h
  including lock.h by including lock.h directly in the consumers and
  making it mandatory for using lockmgr.
- Modify flags accepted by lockinit():
  * introduce LK_NOPROFILE which disables lock profiling for the
    specified lockmgr
  * introduce LK_QUIET which disables ktr tracing for the specified
    lockmgr [2]
  * disallow LK_SLEEPFAIL and LK_NOWAIT to be passed there so that it
    can only be used on a per-instance basis
- Remove BUF_LOCKWAITERS() and lockwaiters() as they are no longer
  used

This patch breaks KPI so __FreBSD_version will be bumped and manpages
updated by further commits. Additively, 'struct buf' changes results in
a disturbed ABI also.

[2] Really, currently there is no ktr tracing in the lockmgr, but it
will be added soon.

[1] Submitted by:	kib
Tested by:	pho, Andrea Barberio <insomniac at slackware dot it>
2008-03-01 19:47:50 +00:00
Alexander Motin fffba935e4 Add support for the libalias redirect functionality.
Submitted by:   Vadim Goncharov <vadim_nuclight@mail.ru>
2008-03-01 17:14:02 +00:00
Christian Brueffer ba0700b5b6 Xref uchcom(4). 2008-03-01 13:28:27 +00:00
Christian Brueffer b32d5fae5f Manpage for the uchcom(4) driver, adapted from the one in NetBSD. 2008-03-01 13:05:03 +00:00
Robert Watson 6cc189913c Add audit_prefixes to two more globally visible functions in the Audit
implementation.

MFC after:	1 month
2008-03-01 11:40:49 +00:00
Christian Brueffer 9453fd717f Move the HARDWARE section below the DESCRIPTION section, like it is
everywhere else.

MFC after:	3 days
2008-03-01 11:35:30 +00:00
Robert Watson fb4ed8c9bf Rename globally exposed symbol send_trigger() to audit_send_trigger().
MFC after:	1 month
2008-03-01 11:04:04 +00:00
Jack F Vogel e4ff3b06bd Change data formating in debug code. 2008-03-01 08:23:35 +00:00
Jack F Vogel 87ad6bb58e An error in the poll routine turned up during LINT build 2008-03-01 04:36:24 +00:00
Jack F Vogel 8443538a99 Missing braces in link routine. 2008-03-01 04:12:54 +00:00
Jack F Vogel cee379a803 Somehow missed the stanza for 575 in the em driver 2008-03-01 03:58:49 +00:00
Jack F Vogel b91b89f9e5 Missed some code that is ifdef STRICT_ALIGN :( 2008-03-01 03:25:33 +00:00
Jack F Vogel c6c22d3541 Temporarily comment out new entries due to build problems, to be resolved next week. 2008-03-01 01:09:35 +00:00
Jack F Vogel 96a761ec19 Add entries for em, igb, and ixgbe adapters. 2008-03-01 00:03:52 +00:00
Sean Farley 143d18cafc Remove a dereference. It was unintended and a no-op.
Use the correct value of errno.  Although the errno value passed into
printf() follows the *env() call, it is not guaranteed to be the errno
from that call.  When I wrote the regression tester, the environment I
used did pass the errno from the call.  Consolidate the print for the
return code and errno into a function in the process of fixing this.

Approved by:	wes (mentor)
2008-03-01 00:02:12 +00:00
Jack F Vogel 57158a0655 Last change was incomplete, instantiate the igb variable... 2008-02-29 22:52:59 +00:00
Jack F Vogel 6f48e68043 Add igb driver to the build 2008-02-29 22:42:29 +00:00
Marcel Moolenaar 028de8786a Follow-up improvements to the handling of false positives: If the
partition table is empty, check to see if we have something that
looks sufficiently like a BPB. On non-i386 machines, the boot
sector typically doesn't contain boot code; the end of the boot
sector is all zeroes. This is also where the partition table is
for MBRs.
We only check the sector size and cluster size, as that seems to
be the most reliable across implementations, BPB versions and
platforms.
2008-02-29 22:41:36 +00:00
Jack F Vogel 3773a7013f Need to add define of FAST interrupts as default 2008-02-29 22:38:12 +00:00
Paolo Pisati 755d3f8ae9 Hook ipfw_nat to the build. 2008-02-29 22:28:18 +00:00
Paolo Pisati 531c890b8a Move ipfw's nat code into its own kld: ipfw_nat. 2008-02-29 22:27:19 +00:00
Jack F Vogel df09ebc0b8 Detail the em/igb split so no one gets confused. 2008-02-29 22:08:49 +00:00