]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
17 years agoThe maxsegsz of a dma tag created in de(4) is TULIP_DATA_PER_DESC bytes.
Pyun YongHyeon [Thu, 7 Jun 2007 00:28:47 +0000 (00:28 +0000)]
The maxsegsz of a dma tag created in de(4) is TULIP_DATA_PER_DESC bytes.
In Rx path it allocates a new mbuf with m_getcl(9) so the length of
the mbuf is MCLBYTES which is greater than a segment size specified by
the dma tag. This segment size mismatch caused a voluntary panic.
Fix the panic by settting the mbuf length to TULIP_DATA_PER_DESC.

Reported by: Arne H Juul <arnej AT yahoo-inc DOT com>
Tested by: Arne H Juul <arnej AT yahoo-inc DOT com>

17 years ago - PCPU_ADD is no longer spelled with LAZY_ in the middle.
Jeff Roberson [Wed, 6 Jun 2007 23:23:47 +0000 (23:23 +0000)]
 - PCPU_ADD is no longer spelled with LAZY_ in the middle.

Submitted by: attilio

17 years agoTeach the bridge wrapper how to handle the filter+ithread case.
Paolo Pisati [Wed, 6 Jun 2007 22:19:23 +0000 (22:19 +0000)]
Teach the bridge wrapper how to handle the filter+ithread case.

Reviewed by: marius

17 years ago-axe p_ih from struct puc_port cause it was useless
Paolo Pisati [Wed, 6 Jun 2007 22:17:01 +0000 (22:17 +0000)]
-axe p_ih from struct puc_port cause it was useless
-correctly check for filter only handler

Reviewed by: marcel
Tested by: marcel

17 years agoCorrectly print SEQ and IRS in the corresponding log message in
Andre Oppermann [Wed, 6 Jun 2007 22:10:12 +0000 (22:10 +0000)]
Correctly print SEQ and IRS in the corresponding log message in
syncache_expand().

17 years ago- Revert previous revision, it was incorrect
Pav Lucistnik [Wed, 6 Jun 2007 21:28:50 +0000 (21:28 +0000)]
- Revert previous revision, it was incorrect
- Add an example using fdisk instead

Pointed out by: ru
Submitted by: Warren Block <wblock@wonkity.com>
MFC after: 3 days

17 years agoSpecify which Dlink chip is supported (D-Link DUB-E100 ver A) because
Remko Lodder [Wed, 6 Jun 2007 19:27:10 +0000 (19:27 +0000)]
Specify which Dlink chip is supported (D-Link DUB-E100 ver A) because
others (D-Link DUB-E100 ver B1) are not.

PR: docs/109664
Submitted by: Martin Nilsson<martin at mullet dot se>
Patch by: asmodai
MFC after: 1 week

17 years agoDocument getaddrinfo(3)'s AI_ADDRCONFIG
Remko Lodder [Wed, 6 Jun 2007 19:24:02 +0000 (19:24 +0000)]
Document getaddrinfo(3)'s AI_ADDRCONFIG

PR: docs/78357
Submitted by: Matthias Andree <matthias dot andree at gmx dot de>
Patch by: asmodai
MFC after: 1 week

17 years agoFix a typo to make this file compile
Andrew Gallatin [Wed, 6 Jun 2007 18:33:38 +0000 (18:33 +0000)]
Fix a typo to make this file compile

17 years agoupdate copyrights to 2007 and convert to be 2-clause bsd-only
Sam Leffler [Wed, 6 Jun 2007 15:49:16 +0000 (15:49 +0000)]
update copyrights to 2007 and convert to be 2-clause bsd-only

17 years agoMFp4: MPSAFE firewire stack.
Hidetoshi Shimokawa [Wed, 6 Jun 2007 14:31:36 +0000 (14:31 +0000)]
MFp4: MPSAFE firewire stack.
- lock its own locks and drop Giant.
- create its own taskqueue thread.
- split interrupt routine
- use interrupt filter as a fast interrupt.
- run watchdog timer in taskqueue so that it should be
   serialized with the bottom half.
- add extra sanity check for transaction labels.
   disable ad-hoc workaround for unknown tlabels.
- add sleep/wakeup synchronization primitives
- don't reset OHCI in fwohci_stop()

17 years agoDo not leak lock in the case of EEXIST error.
Gleb Smirnoff [Wed, 6 Jun 2007 14:21:49 +0000 (14:21 +0000)]
Do not leak lock in the case of EEXIST error.

PR: kern/92776
Submitted by: Ed Schouten <Ed.Schouten tunix.nl>

17 years agoMFi386: revision 1.657
Yoshihiro Takahashi [Wed, 6 Jun 2007 13:04:15 +0000 (13:04 +0000)]
MFi386: revision 1.657

  Backout experimental adaptive-spin umtx code.

17 years ago- Sort the headers per style(9)
Rong-En Fan [Wed, 6 Jun 2007 11:14:30 +0000 (11:14 +0000)]
- Sort the headers per style(9)

Reminded by: yar
Approved by: delphij (mentor, implicit)

17 years agoCorrect typo.
Ceri Davies [Wed, 6 Jun 2007 11:12:56 +0000 (11:12 +0000)]
Correct typo.

17 years agoUpdate rum driver that needs wlan(4).
Kevin Lo [Wed, 6 Jun 2007 07:58:03 +0000 (07:58 +0000)]
Update rum driver that needs wlan(4).

17 years agoBackout experimental adaptive-spin umtx code.
David Xu [Wed, 6 Jun 2007 07:35:08 +0000 (07:35 +0000)]
Backout experimental adaptive-spin umtx code.

17 years agoAdd support IC Plus IP101 10/100 PHY that is found on nVidia network
Pyun YongHyeon [Wed, 6 Jun 2007 07:07:23 +0000 (07:07 +0000)]
Add support IC Plus IP101 10/100 PHY that is found on nVidia network
adapters.

Submitted by: Shigeaki Tagashira < shigeaki AT se DOT hiroshima-u DOT ac DOT jp >

17 years agoAdd IC Plus IP101 PHY
Pyun YongHyeon [Wed, 6 Jun 2007 07:05:02 +0000 (07:05 +0000)]
Add IC Plus IP101 PHY

17 years agoAdd support Vitesse VSC8601 PHY that is found on nVidia network
Pyun YongHyeon [Wed, 6 Jun 2007 06:55:49 +0000 (06:55 +0000)]
Add support Vitesse VSC8601 PHY that is found on nVidia network
adapters.

Submitted by: Shigeaki Tagashira < shigeaki AT se DOT hiroshima-u DOT ac DOT jp >
Tested by: Yuri Pankov < yuri.pankov AT gmail DOT com>,
Rainer Hurling <rhurlin AT gwdg DOT de >

17 years agoAdd OUI for Vitesse Semiconductor.
Pyun YongHyeon [Wed, 6 Jun 2007 06:53:40 +0000 (06:53 +0000)]
Add OUI for Vitesse Semiconductor.
Add Vitesse VSC8601 PHY.

17 years agoFix the compile. Band-aid until it is worked out how to use the context
Peter Grehan [Wed, 6 Jun 2007 06:01:56 +0000 (06:01 +0000)]
Fix the compile. Band-aid until it is worked out how to use the context
switch api on ppc.

17 years agoPrefix unknown (i.e. un-aliased) partition types with '!'. This is
Marcel Moolenaar [Wed, 6 Jun 2007 05:06:14 +0000 (05:06 +0000)]
Prefix unknown (i.e. un-aliased) partition types with '!'. This is
how they had to be given with ctlreq.

17 years agoCall sbuf_finish() before sbuf_data() and sbuf_len().
Marcel Moolenaar [Wed, 6 Jun 2007 05:01:41 +0000 (05:01 +0000)]
Call sbuf_finish() before sbuf_data() and sbuf_len().

17 years agocopyright updates:
Sam Leffler [Wed, 6 Jun 2007 04:56:04 +0000 (04:56 +0000)]
copyright updates:
o update to include 2007
o switch back to a 2-clause bsd-only license

Reviewed by: onoe

17 years agoInclude <sys/sched.h> for sched_throw().
Marcel Moolenaar [Wed, 6 Jun 2007 04:44:19 +0000 (04:44 +0000)]
Include <sys/sched.h> for sched_throw().

17 years ago - Placing the 'volatile' on the right side of the * in the td_lock
Jeff Roberson [Wed, 6 Jun 2007 03:40:47 +0000 (03:40 +0000)]
 - Placing the 'volatile' on the right side of the * in the td_lock
   declaration removes the need for __DEVOLATILE().

Pointed out by: tegge

17 years agoMention 'k' option of gunzip.
Xin LI [Wed, 6 Jun 2007 02:51:54 +0000 (02:51 +0000)]
Mention 'k' option of gunzip.

Pointed out by: ighighi gmail.com

17 years ago- Fix crash with ncurses on FreeBSD/amd64 CURRENT by including missing
Rong-En Fan [Wed, 6 Jun 2007 02:23:03 +0000 (02:23 +0000)]
- Fix crash with ncurses on FreeBSD/amd64 CURRENT by including missing
  header <term.h>, which is required by both tputs() and tgoto().

  Without this header, nvi crashes with the call to tputs() at line 114.
  This is because the first argument of tputs() is a pointer, and the
  returned pointer from tgoto() is casted to an integer by compiler.

  For some reasons, this only crashes on amd64+CURRENT. On 6.x system,
  this does not happen.

PR: 101248
Reported by: yar, infofarmer, Roland Smith
Tested by: infofarmer, delphij, rafan
Approved by: delphij (mentor)

17 years ago- Fixes a case where doing a sysctl would leave locks held
Randall Stewart [Wed, 6 Jun 2007 00:40:41 +0000 (00:40 +0000)]
- Fixes a case where doing a sysctl would leave locks held
  when coping out association data.
- Fixes a small bug that prevented the SCTP_UNORDERED indication
  from going up to the app on a recv in the sinfo_flags field.

17 years agoRemove the special atomic.h case for arm, and allow it to use
Doug Barton [Tue, 5 Jun 2007 22:17:16 +0000 (22:17 +0000)]
Remove the special atomic.h case for arm, and allow it to use
the platform specific file that imp provided.

17 years agoThis commit was generated by cvs2svn to compensate for changes in r170349,
Doug Barton [Tue, 5 Jun 2007 22:15:38 +0000 (22:15 +0000)]
This commit was generated by cvs2svn to compensate for changes in r170349,
which included commits to RCS files with non-trunk default branches.

17 years agoAdd a custom atomic.h file which implements the C versions of the
Doug Barton [Tue, 5 Jun 2007 22:15:38 +0000 (22:15 +0000)]
Add a custom atomic.h file which implements the C versions of the
code we already have assembly versions of.

Written by: imp

17 years agoAdd more IDs for the uftdi driver. Slight tweaks to patch by me.
Warner Losh [Tue, 5 Jun 2007 21:06:17 +0000 (21:06 +0000)]
Add more IDs for the uftdi driver.  Slight tweaks to patch by me.

Submitted by:  Thorsten Trampisch
PR: 113384

17 years agobump date for 1.20
Warner Losh [Tue, 5 Jun 2007 20:53:18 +0000 (20:53 +0000)]
bump date for 1.20

17 years agoAdd note about condvars not working with spin locks.
Warner Losh [Tue, 5 Jun 2007 20:45:10 +0000 (20:45 +0000)]
Add note about condvars not working with spin locks.

17 years ago- Do triple reads on reset register to detect read register bug. 2 reads
Ariff Abdullah [Tue, 5 Jun 2007 20:30:16 +0000 (20:30 +0000)]
- Do triple reads on reset register to detect read register bug. 2 reads
  seems not enough to verify its consistencies.
- Define AC97_MIXER_SIZE as SOUND_MIXER_NRDEVICES (25), since we
  don't need more than that. Stop doing wild and random guess about
  its size since we're stricly bound to it.

17 years agoFix (enable) phone out for laptops with ALC655, specifically
Ariff Abdullah [Tue, 5 Jun 2007 20:12:40 +0000 (20:12 +0000)]
Fix (enable) phone out for laptops with ALC655, specifically
for Amilo Pro V2055.

PR: kern/113101
Submitted by: konrad@egipt-medytacje.pl
MFC after: 3 days

17 years agoMove a warning under bootverbose as no machines that trigger it have ended
John Baldwin [Tue, 5 Jun 2007 18:57:48 +0000 (18:57 +0000)]
Move a warning under bootverbose as no machines that trigger it have ended
up being broken.

17 years agoFix a problem with not-preemptive kernels caming from mis-merging of
Attilio Rao [Tue, 5 Jun 2007 18:57:09 +0000 (18:57 +0000)]
Fix a problem with not-preemptive kernels caming from mis-merging of
existing code with the new thread_lock patch.
This also cleans up a bit unlock operation for mutexes.

Approved by: jhb, jeff(mentor)

17 years agoMFp4: When querying the operating condition of SD cards (using the
Warner Losh [Tue, 5 Jun 2007 17:04:44 +0000 (17:04 +0000)]
MFp4: When querying the operating condition of SD cards (using the
application specific SEND_OP_COND (CMD55 + ACMD41), go ahead and allow
100 tries.  This gives a timeout of a second rather than the ~100ms
the old style produces.

I've had one old 16MB SD card which needs the extra time.  I've now
had reports from the field that other cards need this too.

Originally done at BSDcan 2007 while waiting to give my embedding
madness minitalk.

17 years agoUpdate release notes: awk is updated to 1 May 2007 release.
Rong-En Fan [Tue, 5 Jun 2007 15:38:54 +0000 (15:38 +0000)]
Update release notes: awk is updated to 1 May 2007 release.

Approved by: delphij (mentor)

17 years ago- Update for 2007/05/01 import
Rong-En Fan [Tue, 5 Jun 2007 15:35:05 +0000 (15:35 +0000)]
- Update for 2007/05/01 import

Approved by: delphij (mentor)
Nodded by: ru
Tested by: make universe

17 years ago- Update for 2007/05/01 import.
Rong-En Fan [Tue, 5 Jun 2007 15:34:40 +0000 (15:34 +0000)]
- Update for 2007/05/01 import.

Approved by: delphij (mentor)
Nodded by: ru

17 years agoThis commit was generated by cvs2svn to compensate for changes in r170331,
Rong-En Fan [Tue, 5 Jun 2007 15:33:51 +0000 (15:33 +0000)]
This commit was generated by cvs2svn to compensate for changes in r170331,
which included commits to RCS files with non-trunk default branches.

17 years agoVendor import of bwk's 01-May-2007 release.
Rong-En Fan [Tue, 5 Jun 2007 15:33:51 +0000 (15:33 +0000)]
Vendor import of bwk's 01-May-2007 release.

Approved by: delphij (mentor)
Nodded by: ru
Tested by: make universe

17 years agoUse pmap_change_attr() to setup a write combine attribute for our
Andrew Gallatin [Tue, 5 Jun 2007 15:02:14 +0000 (15:02 +0000)]
Use pmap_change_attr() to setup a write combine attribute for our
device memory, rather than relying on the less reliable MTRR method
used by mem_range_attr_set().

Glanced at by: jhb

17 years agoUpdated release notes: less was updated to v403.
Xin LI [Tue, 5 Jun 2007 14:55:15 +0000 (14:55 +0000)]
Updated release notes: less was updated to v403.

17 years agoUpdated release notes: BIND 9.4.1, IPFilter 4.1.23.
Bruce A. Mah [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.
Konstantin Belousov [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.
Hidetoshi Shimokawa [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
Yoshihiro Takahashi [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
Poul-Henning Kamp [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.
Konstantin Belousov [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.
Poul-Henning Kamp [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.
Dag-Erling Smørgrav [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.
Xin LI [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
Alan Cox [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
Scott Long [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 Roberson [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 Roberson [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 Roberson [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 Roberson [Tue, 5 Jun 2007 01:31:04 +0000 (01:31 +0000)]
 - ULE is no longer buggy or experimental.

17 years agosched_core(4) removed.
Xin LI [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
David Christensen [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 Roberson [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 Roberson [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 Roberson [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 Roberson [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 Roberson [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 Roberson [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 Roberson [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 Roberson [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 Roberson [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 Roberson [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 Roberson [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 Roberson [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 Roberson [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 Roberson [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 Roberson [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 Roberson [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 Roberson [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 Roberson [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 Rao [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 Rao [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
David Malone [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.
David Malone [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
David Malone [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 Moolenaar [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).
Christian Brueffer [Mon, 4 Jun 2007 16:59:11 +0000 (16:59 +0000)]
Xref altq(4).

17 years agoAdd in a couple of things:
Doug 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.
Alexander Motin [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
Yaroslav Tykhiy [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:
Pawel Jakub Dawidek [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 Somers [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 Somers [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
Alan Cox [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.
Scott Long [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 Tatuya [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.
Pyun YongHyeon [Mon, 4 Jun 2007 06:01:57 +0000 (06:01 +0000)]
gem(4) supports altq(4) now.