]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
17 years agoUpdated release notes: BIND 9.4.1, IPFilter 4.1.23.
bmah [Tue, 5 Jun 2007 14:30:36 +0000 (14:30 +0000)]
Updated release notes:  BIND 9.4.1, IPFilter 4.1.23.

Removed release note:  CORE scheduler.

17 years agoRestore non-SMP build.
kib [Tue, 5 Jun 2007 14:20:13 +0000 (14:20 +0000)]
Restore non-SMP build.

Reviewed by: attilio

17 years agoRemove GIANT_REQUIRED for upcoming changes in FireWire stack.
simokawa [Tue, 5 Jun 2007 14:15:45 +0000 (14:15 +0000)]
Remove GIANT_REQUIRED for upcoming changes in FireWire stack.

17 years agoMFi386: revision 1.656
nyan [Tue, 5 Jun 2007 11:49:56 +0000 (11:49 +0000)]
MFi386: revision 1.656

  Add the machine-specific definitions for configuring the new physical
  memory allocator.

  Set the size of phys_avail[] and dump_avail[] using one of these
  definitions.

17 years agoDefault to R/O root filesystem
phk [Tue, 5 Jun 2007 11:17:45 +0000 (11:17 +0000)]
Default to R/O root filesystem

17 years agoUpdate man page for VOP_OPEN() after fdidx->fp conversion.
kib [Tue, 5 Jun 2007 10:48:29 +0000 (10:48 +0000)]
Update man page for VOP_OPEN() after fdidx->fp conversion.

Reminded by: ru

17 years agoFix the fstab on the second image, just like updatep2.sh does.
phk [Tue, 5 Jun 2007 10:21:15 +0000 (10:21 +0000)]
Fix the fstab on the second image, just like updatep2.sh does.

17 years agoExpose __stack_chk_fail_local() so -fstack-protector-all works.
des [Tue, 5 Jun 2007 08:24:34 +0000 (08:24 +0000)]
Expose __stack_chk_fail_local() so -fstack-protector-all works.

17 years agoWrite to slice name instead of directly to the disk device.
delphij [Tue, 5 Jun 2007 05:44:41 +0000 (05:44 +0000)]
Write to slice name instead of directly to the disk device.
This fixes writing boot code upon upgrade.

PR: bin/61587
Submitted by: Nobuyuki Koganemaru <n-kogane syd.odn.ne.jp>
MFC after: 1 month

17 years agoAdd the machine-specific definitions for configuring the new physical
alc [Tue, 5 Jun 2007 05:17:20 +0000 (05:17 +0000)]
Add the machine-specific definitions for configuring the new physical
memory allocator.

Set the size of phys_avail[] and dump_avail[] using one of these
definitions.

Approved by: re

17 years agoSatisfy witness during shutdown
scottl [Tue, 5 Jun 2007 05:03:13 +0000 (05:03 +0000)]
Satisfy witness during shutdown

17 years ago - Better fix for previous error; use DEVOLATILE on the td_lock pointer
jeff [Tue, 5 Jun 2007 04:12:46 +0000 (04:12 +0000)]
 - Better fix for previous error; use DEVOLATILE on the td_lock pointer
   it can actually sometimes be something other than sched_lock even on
   schedulers which rely on a global scheduler lock.

Tested by: kan

17 years ago - Pass &sched_lock as the third argument to cpu_switch() as this will
jeff [Tue, 5 Jun 2007 03:46:54 +0000 (03:46 +0000)]
 - Pass &sched_lock as the third argument to cpu_switch() as this will
   always be the correct lock and we don't get volatile warnings this
   way.

Pointed out by: kan

17 years ago - Define TDQ_ID() for the !SMP case.
jeff [Tue, 5 Jun 2007 02:53:51 +0000 (02:53 +0000)]
 - Define TDQ_ID() for the !SMP case.
 - Default pick_pri to off.  It is not faster in most cases.

17 years ago - ULE is no longer buggy or experimental.
jeff [Tue, 5 Jun 2007 01:31:04 +0000 (01:31 +0000)]
 - ULE is no longer buggy or experimental.

17 years agosched_core(4) removed.
delphij [Tue, 5 Jun 2007 01:10:47 +0000 (01:10 +0000)]
sched_core(4) removed.

17 years ago- Added a new Ethernet media type (2500BaseSX) to support BCM5708 controllers
davidch [Tue, 5 Jun 2007 00:32:01 +0000 (00:32 +0000)]
- Added a new Ethernet media type (2500BaseSX) to support BCM5708 controllers
  which support a 2.5Gbps mode over fiber using next page extensions during
  autonegotiation.  Typically only found in blade systems which also include
  a Broadcom 2.5Gbps capable switch.

MFC after: 2 weeks

17 years ago - Add a new argument to cpu_switch. This is a pointer to a mutex that
jeff [Tue, 5 Jun 2007 00:16:43 +0000 (00:16 +0000)]
 - Add a new argument to cpu_switch.  This is a pointer to a mutex that
   oldthread should point at before we return.
 - When cpu_switch() is called the td_lock pointer in the old thread may
   point at the blocked lock.  This prevents other processors from
   switching into this thread while we're still switching out.  Wait
   until we're done deactivating the vmspace before we release the
   thread by assigning to td_lock.
 - Before we can activate the new vmspace we must make sure that the new
   thread is not assigned to the blocked lock.  It may be in the process
   of switching out on another cpu.  Spin until the new thread is
   available.

17 years ago - Expose td_lock to assembly so it may be used in cpu_switch().
jeff [Tue, 5 Jun 2007 00:13:49 +0000 (00:13 +0000)]
 - Expose td_lock to assembly so it may be used in cpu_switch().

17 years ago - Remove sched_core.c. The maintainer has lost interest in pursuing this
jeff [Tue, 5 Jun 2007 00:12:37 +0000 (00:12 +0000)]
 - Remove sched_core.c.  The maintainer has lost interest in pursuing this
   and it has been neglected in the recent ksegrp removal as well as
   the thread_lock() changes.

Discussed with: davidxu

17 years agoCommit 14/14 of sched_lock decomposition.
jeff [Tue, 5 Jun 2007 00:00:57 +0000 (00:00 +0000)]
Commit 14/14 of sched_lock decomposition.
 - Use thread_lock() rather than sched_lock for per-thread scheduling
   sychronization.
 - Use the per-process spinlock rather than the sched_lock for per-process
   scheduling synchronization.

Tested by:      kris, current@
Tested on:      i386, amd64, ULE, 4BSD, libthr, libkse, PREEMPTION, etc.
Discussed with: kris, attilio, kmacy, jhb, julian, bde (small parts each)

17 years agoCommit 13/14 of sched_lock decomposition.
jeff [Mon, 4 Jun 2007 23:58:47 +0000 (23:58 +0000)]
Commit 13/14 of sched_lock decomposition.
 - Add a new parameter to cpu_switch() that is used to release the lock on
   the outgoing thread and properly acquire the lock on the incoming
   thread.  This parameter is not required for schedulers that don't do
   per-cpu locking and architectures which do not support it may continue
   to use the 4BSD scheduler.  This feature is presently not supported
   on ia64

Tested by:      kris, current@
Tested on:      i386, amd64, ULE, 4BSD, libthr, libkse, PREEMPTION, etc.
Discussed with: kris, attilio, kmacy, jhb, julian, bde (small parts each)

17 years ago - Change comments and asserts to reflect the removal of the global
jeff [Mon, 4 Jun 2007 23:57:32 +0000 (23:57 +0000)]
 - Change comments and asserts to reflect the removal of the global
   scheduler lock.

Tested by:      kris, current@
Tested on:      i386, amd64, ULE, 4BSD, libthr, libkse, PREEMPTION, etc.
Discussed with: kris, attilio, kmacy, jhb, julian, bde (small parts each)

17 years agoCommit 11/14 of sched_lock decomposition.
jeff [Mon, 4 Jun 2007 23:56:33 +0000 (23:56 +0000)]
Commit 11/14 of sched_lock decomposition.
 - There is no globally visible scheduler lock any longer.  For now the
   watchdog can only check Giant.  This model of checking particular locks
   is flawed and should be revisited.  Other metrics should be considered.

Tested by:      kris, current@
Tested on:      i386, amd64, ULE, 4BSD, libthr, libkse, PREEMPTION, etc.
Discussed with: kris, attilio, kmacy, jhb, julian, bde (small parts each)

17 years agoCommit 10/14 of sched_lock decomposition.
jeff [Mon, 4 Jun 2007 23:56:08 +0000 (23:56 +0000)]
Commit 10/14 of sched_lock decomposition.
 - Use sched_throw() rather than replicating the same cpu_throw() code for
   each architecture.  This also allows the scheduler to use any locking it
   may want to.
 - Use the thread_lock() rather than sched_lock when preempting.
 - The scheduler lock is not required to synchronize release_aps.

Tested by:      kris, current@
Tested on:      i386, amd64, ULE, 4BSD, libthr, libkse, PREEMPTION, etc.
Discussed with: kris, attilio, kmacy, jhb, julian, bde (small parts each)

17 years agoCommit 10/14 of sched_lock decomposition.
jeff [Mon, 4 Jun 2007 23:55:45 +0000 (23:55 +0000)]
Commit 10/14 of sched_lock decomposition.
 - Add new spinlocks to support thread_lock() and adjust ordering.

Tested by:      kris, current@
Tested on:      i386, amd64, ULE, 4BSD, libthr, libkse, PREEMPTION, etc.
Discussed with: kris, attilio, kmacy, jhb, julian, bde (small parts each)

17 years agoCommit 9/14 of sched_lock decomposition.
jeff [Mon, 4 Jun 2007 23:55:32 +0000 (23:55 +0000)]
Commit 9/14 of sched_lock decomposition.
 - Attempt to return the ttyinfo() selection algorithm to something sane
   as it has been broken and disabled for some time.  Adapt this algorithm
   in such a way that it does not conflict with per-cpu scheduler locking.

Tested by:      kris, current@
Tested on:      i386, amd64, ULE, 4BSD, libthr, libkse, PREEMPTION, etc.
Discussed with: kris, attilio, kmacy, jhb, julian, bde (small parts each)

17 years agoCommit 8/14 of sched_lock decomposition.
jeff [Mon, 4 Jun 2007 23:54:50 +0000 (23:54 +0000)]
Commit 8/14 of sched_lock decomposition.
 - Use a global umtx spinlock to protect the sleep queues now that there
   is no global scheduler lock.
 - Use thread_lock() to protect thread state.

Tested by:      kris, current@
Tested on:      i386, amd64, ULE, 4BSD, libthr, libkse, PREEMPTION, etc.
Discussed with: kris, attilio, kmacy, jhb, julian, bde (small parts each)

17 years agoCommit 7/14 of sched_lock decomposition.
jeff [Mon, 4 Jun 2007 23:54:27 +0000 (23:54 +0000)]
Commit 7/14 of sched_lock decomposition.
 - Use thread_lock() rather than sched_lock for per-thread scheduling
   sychronization.
 - Use the per-process spinlock rather than the sched_lock for per-process
   scheduling synchronization.
 - Use a global kse spinlock to protect upcall and thread assignment.  The
   per-process spinlock can not be used because this lock must be acquired
   via mi_switch() where we already hold a thread lock.  The kse spinlock
   is a leaf lock ordered after the process and thread spinlocks.

Tested by:      kris, current@
Tested on:      i386, amd64, ULE, 4BSD, libthr, libkse, PREEMPTION, etc.
Discussed with: kris, attilio, kmacy, jhb, julian, bde (small parts each)

17 years agoCommit 6/14 of sched_lock decomposition.
jeff [Mon, 4 Jun 2007 23:53:34 +0000 (23:53 +0000)]
Commit 6/14 of sched_lock decomposition.
 - Use thread_lock() rather than sched_lock for per-thread scheduling
   sychronization.
 - Use the per-process spinlock rather than the sched_lock for per-process
   scheduling synchronization.
 - Replace the tail-end of fork_exit() with a scheduler specific routine
   which can do the appropriate lock manipulations.

Tested by:      kris, current@
Tested on:      i386, amd64, ULE, 4BSD, libthr, libkse, PREEMPTION, etc.
Discussed with: kris, attilio, kmacy, jhb, julian, bde (small parts each)

17 years agoCommit 5/14 of sched_lock decomposition.
jeff [Mon, 4 Jun 2007 23:53:06 +0000 (23:53 +0000)]
Commit 5/14 of sched_lock decomposition.
 - Protect the cp_time tick counts with atomics instead of a global lock.
   There will only be one atomic per tick and this allows all processors
   to execute softclock concurrently.
 - In softclock, protect access to rusage and td_*tick data with the
   thread_lock(), expanding the scope of the thread lock over the whole
   function.
 - Do some creative re-arranging in hardclock() to avoid excess locking.
 - Protect the p_timer fields with the per-process spinlock.

Tested by:      kris, current@
Tested on:      i386, amd64, ULE, 4BSD, libthr, libkse, PREEMPTION, etc.
Discussed with: kris, attilio, kmacy, jhb, julian, bde (small parts each)

17 years agoCommit 4/14 of sched_lock decomposition.
jeff [Mon, 4 Jun 2007 23:52:24 +0000 (23:52 +0000)]
Commit 4/14 of sched_lock decomposition.
 - Use thread_lock() rather than sched_lock for per-thread scheduling
   sychronization.
 - Use the per-process spinlock rather than the sched_lock for per-process
   scheduling synchronization.
 - Move some common code into thread_suspend_switch() to handle the
   mechanics of suspending a thread.  The locking here is incredibly
   convoluted and should be simplified.

Tested by:      kris, current@
Tested on:      i386, amd64, ULE, 4BSD, libthr, libkse, PREEMPTION, etc.
Discussed with: kris, attilio, kmacy, jhb, julian, bde (small parts each)

17 years agoCommit 3/14 of sched_lock decomposition.
jeff [Mon, 4 Jun 2007 23:51:44 +0000 (23:51 +0000)]
Commit 3/14 of sched_lock decomposition.
 - Add a per-turnstile spinlock to solve potential priority propagation
   deadlocks that are possible with thread_lock().
 - The turnstile lock order is defined as the exact opposite of the
   lock order used with the sleep locks they represent.  This allows us
   to walk in reverse order in priority_propagate and this is the only
   place we wish to multiply acquire turnstile locks.
 - Use the turnstile_chain lock to protect assigning mutexes to turnstiles.
 - Change the turnstile interface to pass back turnstile pointers to the
   consumers.  This allows us to reduce some locking and makes it easier
   to cancel turnstile assignment while the turnstile chain lock is held.

Tested by:      kris, current@
Tested on:      i386, amd64, ULE, 4BSD, libthr, libkse, PREEMPTION, etc.
Discussed with: kris, attilio, kmacy, jhb, julian, bde (small parts each)

17 years agoCommit 2/14 of sched_lock decomposition.
jeff [Mon, 4 Jun 2007 23:50:56 +0000 (23:50 +0000)]
Commit 2/14 of sched_lock decomposition.
 - Adapt sleepqueues to the new thread_lock() mechanism.
 - Delay assigning the sleep queue spinlock as the thread lock until after
   we've checked for signals.  It is illegal for a thread to return in
   mi_switch() with any lock assigned to td_lock other than the scheduler
   locks.
 - Change sleepq_catch_signals() to do the switch if necessary to simplify
   the callers.
 - Simplify timeout handling now that locking a sleeping thread has the
   side-effect of locking the sleepqueue.  Some previous races are no
   longer possible.

Tested by:      kris, current@
Tested on:      i386, amd64, ULE, 4BSD, libthr, libkse, PREEMPTION, etc.
Discussed with: kris, attilio, kmacy, jhb, julian, bde (small parts each)

17 years agoCommit 1/14 of sched_lock decomposition.
jeff [Mon, 4 Jun 2007 23:50:30 +0000 (23:50 +0000)]
Commit 1/14 of sched_lock decomposition.
 - Move all scheduler locking into the schedulers utilizing a technique
   similar to solaris's container locking.
 - A per-process spinlock is now used to protect the queue of threads,
   thread count, suspension count, p_sflags, and other process
   related scheduling fields.
 - The new thread lock is actually a pointer to a spinlock for the
   container that the thread is currently owned by.  The container may
   be a turnstile, sleepqueue, or run queue.
 - thread_lock() is now used to protect access to thread related scheduling
   fields.  thread_unlock() unlocks the lock and thread_set_lock()
   implements the transition from one lock to another.
 - A new "blocked_lock" is used in cases where it is not safe to hold the
   actual thread's lock yet we must prevent access to the thread.
 - sched_throw() and sched_fork_exit() are introduced to allow the
   schedulers to fix-up locking at these points.
 - Add some minor infrastructure for optionally exporting scheduler
   statistics that were invaluable in solving performance problems with
   this patch.  Generally these statistics allow you to differentiate
   between different causes of context switches.

Tested by:      kris, current@
Tested on:      i386, amd64, ULE, 4BSD, libthr, libkse, PREEMPTION, etc.
Discussed with: kris, attilio, kmacy, jhb, julian, bde (small parts each)

17 years agoDo proper "locking" for missing vmmeters part.
attilio [Mon, 4 Jun 2007 21:45:18 +0000 (21:45 +0000)]
Do proper "locking" for missing vmmeters part.
Now, we assume no more sched_lock protection for some of them and use the
distribuited loads method for vmmeter (distribuited through CPUs).

Reviewed by: alc, bde
Approved by: jeff (mentor)

17 years agoRework the PCPU_* (MD) interface:
attilio [Mon, 4 Jun 2007 21:38:48 +0000 (21:38 +0000)]
Rework the PCPU_* (MD) interface:
- Rename PCPU_LAZY_INC into PCPU_INC
- Add the PCPU_ADD interface which just does an add on the pcpu member
  given a specific value.

Note that for most architectures PCPU_INC and PCPU_ADD are not safe.
This is a point that needs some discussions/work in the next days.

Reviewed by: alc, bde
Approved by: jeff (mentor)

17 years agoDespite several examples in the kernel, the third argument of
dwmalone [Mon, 4 Jun 2007 18:25:08 +0000 (18:25 +0000)]
Despite several examples in the kernel, the third argument of
sysctl_handle_int is not sizeof the int type you want to export.
The type must always be an int or an unsigned int.

Remove the instances where a sizeof(variable) is passed to stop
people accidently cut and pasting these examples.

In a few places this was sysctl_handle_int was being used on 64 bit
types, which would truncate the value to be exported.  In these
cases use sysctl_handle_quad to export them and change the format
to Q so that sysctl(1) can still print them.

17 years agoAdd a function for exporting 64 bit types.
dwmalone [Mon, 4 Jun 2007 18:14:28 +0000 (18:14 +0000)]
Add a function for exporting 64 bit types.

17 years agoUse common code for printing ints and longs by coppying the sysctl
dwmalone [Mon, 4 Jun 2007 18:02:23 +0000 (18:02 +0000)]
Use common code for printing ints and longs by coppying the sysctl
value into a variable of the right type and then printing it via
an intmax_t. This makes avoids some duplication and makes it easy
to add a new integer format Q for printing things of type CTLTYPE_QUAD.

17 years agoRevert to the previous version where the return value of uart_getenv()
marcel [Mon, 4 Jun 2007 17:53:42 +0000 (17:53 +0000)]
Revert to the previous version where the return value of uart_getenv()
is being ignored. It's optional and the lack of environment variable
is not an error condition.

17 years agoXref altq(4).
brueffer [Mon, 4 Jun 2007 16:59:11 +0000 (16:59 +0000)]
Xref altq(4).

17 years agoAdd in a couple of things:
ambrisko [Mon, 4 Jun 2007 16:39:22 +0000 (16:39 +0000)]
Add in a couple of things:
      - In the ioctl path let command get queued up and return
when complete _without_ blocking the driving waiting for
the response.  This way the driver doesn't "lock up" for
~30s during a flash command.  Submitted by scottl.
      - Add a guard so that if a DCMD of 0 is sent down the ioctl
path don't send it to the controller.  Return with a
status of OK.  This is a little strange since MegaCli
doesn't seem to like something and will issue some DCMD
of 0.  This doesn't happen under Linux.  So the emulation
needs to be improved but I'm not sure what.  Another strange
thing is that when a DCMD of 0 gets issued under i386 the
controller returns OK but in amd64 the context is messed
up.
      - Add a guard so the context has to be with-in the legal
limit so we get a reasonable error assertion versus random
panic.

It's going to be a challenge to figure out why MegaCli is not totally
happy and then sends some bogus commands.  This means that flashing
firmware via the Linux tool won't work since it generates a DCMD of
0 when it should be opening the firmware for a flash update.  Without
this problem flashing works fine.  This means there is no publicly
available tool to upgrade the RAID firmware under FreeBSD right now.

I plan to MFC all of the mfi changes to 6.X shortly.  This might not
include the SCSI pass-through changes.

Submitted by: scottl
Reviewed by: scottl
MFC after: 3 days

17 years agoNo need to update link queue stats when round-robin algorithm enabled.
mav [Mon, 4 Jun 2007 13:50:09 +0000 (13:50 +0000)]
No need to update link queue stats when round-robin algorithm enabled.

Approved by: glebius (mentor)

17 years agoBe robust to a bogus script specification or contents
yar [Mon, 4 Jun 2007 11:39:35 +0000 (11:39 +0000)]
Be robust to a bogus script specification or contents
when figuring out what the real interpreter is for an
interpreted command.  That is, check whether we can read
the script file in the first place and, if so, make sure
we got a valid shebang line from it.

17 years agoReimplement traverse() helper function:
pjd [Mon, 4 Jun 2007 11:31:46 +0000 (11:31 +0000)]
Reimplement traverse() helper function:
1. Pass locking flags to VFS_ROOT().
2. Check v_mountedhere while the vnode is locked.
3. Always return locked vnode on success.

Change 1 fixes problem reported by Stephen M. Rumble - after
zfs_vfsops.c,1.9 change, zfs_root() no longer locks the vnode
unconditionally and traverse() didn't pass right lock type to
VFS_ROOT(). The result was that kernel paniced when .zfs/ directory
was accessed via NFS.

17 years agoNow that tone & delay times are correct (independent of hz), adjust
brian [Mon, 4 Jun 2007 09:27:13 +0000 (09:27 +0000)]
Now that tone & delay times are correct (independent of hz), adjust
playtone() so that it uses times of 1/100ths of a second.

Now 'time echo T60ABC >/dev/speaker' takes ~3 seconds.

MFC after: 2 weeks
Problem noted by: dwmalone

17 years agoSpeaker durations are specified in 1/100ths of a second according to
brian [Mon, 4 Jun 2007 08:33:18 +0000 (08:33 +0000)]
Speaker durations are specified in 1/100ths of a second according to
spkr(4).

PR: 70610, 67995
Submitted by: dada at sbox dot tugraz dot at (modulo one fix)
MFC after: 2 weeks

17 years agoAdd the machine-specific definitions for configuring the new physical
alc [Mon, 4 Jun 2007 08:02:22 +0000 (08:02 +0000)]
Add the machine-specific definitions for configuring the new physical
memory allocator.

Approved by: re

17 years agoTrack an update in the MPI headers that was missed earlier.
scottl [Mon, 4 Jun 2007 06:18:07 +0000 (06:18 +0000)]
Track an update in the MPI headers that was missed earlier.

17 years agocleanup about the reassembly structures and routine:
jinmei [Mon, 4 Jun 2007 06:06:35 +0000 (06:06 +0000)]
cleanup about the reassembly structures and routine:
  - removed unused structure members
  - fixed a minor bug that the ECN code point may not be restored correctly

Approved by: ume (mentor)
MFC after: 1 week

17 years agogem(4) supports altq(4) now.
yongari [Mon, 4 Jun 2007 06:01:57 +0000 (06:01 +0000)]
gem(4) supports altq(4) now.

17 years agoo Implemented Rx/Tx checksum offload. The simple checksum logic in
yongari [Mon, 4 Jun 2007 06:01:04 +0000 (06:01 +0000)]
o Implemented Rx/Tx checksum offload. The simple checksum logic in
  GEMs is unable to discriminate UDP from TCP packets such that
  it can generate 0x0000 checksum value for the UDP datagram. So the
  UDP checksum offload was disabled by default. You can enable it
  by setting link0 flag with ifconfig(8).
o bus_dma(9) clean up. It now correctly set number of required DMA
  segments/size and removed incorrect use of BUS_DMA_ALLOCNOW flag
  in static allocations done via bus_dmamem_alloc(9).
o Implemented ALTQ(9) support.
o Implemented Tx side bus_dmamap_load_mbuf_sg(9) which can remove
  several book keeping chores orginated from call-back mechanism.
  Therefore gem_txdma_callback() was removed and its functionality
  was reimplemented in gem_load_txmbuf().
o Don't set GEM_TD_START_OF_PACKET flag until all remaining mbuf
  chains are set. I think it was a long standing bug and it caused
  fluctuating interrupts/CPU usage patterns while netperf test
  is in progress. Previously it seems that we race with the device.
  Because I don't have a documentation for GEM I'm not sure this is
  correct but almost all other documentations I have stated this
  implications on setting SOP mark in descriptor ring(e.g. hme(4)).
o Borrowed gem_defrag() from ath(4) which is supposed to be much
  faster than m_defrag(9) since it's not need to defrag all
  mbuf chains.
o gem_load_txmbuf() was changed to allow passed mbuf chains to free.
  Caller of gem_load_txmbuf() correctly handles freed mbuf chains.
o In gem_start_locked(), added checks for availability of Tx
  descriptors before trying to load DMA maps which could save CPU
  cycles when number of available descriptors are low. Also, simplyfy
  IFF_DRV_OACTIVE detection logic.
o Removed hard-coded function names in CTR macros and replaced it
  with __func__.
o Moved statistics counter register access to gem_tick() to reduce
  number of PCI bus accesses. There is no reason to update statistics
  counters in interrupt handler.
o Removed unnecessary call of gem_start_locked() in gem_ioctl().

Reviewed by: grehan (initial version), marius (with improvements and suggestions)
Tested by: grehan (ppc), marius(sparc64)

17 years agoMigrate from setting a CARD_OK flag in a shared word, to setting its
imp [Mon, 4 Jun 2007 05:59:44 +0000 (05:59 +0000)]
Migrate from setting a CARD_OK flag in a shared word, to setting its
own entry in the softc.  This should allow more of cbb_pci_intr() to
migrate to a new cbb_pci_filt() so that we don't have to run cbb's ISR
in almost every case we get an interrupt.  We can't just move
cbb_pci_intr into cbb_pci_filt because it does things that aren't safe
to do from a fast interrupt handler, err I mean from a filter.  This is
an important first step.

# I wonder if I need to make cardok volatile or not.

17 years agoFree the portinfo object on unload.
scottl [Mon, 4 Jun 2007 04:35:04 +0000 (04:35 +0000)]
Free the portinfo object on unload.

17 years agoDon't register cb_func_filt if the client driver doesn't have a filter.
imp [Mon, 4 Jun 2007 03:13:24 +0000 (03:13 +0000)]
Don't register cb_func_filt if the client driver doesn't have a filter.
ditto for the isr.

Reviewed/Suggested by: simokawa-san

17 years agoRemove files no longer required to build IPFilter
darrenr [Mon, 4 Jun 2007 03:07:34 +0000 (03:07 +0000)]
Remove files no longer required to build IPFilter

17 years agoMerge IPFilter 4.1.23 back to HEAD
darrenr [Mon, 4 Jun 2007 02:54:36 +0000 (02:54 +0000)]
Merge IPFilter 4.1.23 back to HEAD
See src/contrib/ipfilter/HISTORY for details of changes since 4.1.13

17 years agoThis commit was generated by cvs2svn to compensate for changes in r170263,
darrenr [Mon, 4 Jun 2007 02:50:28 +0000 (02:50 +0000)]
This commit was generated by cvs2svn to compensate for changes in r170263,
which included commits to RCS files with non-trunk default branches.

17 years agoImport IPFilter 4.1.23 to vendor branch.
darrenr [Mon, 4 Jun 2007 02:50:28 +0000 (02:50 +0000)]
Import IPFilter 4.1.23 to vendor branch.
See src/contrib/ipfilter/HISTORY for details of changes since 4.1.13

17 years agoImport IPFilter 4.1.23 to vendor branch.
darrenr [Mon, 4 Jun 2007 02:50:28 +0000 (02:50 +0000)]
Import IPFilter 4.1.23 to vendor branch.
See src/contrib/ipfilter/HISTORY for details of changes since 4.1.13

17 years agoAdd the machine-specific definitions for configuring the new physical
alc [Mon, 4 Jun 2007 02:32:07 +0000 (02:32 +0000)]
Add the machine-specific definitions for configuring the new physical
memory allocator.

Approved by: re

17 years agoUse correct comment syntax for $FreeBSD$. This file gets put through
grog [Mon, 4 Jun 2007 01:44:07 +0000 (01:44 +0000)]
Use correct comment syntax for $FreeBSD$.  This file gets put through
cpp, not a shell script.

Pointy hat to: grog

17 years agoRegen.
delphij [Mon, 4 Jun 2007 01:43:25 +0000 (01:43 +0000)]
Regen.

17 years agoResolve conflicts.
delphij [Mon, 4 Jun 2007 01:43:11 +0000 (01:43 +0000)]
Resolve conflicts.

17 years agoThis commit was generated by cvs2svn to compensate for changes in r170256,
delphij [Mon, 4 Jun 2007 01:42:54 +0000 (01:42 +0000)]
This commit was generated by cvs2svn to compensate for changes in r170256,
which included commits to RCS files with non-trunk default branches.

17 years ago/home/delphij/m
delphij [Mon, 4 Jun 2007 01:42:54 +0000 (01:42 +0000)]
/home/delphij/m

17 years agoNuke man page links that were orphaned by vendor branch import of
truckman [Sun, 3 Jun 2007 23:36:23 +0000 (23:36 +0000)]
Nuke man page links that were orphaned by vendor branch import of
TrustedBSD OpenBSM 1.0 alpha 6.

MFC after: 3 days

17 years agoAdd the machine-specific definitions for configuring the new physical
alc [Sun, 3 Jun 2007 23:33:11 +0000 (23:33 +0000)]
Add the machine-specific definitions for configuring the new physical
memory allocator.

Approved by: re

17 years agoAdd the machine-specific definitions for configuring the new physical
alc [Sun, 3 Jun 2007 23:18:29 +0000 (23:18 +0000)]
Add the machine-specific definitions for configuring the new physical
memory allocator.

Set the size of phys_avail[] and dump_avail[] using one of these
definitions.

Approved by: re

17 years agompt.c:
scottl [Sun, 3 Jun 2007 23:13:05 +0000 (23:13 +0000)]
mpt.c:
mpt.h:
Add support for reading extended configuration pages.
mpt_cam.c:
Do a top level topology scan on the SAS controller.  If any SATA
device are discovered in this scan, send a passthrough FIS to set
the write cache.  This is controllable through the following
tunable at boot:

hw.mpt.enable_sata_wc:
-1 = Do not configure, use the controller default
 0 = Disable the write cache
 1 = Enable the write cache

The default is -1.  This tunable is just a hack and may be
deprecated in the future.

Turning on the write cache alleviates the write performance problems with
SATA that many people have observed.  It is not recommend for those who
value data reliability!  I cannot stress this strongly enough.  However,
it is useful in certain circumstances, and it brings the performence in line
with what a generic SATA controller running under the FreeBSD ATA driver
provides (and the ATA driver has had the WC enabled by default for years).

17 years agoUpdate to MPI 1.5.16
scottl [Sun, 3 Jun 2007 22:58:27 +0000 (22:58 +0000)]
Update to MPI 1.5.16

17 years agoPrepare for the new physical memory allocator: Change the way that the
alc [Sun, 3 Jun 2007 19:39:38 +0000 (19:39 +0000)]
Prepare for the new physical memory allocator: Change the way that the
physical page's color is obtained.

Approved by: re

17 years agoRevert some debugging KTRs that were added during development.
kris [Sun, 3 Jun 2007 18:24:31 +0000 (18:24 +0000)]
Revert some debugging KTRs that were added during development.

17 years agoMerge BIND 9.4.1 into main chunk.
ume [Sun, 3 Jun 2007 18:13:59 +0000 (18:13 +0000)]
Merge BIND 9.4.1 into main chunk.

MFC after: 2 weeks

17 years agoMerge BIND 9.4.1 into main chunk.
ume [Sun, 3 Jun 2007 17:20:27 +0000 (17:20 +0000)]
Merge BIND 9.4.1 into main chunk.

MFC after: 2 weeks

17 years agoThis commit was generated by cvs2svn to compensate for changes in r170242,
ume [Sun, 3 Jun 2007 17:02:29 +0000 (17:02 +0000)]
This commit was generated by cvs2svn to compensate for changes in r170242,
which included commits to RCS files with non-trunk default branches.

17 years agoVendor import of BIND 9.4.1
ume [Sun, 3 Jun 2007 17:02:29 +0000 (17:02 +0000)]
Vendor import of BIND 9.4.1

17 years agoFix the amd64 and pc98 versions of ISC_ATOMIC_ARCH with some help
dougb [Sun, 3 Jun 2007 16:49:57 +0000 (16:49 +0000)]
Fix the amd64 and pc98 versions of ISC_ATOMIC_ARCH with some help
from ru@.

Take a guess at what might work on arm to try and fix the build.

17 years agoCorrect a typo.
bz [Sun, 3 Jun 2007 15:32:06 +0000 (15:32 +0000)]
Correct a typo.

PR: 106049
Submitted by: edwin (as part of a larger patch)

17 years agoInsert NULL pointer checking around devclass_get_maxunit(pcm_devclass, ..) .
ariff [Sun, 3 Jun 2007 10:56:22 +0000 (10:56 +0000)]
Insert NULL pointer checking around devclass_get_maxunit(pcm_devclass, ..) .
Things can get ugly without it due to uninitialized class. RELENG_6 need
a simmilar, but different treatment as well.

err.. perhaps we should teach devclass_get_maxunit() to return -1 ?

MFC after: 1 day

17 years agoMinor filter tweaks:
imp [Sun, 3 Jun 2007 05:42:05 +0000 (05:42 +0000)]
Minor filter tweaks:
o If we don't have a filter, also check to make sure the card is there before
  calling the scheduled ISR.  This is necessary to help old drivers whose
  ISRs can't cope with being called with the hardware missing, which sadly
  still exist in the tree.  This is the main reason why we have an extra
  layer of indirection for cardbus interrupts.
o If the card is no longer present, mark the interrupt as 'handled' rather
  than 'stray' because this accounts for why the interrupt happened.  Stray
  isn't all bad, since there are other filters that would claim it...
o Fix some comments
  + Add comment about why we check for CARD_OK and touch the hardware in both
    the filter and ISR.
  + add a note about why we don't care about Giant
  + also note that giant can't be taken out in a filter...
  + Some minor formatting nits on very long comments.

17 years agoAdd regression tests for calendar.
grog [Sun, 3 Jun 2007 03:29:32 +0000 (03:29 +0000)]
Add regression tests for calendar.

Submitted by: edwin@
PR: bin/113275
MFC after: 2 weeks

17 years agoFix various bugs in the -A and -B options.
grog [Sun, 3 Jun 2007 03:07:10 +0000 (03:07 +0000)]
Fix various bugs in the -A and -B options.

Submitted by: edwin@
PR: bin/113250
MFC after: 2 weeks

17 years agodisable taskqueue_drain calls on transition to INIT state; we need to
sam [Sun, 3 Jun 2007 02:16:48 +0000 (02:16 +0000)]
disable taskqueue_drain calls on transition to INIT state; we need to
find another way to do this as we cannot hold the softc mtx across
these calls

17 years agoDisable CPU idle states during suspend and reenable them during resume.
njl [Sun, 3 Jun 2007 00:40:56 +0000 (00:40 +0000)]
Disable CPU idle states during suspend and reenable them during resume.
While in the suspend path, this means the idle thread will just return
immediately rather than trying to enter C1-n.  This helps in the case where
the chipset is powered down before the rest of the system and reads from
the cpu sleep registers begin returning immediately, causing the logic that
catches bad C2/C3 behavior to kick in.  Observed on my Panasonic Y4.

MFC after: 3 days

17 years agoUpdate the upgrade notes for BIND 9.4.1
dougb [Sat, 2 Jun 2007 23:32:13 +0000 (23:32 +0000)]
Update the upgrade notes for BIND 9.4.1

17 years agoRemove from the vendor branch files that are no longer
dougb [Sat, 2 Jun 2007 23:29:48 +0000 (23:29 +0000)]
Remove from the vendor branch files that are no longer
present in BIND 9.4.1.

17 years agoThis commit was generated by cvs2svn to compensate for changes in r170225,
dougb [Sat, 2 Jun 2007 23:29:48 +0000 (23:29 +0000)]
This commit was generated by cvs2svn to compensate for changes in r170225,
which included commits to RCS files with non-trunk default branches.

17 years agoUpdate generated files for BIND 9.4.1
dougb [Sat, 2 Jun 2007 23:24:14 +0000 (23:24 +0000)]
Update generated files for BIND 9.4.1

17 years agoVendor import of BIND 9.4.1
dougb [Sat, 2 Jun 2007 23:21:47 +0000 (23:21 +0000)]
Vendor import of BIND 9.4.1

17 years agoThis commit was generated by cvs2svn to compensate for changes in r170222,
dougb [Sat, 2 Jun 2007 23:21:47 +0000 (23:21 +0000)]
This commit was generated by cvs2svn to compensate for changes in r170222,
which included commits to RCS files with non-trunk default branches.

17 years agoUpdate bmake glue for the BIND 9.4.1 import.
dougb [Sat, 2 Jun 2007 23:19:58 +0000 (23:19 +0000)]
Update bmake glue for the BIND 9.4.1 import.

This includes a return to building with threads, since one of the
major focuses of the 9.4.x branch is to improve thread performance.

17 years agoThe archive_write_prepare.3 man page was removed in November 2006.
truckman [Sat, 2 Jun 2007 23:13:50 +0000 (23:13 +0000)]
The archive_write_prepare.3 man page was removed in November 2006.

The wpa man pages were moved to section 8 in June 2005.

The clean_environment() function was removed from libutil in February
2004, so its man page is well overdue for removal.

MFC after: 3 days

17 years agoWhen /usr/sbin/xten went away back in 2003, /usr/libexec/xtend was
truckman [Sat, 2 Jun 2007 22:39:10 +0000 (22:39 +0000)]
When /usr/sbin/xten went away back in 2003, /usr/libexec/xtend was
overlooked.

MFC after: 3 days

17 years agoObsoleteFiles.inc 1.88 should have used s/=/+=/ on entry for
truckman [Sat, 2 Jun 2007 22:34:11 +0000 (22:34 +0000)]
ObsoleteFiles.inc 1.88 should have used s/=/+=/ on entry for
usr/share/man/man9/VFS_VPTOFH.9.gz.

17 years agoRemove definition of the GCC3 variable. It was introduced in rev.
marcel [Sat, 2 Jun 2007 21:30:39 +0000 (21:30 +0000)]
Remove definition of the GCC3 variable. It was introduced in rev.
1.50 to help out with the GCC 2 to GCC 3 transition and it became
obsolete when C flags compatible with GCC 3.x became the default.
With GCC 4 in the tree this variable (i.e. GCC3) is beyond bogus
because it causes confusion when looking for the newly introduced
WITH_GCC3 option that helps the GCC 3 -> GCC 4 bump.

17 years agoAdd support for Asus A3N laptops.
philip [Sat, 2 Jun 2007 21:10:01 +0000 (21:10 +0000)]
Add support for Asus A3N laptops.

Submitted by: Holger Jorra <holger_jorra -at- gmx.net>
MFC after: 1 day

17 years agoCorrect the referenced securelevel document, it's now securelevel 7.
remko [Sat, 2 Jun 2007 20:15:59 +0000 (20:15 +0000)]
Correct the referenced securelevel document, it's now securelevel 7.

Pointed out by: ru

17 years agoFix a bug introduced in the per-CPU Cx states commit. The wrong loop var
njl [Sat, 2 Jun 2007 20:01:40 +0000 (20:01 +0000)]
Fix a bug introduced in the per-CPU Cx states commit.  The wrong loop var
(j/i) was being used and it was being incremented, not decremented as before.
Factor out this code into a common function and call it from both the common
and per-CPU case.

MFC after: 1 day