]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
16 years agoFix apparent mis-paste in previous check-in by author.
kan [Sun, 6 Apr 2008 22:08:17 +0000 (22:08 +0000)]
Fix apparent mis-paste in previous check-in by author.

16 years agoCommit manpages for lockmgr_args_rw(9) and lockmgr_rw(9).
attilio [Sun, 6 Apr 2008 21:22:12 +0000 (21:22 +0000)]
Commit manpages for lockmgr_args_rw(9) and lockmgr_rw(9).

16 years agoIn in_pcbnotifyall() and in6_pcbnotify(), use LIST_FOREACH_SAFE() and
rwatson [Sun, 6 Apr 2008 21:20:56 +0000 (21:20 +0000)]
In in_pcbnotifyall() and in6_pcbnotify(), use LIST_FOREACH_SAFE() and
eliminate unnecessary local variable caching of the list head pointer,
making the code a bit easier to read.

MFC after: 3 weeks

16 years agoFix a stupid typo.
brooks [Sun, 6 Apr 2008 20:39:33 +0000 (20:39 +0000)]
Fix a stupid typo.

Reviewed by: bz

16 years agoBump __FreeBSD_version in order to reflect lockmgr_rw() and
attilio [Sun, 6 Apr 2008 20:27:54 +0000 (20:27 +0000)]
Bump __FreeBSD_version in order to reflect lockmgr_rw() and
lockmgr_args_rw() introduction.

16 years agoOptimize lockmgr in order to get rid of the pool mutex interlock, of the
attilio [Sun, 6 Apr 2008 20:08:51 +0000 (20:08 +0000)]
Optimize lockmgr in order to get rid of the pool mutex interlock, of the
state transitioning flags and of msleep(9) callings.
Use, instead, an algorithm very similar to what sx(9) and rwlock(9)
alredy do and direct accesses to the sleepqueue(9) primitive.

In order to avoid writer starvation a mechanism very similar to what
rwlock(9) uses now is implemented, with the correspective per-thread
shared lockmgrs counter.

This patch also adds 2 new functions to lockmgr KPI: lockmgr_rw() and
lockmgr_args_rw().  These two are like the 2 "normal" versions, but they
both accept a rwlock as interlock.  In order to realize this, the general
lockmgr manager function "__lockmgr_args()" has been implemented through
the generic lock layer. It supports all the blocking primitives, but
currently only these 2 mappers live.

The patch drops the support for WITNESS atm, but it will be probabilly
added soon. Also, there is a little race in the draining code which is
also present in the current CVS stock implementation: if some sharers,
once they wakeup, are in the runqueue they can contend the lock with
the exclusive drainer.  This is hard to be fixed but the now committed
code mitigate this issue a lot better than the (past) CVS version.
In addition assertive KA_HELD and KA_UNHELD have been made mute
assertions because they are dangerous and they will be nomore supported
soon.

In order to avoid namespace pollution, stack.h is splitted into two
parts: one which includes only the "struct stack" definition (_stack.h)
and one defining the KPI.  In this way, newly added _lockmgr.h can
just include _stack.h.

Kernel ABI results heavilly changed by this commit (the now committed
version of "struct lock" is a lot smaller than the previous one) and
KPI results broken by lockmgr_rw() / lockmgr_args_rw() introduction,
so manpages and __FreeBSD_version will be updated accordingly.

Tested by:      kris, pho, jeff, danger
Reviewed by:    jeff
Sponsored by:   Google, Summer of Code program 2007

16 years agoIntroduce vm_reserv_reclaim_contig(). This function is used by
alc [Sun, 6 Apr 2008 18:09:28 +0000 (18:09 +0000)]
Introduce vm_reserv_reclaim_contig().  This function is used by
contigmalloc(9) as a last resort to steal pages from an inactive,
partially-used superpage reservation.

Rename vm_reserv_reclaim() to vm_reserv_reclaim_inactive() and
refactor it so that a separate subroutine is responsible for breaking
the selected reservation.  This subroutine is also used by
vm_reserv_reclaim_contig().

16 years agoRewrite node's r/w/q-lock semantics using only atomics instead of mutex
mav [Sun, 6 Apr 2008 15:26:32 +0000 (15:26 +0000)]
Rewrite node's r/w/q-lock semantics using only atomics instead of mutex
and atomics combination. Mutex is now used only for queue protection.
Also avoid unneded extra swi scheduling calls.

16 years agoCall listen(2) on bound tcp sockets before passing them to svc_tli_create.
dfr [Sun, 6 Apr 2008 13:52:17 +0000 (13:52 +0000)]
Call listen(2) on bound tcp sockets before passing them to svc_tli_create.

16 years ago - Correct a major error introduced in the per-cpu timeout commit. Sleep
jeff [Sun, 6 Apr 2008 11:08:49 +0000 (11:08 +0000)]
 - Correct a major error introduced in the per-cpu timeout commit.  Sleep
   and wakeup require the same wait channel to function properly.

Found by: kris
Pointy hat: me

16 years agoRemove bus_space_generic.c from the per-plarform files. Having it in the
cognet [Sat, 5 Apr 2008 21:57:11 +0000 (21:57 +0000)]
Remove bus_space_generic.c from the per-plarform files. Having it in the
per-cpu files should be enough.

16 years agoAdd bus_space_generic.c for the i81342 as well.
cognet [Sat, 5 Apr 2008 21:51:11 +0000 (21:51 +0000)]
Add bus_space_generic.c for the i81342 as well.

16 years agoTurn a tab into a space. This fixes a misalignment for ls -l.
imp [Sat, 5 Apr 2008 21:26:25 +0000 (21:26 +0000)]
Turn a tab into a space.  This fixes a misalignment for ls -l.

Tabs Noticed by: Antoine Brodin

16 years agoMove INTR_FILTER from opt_global.h to its own header.
jhb [Sat, 5 Apr 2008 20:13:15 +0000 (20:13 +0000)]
Move INTR_FILTER from opt_global.h to its own header.

16 years agoAdd a MI intr_event_handle() routine for the non-INTR_FILTER case. This
jhb [Sat, 5 Apr 2008 19:58:30 +0000 (19:58 +0000)]
Add a MI intr_event_handle() routine for the non-INTR_FILTER case.  This
allows all the INTR_FILTER #ifdef's to be removed from the MD interrupt
code.
- Rename the intr_event 'eoi', 'disable', and 'enable' hooks to
  'post_filter', 'pre_ithread', and 'post_ithread' to be less x86-centric.
  Also, add a comment describe what the MI code expects them to do.
- On amd64, i386, and powerpc this is effectively a NOP.
- On arm, don't bother masking the interrupt unless the ithread is
  scheduled in the non-INTR_FILTER case to match what INTR_FILTER did.
  Also, don't bother unmasking the interrupt in the post_filter case if
  we never masked it.  The INTR_FILTER case had been doing this by having
  arm_unmask_irq for the post_filter (formerly 'eoi') hook.
- On ia64, stray interrupts are now masked for the non-INTR_FILTER case.
  They were already masked in the INTR_FILTER case.
- On sparc64, use the a NULL pre_ithread hook and use intr_enable_eoi() for
  both the 'post_filter' and 'post_ithread' hooks to match what the
  non-INTR_FILTER code did.
- On sun4v, retire the ithread wrapper hack by using an appropriate
  'post_ithread' hook instead (it's what 'post_ithread'/'enable' was
  designed to do even in 5.x).

Glanced at by: piso
Reviewed by: marius
Requested by: marius [1], [5]
Tested on: amd64, i386, arm, sparc64

16 years agoNew release notes: ULE default (+MFC), aac(4) >2TB volume support
bmah [Sat, 5 Apr 2008 18:11:39 +0000 (18:11 +0000)]
New release notes: ULE default (+MFC), aac(4) >2TB volume support
(+MFC), kernel-mode NLM, adduser(8) -M (+MFC), ls(1) -D, nc(1) -O,
pkg_sign/pkg_check gone.

MFCs noted:  textdump(4), cmx(4), uslcom(4),

16 years agoDuring attach on some de(4) adapters the driver sends out a test packet as
jhb [Sat, 5 Apr 2008 17:24:44 +0000 (17:24 +0000)]
During attach on some de(4) adapters the driver sends out a test packet as
part of detecting the media.  Explicitly ensure that we don't send it to
bpf(4) as bpf(4) isn't setup yet.  This worked by accident before the bpf
interface stuff was reworked to avoid other races (bpf_peers_present, etc.)
but now it needs an explicit check to avoid a panic.

MFC after: 3 days
PR: kern/120915

16 years agoCorrect typo.
ceri [Sat, 5 Apr 2008 15:51:14 +0000 (15:51 +0000)]
Correct typo.

16 years agoOn i386, don't try to do network-type stuff if the device name is'nt pxeN.
dfr [Sat, 5 Apr 2008 15:03:29 +0000 (15:03 +0000)]
On i386, don't try to do network-type stuff if the device name is'nt pxeN.

16 years agoGPE lock may recurse on resume path.
takawata [Sat, 5 Apr 2008 14:21:01 +0000 (14:21 +0000)]
GPE lock may recurse on resume path.

16 years agoAllow for a zero length 'loader'.
dfr [Sat, 5 Apr 2008 10:26:20 +0000 (10:26 +0000)]
Allow for a zero length 'loader'.

16 years agoEliminate an unnecessary test from vm_phys_unfree_page().
alc [Sat, 5 Apr 2008 05:02:53 +0000 (05:02 +0000)]
Eliminate an unnecessary test from vm_phys_unfree_page().

16 years agoAdd support for IC Plus IP1001 PHY.
yongari [Sat, 5 Apr 2008 00:52:07 +0000 (00:52 +0000)]
Add support for IC Plus IP1001 PHY.

Tested by: Stuart Fraser < stuart AT stuartfraser DOT net >

16 years agoMFp4(mips2-jnpr):
imp [Fri, 4 Apr 2008 21:35:13 +0000 (21:35 +0000)]
MFp4(mips2-jnpr):

Add mips support.

16 years agoAdd mips support.
imp [Fri, 4 Apr 2008 21:33:41 +0000 (21:33 +0000)]
Add mips support.

16 years agoMFp4 (mips2-jnpr):
imp [Fri, 4 Apr 2008 21:12:40 +0000 (21:12 +0000)]
MFp4 (mips2-jnpr):
o Default to -O on mips as well as arm.  -O2 has been strongly implicated
  in many problems in the past, so we're taking a conservative approach
  until the problems are well understood.

16 years agoMFp4: Add mips support for dynamic linking.
imp [Fri, 4 Apr 2008 20:59:26 +0000 (20:59 +0000)]
MFp4: Add mips support for dynamic linking.

This code came from the merged mips2 and Juniper mips repositories.
Warner Losh, Randall Seager, Oleksandr Tymoshenko and Olivier Houchard
worked to merge, debug and integrate this code.  This code may also
contain code derived from NetBSD.

16 years agoIf you build a compiler with TARGET_BIG_ENDIAN, and then try to build
imp [Fri, 4 Apr 2008 19:33:09 +0000 (19:33 +0000)]
If you build a compiler with TARGET_BIG_ENDIAN, and then try to build
a little endian kernel, things break.  Be explicit about the endian
choice by setting it in the little endian case as well.

16 years agoUpdate a comment to vm_map_pmap_enter().
alc [Fri, 4 Apr 2008 19:14:58 +0000 (19:14 +0000)]
Update a comment to vm_map_pmap_enter().

16 years agoReintroduce UMA_SLAB_KMAP; however, change its spelling to
alc [Fri, 4 Apr 2008 18:41:12 +0000 (18:41 +0000)]
Reintroduce UMA_SLAB_KMAP; however, change its spelling to
UMA_SLAB_KERNEL for consistency with its sibling UMA_SLAB_KMEM.
(UMA_SLAB_KMAP met its original demise in revision 1.30 of
vm/uma_core.c.)  UMA_SLAB_KERNEL is now required by the jumbo frame
allocators.  Without it, UMA cannot correctly return pages from the
jumbo frame zones to the VM system because it resets the pages' object
field to NULL instead of the kernel object.  In more detail, the jumbo
frame zones are created with the option UMA_ZONE_REFCNT.  This causes
UMA to overwrite the pages' object field with the address of the slab.
However, when UMA wants to release these pages, it doesn't know how to
restore the object field, so it sets it to NULL.  This change teaches
UMA how to reset the object field to the kernel object.

Crashes reported by: kris
Fix tested by: kris
Fix discussed with: jeff
MFC after: 6 weeks

16 years agoFix stupid typo
imp [Fri, 4 Apr 2008 18:22:16 +0000 (18:22 +0000)]
Fix stupid typo

16 years agoEliminate an unnecessary test and its misleading comment from pmap_enter().
alc [Fri, 4 Apr 2008 18:00:22 +0000 (18:00 +0000)]
Eliminate an unnecessary test and its misleading comment from pmap_enter().

16 years agoMake kernel.tramp build properly on ARM9E.
raj [Fri, 4 Apr 2008 17:35:24 +0000 (17:35 +0000)]
Make kernel.tramp build properly on ARM9E.

Reviewed by: imp
Approved by: cognet (mentor)

16 years agoAdd note about PZERO being obsolete, because so much code uses it.
imp [Fri, 4 Apr 2008 16:59:58 +0000 (16:59 +0000)]
Add note about PZERO being obsolete, because so much code uses it.
Feel free to improve the verbage, since this was a compromise between
conflicting feedback I got on my original version.

16 years ago - Add sysctls at debug.rwlock to control the behavior of the speculative
jeff [Fri, 4 Apr 2008 10:00:46 +0000 (10:00 +0000)]
 - Add sysctls at debug.rwlock to control the behavior of the speculative
   spinning when readers hold a lock.  This spinning is speculative because,
   unlike the write case, we can not test whether the owners are running.
 - Add speculative read spinning for readers who are blocked by pending
   writers while a read lock is still held.  This allows the thread to
   spin until the write lock succeeds after which it may spin until the
   writer has released the lock.  This prevents excessive context switches
   when readers and writers both hold the lock for brief periods.

Sponsored by: Nokia

16 years agoAdd some compatibility code so that software which is built to use the new
dfr [Fri, 4 Apr 2008 09:43:03 +0000 (09:43 +0000)]
Add some compatibility code so that software which is built to use the new
struct flock with l_sysid member can work properly on an an old kernel which
doesn't support l_sysid.

Sponsored by: Isilon Systems

16 years agoThe temporary workaround for the call to the vget() without lock type in
kib [Fri, 4 Apr 2008 09:37:57 +0000 (09:37 +0000)]
The temporary workaround for the call to the vget() without lock type in
the fdesc_allocvp(). The caller of the fdesc_allocvp() expects that the
returned vnode is not reclaimed. Do lock the vnode exclusive and drop
the lock after.

Reported by: pho
Reviewed by: jeff

16 years ago- Normalize usage(), add "ddb pathname" syntax.
ru [Fri, 4 Apr 2008 07:31:43 +0000 (07:31 +0000)]
- Normalize usage(), add "ddb pathname" syntax.
- Revise the manpage.

16 years ago- Add -D to usage().
ru [Fri, 4 Apr 2008 05:55:42 +0000 (05:55 +0000)]
- Add -D to usage().
- Bump document date for the addition of the -D option.
- Reformat a sentence to look like a real sentence.

16 years agoAdd -D option to specify exact format of date and time output with ls -l.
grog [Fri, 4 Apr 2008 03:57:46 +0000 (03:57 +0000)]
Add -D option to specify exact format of date and time output with ls -l.

16 years agoAdd comment about specifying "ro" mount option when
rodrigc [Fri, 4 Apr 2008 01:50:58 +0000 (01:50 +0000)]
Add comment about specifying "ro" mount option when
doing an update mount on a read-only file system.

Requested by: yar

16 years ago - Add a Nokia copyright to cpuset to reflect their generous
jeff [Fri, 4 Apr 2008 01:22:04 +0000 (01:22 +0000)]
 - Add a Nokia copyright to cpuset to reflect their generous
   contribution to this work.

16 years ago - Allow static_boost to specify no boost with '0', traditional kernel
jeff [Fri, 4 Apr 2008 01:16:18 +0000 (01:16 +0000)]
 - Allow static_boost to specify no boost with '0', traditional kernel
   fixed pri boost with '1' or any priority less than the current thread's
   priority with a value greater than two.  Default the boost to
   PRI_MIN_TIMESHARE to prevent regular user-space threads from starving
   threads in the kernel.  This prevents these user-threads from also
   being scheduled as if they are high fixed-priority kernel threads.
 - Restore the setting of lowpri in tdq_choose().  It has to be either here
   or in sched_switch().  I accidentally removed it from both places.

Tested by: kris

16 years ago - Don't check for the ITHD pri class in tdq_load_add and rem. 4BSD doesn't
jeff [Fri, 4 Apr 2008 01:04:43 +0000 (01:04 +0000)]
 - Don't check for the ITHD pri class in tdq_load_add and rem.  4BSD doesn't
   do this either.  Simply check P_NOLOAD.  It'd be nice if this was
   in a thread flag so we didn't have an extra cache miss every time we
   add and remove a thread from the run-queue.

16 years ago - Fix a mis-merge that crept in during the softclock changes.
jeff [Fri, 4 Apr 2008 01:03:23 +0000 (01:03 +0000)]
 - Fix a mis-merge that crept in during the softclock changes.

Spotted by: jhb

16 years agoAllow crashdumps on machines with >4GB of RAM as long as the adapter can
emaste [Thu, 3 Apr 2008 23:29:31 +0000 (23:29 +0000)]
Allow crashdumps on machines with >4GB of RAM as long as the adapter can
do 64-bit S/G.

Submitted by: Alex Bencz
Reviewed by: scottl

16 years agoFix the build breakage, need the | between dependencies, I didn't
jfv [Thu, 3 Apr 2008 20:58:18 +0000 (20:58 +0000)]
Fix the build breakage, need the | between dependencies, I didn't
realize that :(

16 years agoAlways build kernel.tramp. This should be helpful for a lot of
imp [Thu, 3 Apr 2008 20:42:36 +0000 (20:42 +0000)]
Always build kernel.tramp.  This should be helpful for a lot of
people, as well making sure it doesn't break.

16 years agoUse safer string handling.
imp [Thu, 3 Apr 2008 20:37:38 +0000 (20:37 +0000)]
Use safer string handling.

Reviewed by: security-team

16 years agoMinor style(9) nit: move to using ANSI definition of functions.
imp [Thu, 3 Apr 2008 20:36:44 +0000 (20:36 +0000)]
Minor style(9) nit: move to using ANSI definition of functions.

16 years agoNow really add the bus_space_generic.c file...
raj [Thu, 3 Apr 2008 18:28:34 +0000 (18:28 +0000)]
Now really add the bus_space_generic.c file...

Reviewed by: sam
Approved by: cognet (mentor)

16 years agoRefactor certain ARM bus space methods: instead of having multiple copies of
raj [Thu, 3 Apr 2008 18:22:08 +0000 (18:22 +0000)]
Refactor certain ARM bus space methods: instead of having multiple copies of
the same code introduce sys/arm/arm/bus_space_generic.c for a shared set of
routines.

Reviewed by: sam
Approved by: cognet (mentor)

16 years agoFix AVILA build.
raj [Thu, 3 Apr 2008 18:20:39 +0000 (18:20 +0000)]
Fix AVILA build.

Reviewed by: sam
Approved by: cognet(mentor)

16 years agoAlign functions to 16-byte boundaries due to profiling granularity.
marcel [Thu, 3 Apr 2008 17:40:20 +0000 (17:40 +0000)]
Align functions to 16-byte boundaries due to profiling granularity.

16 years agoSet sc_psim so that the openpic core can correct the off-by-one
marcel [Thu, 3 Apr 2008 17:38:27 +0000 (17:38 +0000)]
Set sc_psim so that the openpic core can correct the off-by-one
error in the number of IRQs that PSIM gives us.

16 years agoTake the first baby step towards unifying and cleaning up arminit():
imp [Thu, 3 Apr 2008 16:44:50 +0000 (16:44 +0000)]
Take the first baby step towards unifying and cleaning up arminit():
- Pull all the code to deal with the trampoline stuff into one
  centeralized place and use it from everywhere.
- Some minor style tidiness

Reviewed by: tinguely

16 years agoFix descriptions of "struct msqid_ds and "struct ipc_perm" to match
ru [Thu, 3 Apr 2008 16:21:43 +0000 (16:21 +0000)]
Fix descriptions of "struct msqid_ds and "struct ipc_perm" to match
harsh reality.

16 years agoDon't force a reset at driver attach time. It doesn't work on some
scottl [Thu, 3 Apr 2008 14:39:48 +0000 (14:39 +0000)]
Don't force a reset at driver attach time.  It doesn't work on some
adapters, apparently.

16 years agolet umtxq_busy() only spin on mp machine. make function name
davidxu [Thu, 3 Apr 2008 11:49:20 +0000 (11:49 +0000)]
let umtxq_busy() only spin on mp machine. make function name
do_rwlock_unlock to be consistent with others.

16 years agoPut back the quote from Chinggis Khan removed in rev. 1.259.
yar [Thu, 3 Apr 2008 10:22:56 +0000 (10:22 +0000)]
Put back the quote from Chinggis Khan removed in rev. 1.259.
The quote predated rev. 1.232, which rev. 1.259 was to correct;
therefore it was protected by the "Don't remove fortunes" rule.

Noticed by: ceri
Pointy hat to: yar

16 years agoAnother build fix
jfv [Thu, 3 Apr 2008 06:45:38 +0000 (06:45 +0000)]
Another build fix

16 years agoFix a lint issue in the build.
jfv [Thu, 3 Apr 2008 06:17:16 +0000 (06:17 +0000)]
Fix a lint issue in the build.

16 years agoAdd some tests for fma(), fmaf(), and fmal().
das [Thu, 3 Apr 2008 06:15:58 +0000 (06:15 +0000)]
Add some tests for fma(), fmaf(), and fmal().

16 years agoFix some corner cases:
das [Thu, 3 Apr 2008 06:14:51 +0000 (06:14 +0000)]
Fix some corner cases:
- fma(x, y, z) returns z, not NaN, if z is infinite, x and y are finite,
  x*y overflows, and x*y and z have opposite signs.
- fma(x, y, z) doesn't generate an overflow, underflow, or inexact exception
  if z is NaN or infinite, as per IEEE 754R.
- If the rounding mode is set to FE_DOWNWARD, fma(1.0, 0.0, -0.0) is -0.0,
  not +0.0.

16 years agoKERNBASE + 0x00200000 is the same thing as KERNVIRTADDR on this
imp [Thu, 3 Apr 2008 06:14:23 +0000 (06:14 +0000)]
KERNBASE + 0x00200000 is the same thing as KERNVIRTADDR on this
platform, so use the latter in preference to the former.  This makes
the fake_preload setup be the same between kb920x_machdep.c and
avila_machdep.c....

16 years agoRemove unnecessary #define.
imp [Thu, 3 Apr 2008 06:07:45 +0000 (06:07 +0000)]
Remove unnecessary #define.

16 years agoAdd a manual page and a Makefile.
gnn [Thu, 3 Apr 2008 05:26:54 +0000 (05:26 +0000)]
Add a manual page and a Makefile.

Add code to reflect packets back from the sink so that we can measure
round trip at the source.

16 years agoput THR_CRITICAL_LEAVE into do .. while statement.
davidxu [Thu, 3 Apr 2008 02:47:35 +0000 (02:47 +0000)]
put THR_CRITICAL_LEAVE into do .. while statement.

16 years agostyle(9) cleanup
kevlo [Thu, 3 Apr 2008 02:41:54 +0000 (02:41 +0000)]
style(9) cleanup

16 years agoadd __hidden suffix to _umtx_op_err, this eliminates PLT.
davidxu [Thu, 3 Apr 2008 02:13:51 +0000 (02:13 +0000)]
add __hidden suffix to _umtx_op_err, this eliminates PLT.

16 years agoFix minor bug in last checkin, NO_STRICT_ALIGNMENT code.
jfv [Thu, 3 Apr 2008 00:25:09 +0000 (00:25 +0000)]
Fix minor bug in last checkin, NO_STRICT_ALIGNMENT code.

16 years agoThis update primarily addresses the ability to have both the em
jfv [Wed, 2 Apr 2008 22:00:36 +0000 (22:00 +0000)]
This update primarily addresses the ability to have both the em
and the igb driver static in the kernel. But it also reflects
some other bug fixes in my development stream at Intel.
PR 122373 is also fixed in this code.

16 years agoBack out revision 1.6, the addition of "BEFORE: mountcritremote".
dougb [Wed, 2 Apr 2008 19:29:16 +0000 (19:29 +0000)]
Back out revision 1.6, the addition of "BEFORE: mountcritremote".

mountcritremote REQUIREs FILESYSTEMS, and that script REQUIREs zfs,
so this change is a noop. By removing it we make life a little easier
both for rcorder(8) and for debugging down the road.

Approved by: 2 weeks of silence from pjd

16 years agoPR ports/121363 (& ports/73797) has been committed, so we can now go back
obrien [Wed, 2 Apr 2008 17:24:22 +0000 (17:24 +0000)]
PR ports/121363 (& ports/73797) has been committed, so we can now go back
to JB's revision 1.96 change to remove -fno-strict-aliasing from CFLAGS.

This makes the default CFLAGS to match the simple defaults that the
tinderboxes use.  By using -fno-strict-aliasing by default we are
choosing to ignore problems in code which had the potential to
shoot ourselves in the foot.

16 years agoAdd zyd, ural, and rum. They were missing.
imp [Wed, 2 Apr 2008 16:17:19 +0000 (16:17 +0000)]
Add zyd, ural, and rum.  They were missing.

16 years agoInitialize if_baudrate using IF_Gbps() macro.
gallatin [Wed, 2 Apr 2008 13:59:43 +0000 (13:59 +0000)]
Initialize if_baudrate using IF_Gbps() macro.

Note that if_baudrate is a long, and 32-bits isn't enough to properly
represent 10Gb/s.

Pointed out by: dwhite

16 years agoNon-portable functions are in pthread_np.h, fix compiling problem.
davidxu [Wed, 2 Apr 2008 11:41:12 +0000 (11:41 +0000)]
Non-portable functions are in pthread_np.h, fix compiling problem.

16 years ago - Convert two timeout users to the new callout_reset_curcpu() api.
jeff [Wed, 2 Apr 2008 11:21:42 +0000 (11:21 +0000)]
 - Convert two timeout users to the new callout_reset_curcpu() api.

Sponsored by: Nokia

16 years agoImplement per-cpu callout threads, wheels, and locks.
jeff [Wed, 2 Apr 2008 11:20:30 +0000 (11:20 +0000)]
Implement per-cpu callout threads, wheels, and locks.

 - Move callout thread creation from kern_intr.c to kern_timeout.c
 - Call callout_tick() on every processor via hardclock_cpu() rather than
   inspecting callout internal details in kern_clock.c.
 - Remove callout implementation details from callout.h
 - Package up all of the global variables into a per-cpu callout structure.
 - Start one thread per-cpu.  Threads are not strictly bound.  They prefer
   to execute on the native cpu but may migrate temporarily if interrupts
   are starving callout processing.
 - Run all callouts by default in the thread for cpu0 to maintain current
   ordering and concurrency guarantees.  Many consumers may not properly
   handle concurrent execution.
 - The new callout_reset_on() api allows specifying a particular cpu to
   execute the callout on.  This may migrate a callout to a new cpu.
   callout_reset() schedules on the last assigned cpu while
   callout_reset_curcpu() schedules on the current cpu.

Reviewed by: phk
Sponsored by: Nokia

16 years agoAdd two missed chunks from the rev. 1.210, for the giant_read() and
kib [Wed, 2 Apr 2008 11:11:58 +0000 (11:11 +0000)]
Add two missed chunks from the rev. 1.210, for the giant_read() and
giant_ioctl().

PR: kern/122287
MFC after: 3 days

16 years ago - Destroy the bo mtx when the vnode is destroyed.
jeff [Wed, 2 Apr 2008 10:40:03 +0000 (10:40 +0000)]
 - Destroy the bo mtx when the vnode is destroyed.

16 years agoSpell -t option's argument by name.
ru [Wed, 2 Apr 2008 09:41:29 +0000 (09:41 +0000)]
Spell -t option's argument by name.

16 years agoAdd pthread_setaffinity_np and pthread_getaffinity_np to libc namespace.
davidxu [Wed, 2 Apr 2008 08:53:18 +0000 (08:53 +0000)]
Add pthread_setaffinity_np and pthread_getaffinity_np to libc namespace.

16 years agoRemove unused functions.
davidxu [Wed, 2 Apr 2008 08:33:42 +0000 (08:33 +0000)]
Remove unused functions.

16 years agoReplace function _umtx_op with _umtx_op_err, the later function directly
davidxu [Wed, 2 Apr 2008 07:41:25 +0000 (07:41 +0000)]
Replace function _umtx_op with _umtx_op_err, the later function directly
returns errno, because errno can be mucked by user's signal handler and
most of pthread api heavily depends on errno to be correct, this change
should improve stability of the thread library.

16 years agoFix compiling problem for amd64.
davidxu [Wed, 2 Apr 2008 05:54:41 +0000 (05:54 +0000)]
Fix compiling problem for amd64.

16 years agoOptimize pmap_pml4e() and pmap_pdpe() based upon two observations: The
alc [Wed, 2 Apr 2008 04:39:47 +0000 (04:39 +0000)]
Optimize pmap_pml4e() and pmap_pdpe() based upon two observations: The
given pmap is never NULL, and therefore pmap_pml4e() can never return
NULL.  The pervasive use of these inline functions throughout the pmap
makes these simple changes worthwhile.

16 years agoReplace userland rwlock with a pure kernel based rwlock, the new
davidxu [Wed, 2 Apr 2008 04:32:31 +0000 (04:32 +0000)]
Replace userland rwlock with a pure kernel based rwlock, the new
implementation does not switch pointers when it resumes waiters.

Asked by: jeff

16 years agoEr, don't restart a timeout version.
davidxu [Wed, 2 Apr 2008 04:26:59 +0000 (04:26 +0000)]
Er, don't restart a timeout version.

16 years agoIntroduce kernel based userland rwlock. Each umtx chain now has two lists,
davidxu [Wed, 2 Apr 2008 04:08:37 +0000 (04:08 +0000)]
Introduce kernel based userland rwlock. Each umtx chain now has two lists,
one for readers and one for writers, other types of synchronization
object just use first list.

Asked by: jeff

16 years agoAdd manpages for rw_try_rlock() and rw_try_wlock() functions.
attilio [Tue, 1 Apr 2008 20:56:45 +0000 (20:56 +0000)]
Add manpages for rw_try_rlock() and rw_try_wlock() functions.

16 years agoCalling RequestSupplementAdapterInfo before RequestAdapterInfo appears
emaste [Tue, 1 Apr 2008 20:53:32 +0000 (20:53 +0000)]
Calling RequestSupplementAdapterInfo before RequestAdapterInfo appears
to trip a bug causing the latter to return a zeroed struct
aac_adapter_info.  This causes two issues.  One is cosmetic only --
a verbose boot prints information about the controller, and shows all
zero:

aac0: Unknown processor 0MHz, 0MB memory (0MB cache, 0MB execution),
  unknown battery platform

The second problem is that the firmware version information is stored
away for aac_rev_check, for userland tools (like aaccli) to query via
the FSACTL_MINIPORT_REV_CHECK and FSACTL_LNX_MINIPORT_REV_CHECK ioctls.
When aaccli encounters this issue it prints

Command Error: <The current AFAAPI.DLL is too old to work with the
  current controller software.>

Move the RequestSupplementAdapterInfo call after RequestAdapterInfo,
which seems to fix both problems.

16 years agoBump __FreeBSD_version in order to reflect rw_try_rlock() and
attilio [Tue, 1 Apr 2008 20:33:06 +0000 (20:33 +0000)]
Bump __FreeBSD_version in order to reflect rw_try_rlock() and
rw_try_wlock() functions introduction.

16 years agoAdd rw_try_rlock() and rw_try_wlock() to rwlocks.
attilio [Tue, 1 Apr 2008 20:31:55 +0000 (20:31 +0000)]
Add rw_try_rlock() and rw_try_wlock() to rwlocks.
These functions try the specified operation (rlocking and wlocking) and
true is returned if the operation completes, false otherwise.

The KPI is enriched by this commit, so __FreeBSD_version bumping and
manpage updating will happen soon.

Requested by: jeff, kris

16 years agoDon't try to use an SX lock while holding the vnode interlock.
dfr [Tue, 1 Apr 2008 16:07:01 +0000 (16:07 +0000)]
Don't try to use an SX lock while holding the vnode interlock.

Sponsored by: Isilon Systems

16 years agoAdd an -O option to disable TCP options, for protocol testing purposes.
bms [Tue, 1 Apr 2008 13:54:24 +0000 (13:54 +0000)]
Add an -O option to disable TCP options, for protocol testing purposes.
Do this for active and passive (-l switch) TCP sessions.

MFC after: 1 week

16 years agoAdd pkg_check and pkg_sign to ObsoleteFiles.inc
flz [Tue, 1 Apr 2008 11:05:26 +0000 (11:05 +0000)]
Add pkg_check and pkg_sign to ObsoleteFiles.inc

Reminded by: Pawel Worach
MFC after: 1 week

16 years agoCorrect the prototype for the faccessat().
kib [Tue, 1 Apr 2008 10:49:06 +0000 (10:49 +0000)]
Correct the prototype for the faccessat().

Reported by: ru

16 years agoConnect malo.4 to the build.
weongyo [Tue, 1 Apr 2008 07:20:04 +0000 (07:20 +0000)]
Connect malo.4 to the build.

Approved by: thompsa (mentor)

16 years agoNormally, we are often reading local time rather than setting time zone,
davidxu [Tue, 1 Apr 2008 06:56:11 +0000 (06:56 +0000)]
Normally, we are often reading local time rather than setting time zone,
replace mutex with rwlock, this should eliminate lock contention in
most cases.