dragonfly.git
13 years agoldns: Re-Add lost README files
Jan Lentfer [Thu, 30 Dec 2010 23:36:51 +0000 (00:36 +0100)]
ldns: Re-Add lost README files

13 years agoldns/drill: Update local files to 1.6.7
Jan Lentfer [Thu, 30 Dec 2010 22:04:30 +0000 (23:04 +0100)]
ldns/drill: Update local files to 1.6.7

13 years agoUpdate to ldns-1.6.7
Jan Lentfer [Thu, 30 Dec 2010 00:30:02 +0000 (01:30 +0100)]
Update to ldns-1.6.7

13 years agoHAMMER - Remove unused variable
Ilya Dryomov [Thu, 30 Dec 2010 11:41:08 +0000 (13:41 +0200)]
HAMMER - Remove unused variable

Although assigned (so GCC was silent), the 'blockmap' variable is
unused in hammer_blockmap_free(), hammer_blockmap_dedup() and
hammer_blockmap_finalize() functions.

13 years agoNuke forward_fastint_remote(), which has never been used.
Sepherosa Ziehau [Thu, 30 Dec 2010 08:46:43 +0000 (16:46 +0800)]
Nuke forward_fastint_remote(), which has never been used.

13 years agokernel - Fix lockmgr non-zero exclusive count panic (2)
Matthew Dillon [Wed, 29 Dec 2010 08:49:59 +0000 (00:49 -0800)]
kernel - Fix lockmgr non-zero exclusive count panic (2)

* Handle another possible case when upgrading a shared lock to an
  exclusive lock where the exclusive flag can wiggle its way in.

Reported-by: Peter Avalos <peter@theshell.com>,
     YONETANI Tomokazu <qhwt.dfly@les.ath.cx>

13 years agokernel - Fix lockmgr non-zero exclusive count panic
Matthew Dillon [Wed, 29 Dec 2010 08:32:27 +0000 (00:32 -0800)]
kernel - Fix lockmgr non-zero exclusive count panic

* The vm_map lock uses shared & exclusive locks and tries to upgrade
  shared to exclusive.  There is a race where a shared upgrade can
  steal an exclusive lock from an exclusive request which has already
  acquired the LK_WANT_EXCL flag.

* Deal with the case by having the exclusive lock also acquire
  LK_HAVE_EXCL to catch any shared upgrades which beat out the
  request.

Reported-by: YONETANI Tomokazu <qhwt.dfly@les.ath.cx>
Researched-by: YONETANI Tomokazu <qhwt.dfly@les.ath.cx>
13 years agoip_demux: Update comment for tcp_ctlport()
Sepherosa Ziehau [Wed, 29 Dec 2010 08:13:21 +0000 (16:13 +0800)]
ip_demux: Update comment for tcp_ctlport()

13 years agoip_demux: Update comment for ip_lengthcheck()
Sepherosa Ziehau [Wed, 29 Dec 2010 07:51:45 +0000 (15:51 +0800)]
ip_demux: Update comment for ip_lengthcheck()

13 years agomtodoff: Add comment
Sepherosa Ziehau [Wed, 29 Dec 2010 07:48:08 +0000 (15:48 +0800)]
mtodoff: Add comment

While i'm here, nuke staled comment

13 years agokernel: Remove support for the EISA bus and EISA/VLB devices.
Sascha Wildner [Tue, 28 Dec 2010 17:42:20 +0000 (18:42 +0100)]
kernel: Remove support for the EISA bus and EISA/VLB devices.

Discussed-with-and-approved-by: dillon, aggelos, and others.
13 years agoRemove redundant settings. These are the same in /etc/defaults/rc.conf.
Sascha Wildner [Tue, 28 Dec 2010 15:45:35 +0000 (16:45 +0100)]
Remove redundant settings. These are the same in /etc/defaults/rc.conf.

13 years agoinstaller: Add swap to /etc/crypttab only if it is actually encrypted.
Sascha Wildner [Tue, 28 Dec 2010 14:17:26 +0000 (15:17 +0100)]
installer: Add swap to /etc/crypttab only if it is actually encrypted.

This caused some nasty warnings and error msgs upon booting.

13 years agoipflow: cpumask_t should be used instead of uint32_t
Sepherosa Ziehau [Tue, 28 Dec 2010 02:49:50 +0000 (10:49 +0800)]
ipflow: cpumask_t should be used instead of uint32_t

13 years agore(4): Add support for 8168E
Sepherosa Ziehau [Tue, 28 Dec 2010 01:54:55 +0000 (09:54 +0800)]
re(4): Add support for 8168E

Submitted-by: Tim Bisson <bissont@mac.com>
13 years agoCreate MLINKS for the mbuf(9) manual page.
Sascha Wildner [Sun, 26 Dec 2010 15:57:33 +0000 (16:57 +0100)]
Create MLINKS for the mbuf(9) manual page.

Someone with more knowledge than me should review mbuf(9) and update it
to our current state of affairs.

Reported-by: pavalos
13 years agoMerge branch 'master' of /repository/git/dragonfly
Venkatesh Srinivas [Sun, 26 Dec 2010 01:02:11 +0000 (17:02 -0800)]
Merge branch 'master' of /repository/git/dragonfly

13 years agokernel -- Spinlock debugging.
Venkatesh Srinivas [Sun, 26 Dec 2010 00:57:07 +0000 (16:57 -0800)]
kernel -- Spinlock debugging.

* Track spinlocks held by a thread in a per-thread array; records the lock
  address and the EIP of the lock-taker.

* Panic in lockmgr() if we hold any spinlocks when trying to take a sleeping
  lockmgr lock.

13 years agompipe.9: Remove trailing whitespace.
Sascha Wildner [Sat, 25 Dec 2010 19:40:08 +0000 (20:40 +0100)]
mpipe.9: Remove trailing whitespace.

13 years agovkernel - Catch manpage up with loader/installkernel changes
Samuel J. Greear [Fri, 24 Dec 2010 03:33:54 +0000 (03:33 +0000)]
vkernel - Catch manpage up with loader/installkernel changes

Reported-by: Tony
13 years agoips.4: Sort SEE ALSO references.
Sascha Wildner [Thu, 23 Dec 2010 17:32:36 +0000 (18:32 +0100)]
ips.4: Sort SEE ALSO references.

13 years agoMiscellaneous manual page cleanup.
Sascha Wildner [Thu, 23 Dec 2010 15:02:03 +0000 (16:02 +0100)]
Miscellaneous manual page cleanup.

13 years agoFix typos in messages and manual pages.
Sascha Wildner [Thu, 23 Dec 2010 14:58:40 +0000 (15:58 +0100)]
Fix typos in messages and manual pages.

13 years agokernel -- MPIPE: Don't call a NULL constructor.
Venkatesh Srinivas [Thu, 23 Dec 2010 06:57:49 +0000 (22:57 -0800)]
kernel -- MPIPE: Don't call a NULL constructor.

13 years agokernel -- MPIPE: Add a constructor argument and priv ptr.
Venkatesh Srinivas [Thu, 23 Dec 2010 04:57:59 +0000 (20:57 -0800)]
kernel -- MPIPE: Add a constructor argument and priv ptr.

13 years agokernel - Fix boot-time lockup with if_igb
Matthew Dillon [Thu, 23 Dec 2010 03:35:25 +0000 (19:35 -0800)]
kernel - Fix boot-time lockup with if_igb

* In DragonFly on return from a call to if_start if
  (IFF_RUNNING|IFF_OACTIVE) == IFF_RUNNING the if_start code for the
  device is expected to have drained the queue and will be re-called
  if it has not.

  Add a required ifq_purge() in igb_start_locked() in case where the
  adapter's link is not yet active.

* NOTE: In FreeBSD this is not the case, but correctly coding the
  driver would probably still be beneficial.

13 years agoudevd - Exit from the SIGTERM handler
Alex Hornung [Wed, 22 Dec 2010 08:58:13 +0000 (08:58 +0000)]
udevd - Exit from the SIGTERM handler

Reported-by: Tim Darby
13 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Samuel J. Greear [Wed, 22 Dec 2010 05:31:24 +0000 (05:31 +0000)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

13 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Samuel J. Greear [Wed, 22 Dec 2010 05:30:06 +0000 (05:30 +0000)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

13 years agovm_map_findspace.9: Turn an Xr to a manpage we don't have (yet) into an Fn.
Sascha Wildner [Wed, 22 Dec 2010 05:27:31 +0000 (06:27 +0100)]
vm_map_findspace.9: Turn an Xr to a manpage we don't have (yet) into an Fn.

13 years agokernel - Add many sysctl definitions, sysv, vfs, nfs, etc.
Samuel J. Greear [Wed, 22 Dec 2010 05:24:21 +0000 (05:24 +0000)]
kernel - Add many sysctl definitions, sysv, vfs, nfs, etc.

* Also take the opportunity to remove some dead (no longer referenced
  sysctl's), these are:
  vfs.cache.dothits
  vfs.cache.dotdothits
  vfs.cache.nummiss
  vfs.cache.nummisszap
  vfs.cache.numposzaps
  vfs.cache.numposhits
  vfs.cache.numnegzaps
  vfs.cache.numneghits
  vfs.reassignbufloops
  vfs.reassignbufsortgood
  vfs.reassignbufsortbad
  vfs.reassignbufmethod
  vfs.nfs.defect
  vfs.cache.numfullpathfail4
  vfs.cache.numfullpathfail3
  vfs.cache.numfullpathfail2
  vfs.cache.numfullpathfail1
  vfs.cache.numcwdfail4
  vfs.cache.numcwdfail3
  vfs.cache.numcwdfail2
  vfs.cache.numcwdfail1

* Add back a couple of vfs.cache sysctl's with improved names
  vfs.cache.numcwdfailnf
  vfs.cache.numcwdfailsz
  vfs.cache.numfullpathfailnf
  vfs.cache.numfullpathfailsz

Submitted-by: Taras Klaskovsky
Sponsored-by: Google Code-In
13 years agoHook the vm_page_alloc.9 manual page into the build.
Sascha Wildner [Wed, 22 Dec 2010 05:21:47 +0000 (06:21 +0100)]
Hook the vm_page_alloc.9 manual page into the build.

13 years agoImport vm_page_alloc manpage from FreeBSD and add DFly-specifics.
Venkatesh Srinivas [Wed, 22 Dec 2010 02:53:49 +0000 (18:53 -0800)]
Import vm_page_alloc manpage from FreeBSD and add DFly-specifics.

13 years agoConvert netstat/inet6.c to use a standard NELEM. (buildworld fixes).
Venkatesh Srinivas [Tue, 21 Dec 2010 22:38:43 +0000 (14:38 -0800)]
Convert netstat/inet6.c to use a standard NELEM. (buildworld fixes).

Reported-by: pavalos@
13 years agoRestore __arysize to stdint.h. Userland was including and using __arysize.
Venkatesh Srinivas [Tue, 21 Dec 2010 22:02:14 +0000 (14:02 -0800)]
Restore __arysize to stdint.h. Userland was including and using __arysize.

Reported-by: Santabolt on #dragonflybsd
13 years agokernel -- Convert sfbuf to use kref.
Venkatesh Srinivas [Tue, 21 Dec 2010 21:45:27 +0000 (13:45 -0800)]
kernel -- Convert sfbuf to use kref.

kref_dec was also modified to return an int, whether it saw a 1 -> 0
transition (0) or not (1).

13 years agoCode clean -- nuke private defines of __arysize and arysize, replace with NELEM.
Venkatesh Srinivas [Tue, 21 Dec 2010 20:25:54 +0000 (12:25 -0800)]
Code clean -- nuke private defines of __arysize and arysize, replace with NELEM.

13 years agokernel -- Implement kref, a very lightweight reference counting system.
Venkatesh Srinivas [Tue, 21 Dec 2010 20:08:55 +0000 (12:08 -0800)]
kernel -- Implement kref, a very lightweight reference counting system.

13 years agoroute(8)/routed(8): Raise WARNS to 6.
Sascha Wildner [Tue, 21 Dec 2010 19:22:25 +0000 (20:22 +0100)]
route(8)/routed(8): Raise WARNS to 6.

13 years agoUpdate MPIPE manual page to describe MPF_CACHEDATA & remove old lock comment.
Venkatesh Srinivas [Tue, 21 Dec 2010 17:23:48 +0000 (09:23 -0800)]
Update MPIPE manual page to describe MPF_CACHEDATA & remove old lock comment.

13 years agokgdb(1): Adjust comments, too.
Sascha Wildner [Tue, 21 Dec 2010 16:57:55 +0000 (17:57 +0100)]
kgdb(1): Adjust comments, too.

13 years agokgdb(1): Fix finding the right kernel for symbols when using -n.
Sascha Wildner [Tue, 21 Dec 2010 16:36:34 +0000 (17:36 +0100)]
kgdb(1): Fix finding the right kernel for symbols when using -n.

Due to a change of kernel names in /var/crash (kernel.xx -> kern.xx)
kgdb(1) wasn't finding the kernel anymore and resorted to the one in
/usr/obj.

13 years agolast(1): Raise WARNS to 6.
Sascha Wildner [Tue, 21 Dec 2010 12:43:49 +0000 (13:43 +0100)]
last(1): Raise WARNS to 6.

13 years agotcp: Don't allow persist timer if TCP connection is not established yet
Sepherosa Ziehau [Tue, 21 Dec 2010 08:26:34 +0000 (16:26 +0800)]
tcp: Don't allow persist timer if TCP connection is not established yet

This probably could move the un-updated snd_nxt panic earlier.

The dump of the panic in http://bugs.dragonflybsd.org/issue1939 shows
- snd_nxt is less than snd_una
- A persist timer was fired (frame 16, tp->tt_msg->tt_prev_tasks).
- The TCP segment triggered the panic has SYN|ACK (frame 17, th->th_flags).
  This TCP segment is considered as valid (frame 17, list), so tp->t_state
  was SYN_SENT.

This explains why snd_nxt is less than snd_una:
If tcp_output() is called by persist timer, then the persist timer is
active and the "forced" is turned on, this causes the snd_nxt not updated
at all.

MISSING CHIAN IN THE LINK:
How is the persist timer got set in the SYN_SENT in the first place?

Hope the new panic could lift the veil...

13 years agoBring in mps(4) for LSI Fusion-MPT 2 Serial Attached SCSI controllers.
Sascha Wildner [Tue, 21 Dec 2010 04:46:53 +0000 (05:46 +0100)]
Bring in mps(4) for LSI Fusion-MPT 2 Serial Attached SCSI controllers.

The driver should support the following controllers:

* LSI Logic SAS2004 (4 Port SAS)
* LSI Logic SAS2008 (8 Port SAS)
* LSI Logic SAS2108 (8 Port SAS)
* LSI Logic SAS2116 (16 Port SAS)
* LSI Logic SAS2208 (8 Port SAS)

Due to it still being in in development (Integrated RAID isn't supported,
for example), it's only hooked into the module build and added to LINT.

The port hasn't received any testing at all other than make it build. But
it is known that Matt has such a controller. :-)

Thanks to FreeBSD from which this driver is taken.

13 years agoFix buildworld for latest liblzma/libarchive changes.
Peter Avalos [Tue, 21 Dec 2010 00:32:55 +0000 (14:32 -1000)]
Fix buildworld for latest liblzma/libarchive changes.

13 years agolibarchive: link in liblzma.
Peter Avalos [Mon, 20 Dec 2010 20:23:19 +0000 (10:23 -1000)]
libarchive:  link in liblzma.

Reported-by: dillon@

13 years agoFix VKERNEL/VKERNEL64 build.
Sascha Wildner [Mon, 20 Dec 2010 12:30:29 +0000 (13:30 +0100)]
Fix VKERNEL/VKERNEL64 build.

13 years agoutmpx - Bring in ${foo}x.3 manpages from NetBSD
Alex Hornung [Mon, 20 Dec 2010 07:11:48 +0000 (07:11 +0000)]
utmpx - Bring in ${foo}x.3 manpages from NetBSD

13 years agokernel - vm_page BUSY handling, change vm_page_cache() API, maybe fix seg-fault
Matthew Dillon [Mon, 20 Dec 2010 05:52:36 +0000 (21:52 -0800)]
kernel - vm_page BUSY handling, change vm_page_cache() API, maybe fix seg-fault

* All vm_page_deactivate() calls now operate with the caller holding
  the page PG_BUSY or the page known not to be busy.  Reorder several
  cases where a vm_page is unbusied prior to calling deactivate.

* vm_page_cache() now expected the vm_page to be PG_BUSY and will cache
  the page and clear the bit.

* Fix a race in vm_pageout_page_free() which calls vm_object_reference()
  with an unbusied vm_page, then proceeds to busy and free the page.
  The problem is that vm_object_reference() can block on vmobj_token.

  This may fix the x86-64 seg-fault issue.  Or it may not (throws up hands).

* Remove incorrect KKASSERT which was causing bogus panics.

13 years agokernel - Implement POLLING support for if_igb, change token->lockmgr lock
Matthew Dillon [Mon, 20 Dec 2010 01:24:29 +0000 (17:24 -0800)]
kernel - Implement POLLING support for if_igb, change token->lockmgr lock

* Clean up the polling code so it works.

* Use a lockmgr lock instead of a token, the original driver writer
  expected a normal lock.

13 years agokernel - Optimize idle thread halt
Matthew Dillon [Sun, 19 Dec 2010 19:17:36 +0000 (11:17 -0800)]
kernel - Optimize idle thread halt

* Count the number of times the idle thread is entered on a cpu without
  switching to a non-idle thread.  Use the fast-halt (non-ACPI) until the
  count exceeds a reasonable machdep.cpu_idle_repeat.

  This improves the default performance to levels closer to cpu_idle_hlt
  mode 1 but still gives us the power savings from mode 3.  Performanced is
  improved significantly because many threads on SMP boxes are event
  or pipe oriented and only sleep for short periods of time or ping-pong
  back and forth.  For example, a cc -pipe, or typical kernel threads
  blocking on tokens or locks for short periods of time.

* Adjust machdep.cpu_idle_hlt modes:

    0 Never halt, the idle thread just spins.

    1 Always use a fast HLT/MONITOR/MWAIT

    2 Hybrid approach use (1) up to a certain point, then use (3).
(this is the default)

    3 Always use the ACPI halt

13 years agokernel - Add MONITOR/MWAIT support to the LWKT scheduler
Matthew Dillon [Sun, 19 Dec 2010 17:25:17 +0000 (09:25 -0800)]
kernel - Add MONITOR/MWAIT support to the LWKT scheduler

* Adjust the FIFO contention resequencer (which deals with spinning
  on tokens) to use MONITOR/MWAIT when available instead of DELAY(1)
  when waiting to become the head of the queue.

* Adjust the x86-64 idle loop to use MONITOR/MWAIT when available when
  the idle halt mode (machdep.cpu_idle_hlt) is set to 1.  This
  significantly improves performance for event-oriented programs, including
  compile pipelines.

  NOTE: On the 48-core monster setting machdep.cpu_idle_hlt to 1 improves
  performance but at the cost of an additional 200W of power at idle vs
  the default value of 2 (ACPI idle halt).  Look for a hybrid approach in
  a future commit.

13 years agoMerge branch 'master' of git://git.dragonflybsd.org/dragonfly
Charlie [Sun, 19 Dec 2010 16:44:17 +0000 (11:44 -0500)]
Merge branch 'master' of git://git.dragonflybsd.org/dragonfly

13 years agoInterbench -- Do not compare strings with ==.
Venkatesh Srinivas [Sun, 19 Dec 2010 16:39:46 +0000 (11:39 -0500)]
Interbench -- Do not compare strings with ==.

13 years agoUpdate to libarchive-2.8.4.
Peter Avalos [Sun, 19 Dec 2010 11:46:45 +0000 (01:46 -1000)]
Update to libarchive-2.8.4.

This includes support for lzma and no longer relies on OpenSSL for hash
functions.

13 years agoMerge branch 'vendor/LIBARCHIVE' into HEAD
Peter Avalos [Sun, 19 Dec 2010 12:50:48 +0000 (02:50 -1000)]
Merge branch 'vendor/LIBARCHIVE' into HEAD

13 years agoAdd SHA384 functions to libmd.
Peter Avalos [Sun, 19 Dec 2010 10:32:24 +0000 (00:32 -1000)]
Add SHA384 functions to libmd.

13 years agojme: Rework software reset procedure
Sepherosa Ziehau [Sun, 19 Dec 2010 12:07:13 +0000 (20:07 +0800)]
jme: Rework software reset procedure

There is a wired TX/RX clock synchronization issues during software reset.
To address these issues we have to disable and enable TX/RX clocks several
times according to JMicron's document.

These clock synchronization issues seem to affect JMC250C/JMC260C chips,
however, it is claimed that these issues affact all JMC250/JMC260 chips.

Thank JMicron for providing JMC250C samples and detailed document.

13 years agoHook up liblzma, lzmainfo, xz, and xzdec to the build.
Peter Avalos [Sun, 19 Dec 2010 06:26:34 +0000 (20:26 -1000)]
Hook up liblzma, lzmainfo, xz, and xzdec to the build.

13 years agoMerge branch 'vendor/XZ' into HEAD
Peter Avalos [Sun, 19 Dec 2010 07:58:21 +0000 (21:58 -1000)]
Merge branch 'vendor/XZ' into HEAD

13 years agoRearrange lib/Makefile.
Peter Avalos [Sun, 19 Dec 2010 01:16:19 +0000 (15:16 -1000)]
Rearrange lib/Makefile.

Use one line per subdir.  This greatly improves readability.

Remove libraries we don't have any more from the comments.

13 years agoImport xz-5.0.0.
Peter Avalos [Sun, 19 Dec 2010 00:24:26 +0000 (14:24 -1000)]
Import xz-5.0.0.

This is from the XZ Utils project: http://tukaani.org/xz/

13 years agoRename cpu_mmw_pause(l) to cpu_mmw_pause_(int/long)
Venkatesh Srinivas [Sat, 18 Dec 2010 23:28:08 +0000 (15:28 -0800)]
Rename cpu_mmw_pause(l) to cpu_mmw_pause_(int/long)

13 years agoUse xorq, not xorl, for RAX on x64.
Venkatesh Srinivas [Sat, 18 Dec 2010 23:20:32 +0000 (15:20 -0800)]
Use xorq, not xorl, for RAX on x64.

13 years agokernel -- Replace cpu_mmw_mwait with _pause, which doesn't loop. Correct bugs.
Venkatesh Srinivas [Sat, 18 Dec 2010 23:18:52 +0000 (15:18 -0800)]
kernel -- Replace cpu_mmw_mwait with _pause, which doesn't loop. Correct bugs.

13 years agokernel -- Monitor/Mwait routine for x64; (untested!)
Venkatesh Srinivas [Sat, 18 Dec 2010 21:44:05 +0000 (13:44 -0800)]
kernel -- Monitor/Mwait routine for x64; (untested!)

13 years agokernel -- Correct bug in i386 monitor / mwait routine and change to long type.
Venkatesh Srinivas [Sat, 18 Dec 2010 21:43:13 +0000 (13:43 -0800)]
kernel -- Correct bug in i386 monitor / mwait routine and change to long type.

13 years agokernel -- Add MONITOR and MWAIT routine to i386 kernel.
Venkatesh Srinivas [Sat, 18 Dec 2010 15:24:58 +0000 (07:24 -0800)]
kernel -- Add MONITOR and MWAIT routine to i386 kernel.

Provides cpu_mmw_spin() and cpu_mmw_mwait(), both of which wait for a given
memory cell to contain a value different from an expected value. _spin()
merely spins on the cell; _mwait() uses the SSE3 MONITOR/MWAIT isns.

13 years agokernel - scheduler adjustments for large ncpus / 48-core monster
Matthew Dillon [Sat, 18 Dec 2010 08:42:52 +0000 (00:42 -0800)]
kernel - scheduler adjustments for large ncpus / 48-core monster

* Change the LWKT scheduler's token spinning algorithm.  It used to
  DELAY a short period of time and then simply retry, creating a lot
  of contention between cpus trying to acquire a token.

  Now the LWKT scheduler uses a FIFO index mechanic to resequence the
  contending cpus into 1uS retry slots using essentially just
  atomic_fetchadd_int(), so it is very cache friendly.  The spin-retry
  thus has a bounded cache management traffic load regardless of
  the number of cpus and contending cpus will not be tripping over
  each other.

  The new algorithm slightly regresses 4-cpu operation (~5% under heavy
  contention) but significantly improves 48-cpu operation.  It is also
  flexible enough for further work down the road.  The old algorithm
  simply did not scale very well.

  Add three sysctls:

  sysctl lwkt.spin_method=1

0    Allow a user thread to be scheduled on a cpu while kernel
     threads are contended on a token, using the IPI mechanic
     to interrupt the user thread and reschedule on decontention.

     This can potentially result in excessive IPI traffic.

1    Allow a user thread to be scheduled on a cpu while kernel
     threads are contended on a token, reschedule on the next clock
     tick (100 Hz typically).  Decontention will NOT generate
     any IPI traffic.  DEFAULT.

2    Do not allow a user thread to be scheduled on a cpu while
     kernel threads are contended.  Should not be used normally,
     for debugging only.

  sysctl lwkt.spin_delay=1

Slot time in microseconds, default 1uS.  Recommended values are
1 or 2 but not longer.

  sysctl lwkt.spin_loops=10

Number of times the LWKT scheduler loops on contended threads
before giving up and allowing an idle-thread HLT.  In order to
wake up from the HLT decontention will cause an IPI so you do
not want to set this value too small and.  Values between
10 and 100 are recommended.

* Redo the token decontention algorithm.  Use a new gd_reqflags flag,
  RQF_WAKEUP, coupled with RQF_AST_LWKT_RESCHED in the per-cpu globaldata
  structure to determine what cpus actually need to be IPId on token
  decontention (to wakeup their idle threads stuck in HLT).

  This requires that all gd_reqflags operations use locked atomic
  instructions rather than non-locked instructions.

* Decontention IPIs are a last-gasp effort if the LWKT scheduler has spun
  too many times.  Under normal conditions, even under heavy contention,
  actual IPIing should be minimal.

13 years agoutilities - Print the cpu id for running and runnable threads
Matthew Dillon [Sat, 18 Dec 2010 08:35:13 +0000 (00:35 -0800)]
utilities - Print the cpu id for running and runnable threads

* The cpuid was only being printed for the currently running thread on
  a cpu.  Also print it for any scheduled (runnable) threads on that cpu
  even if they aren't the currently running thread.

13 years agokernel - Fix M_NOWAIT's in e1000/if_igb driver
Matthew Dillon [Sat, 18 Dec 2010 08:34:27 +0000 (00:34 -0800)]
kernel - Fix M_NOWAIT's in e1000/if_igb driver

* M_NOWAITs should be M_INTWAITs.  Fixes numerous boot-time problems
  with the driver.

13 years agokernel -- Remove fo_poll.
Venkatesh Srinivas [Sat, 18 Dec 2010 01:08:22 +0000 (17:08 -0800)]
kernel -- Remove fo_poll.

13 years agoMerge branch 'master' of /repository/git/dragonfly
Venkatesh Srinivas [Fri, 17 Dec 2010 18:06:45 +0000 (10:06 -0800)]
Merge branch 'master' of /repository/git/dragonfly

13 years agokernel -- vnlru: Resolve minor race between vnlru_proc_wait and vnlru_proc.
Venkatesh Srinivas [Fri, 17 Dec 2010 17:46:46 +0000 (09:46 -0800)]
kernel -- vnlru: Resolve minor race between vnlru_proc_wait and vnlru_proc.

vnlru_proc_wait should have been using tsleep_interlock, not tsleep, to avoid
missed wakeups from the vnlru process.

13 years agomanpages: Remove some unneeded .Pp's.
Sascha Wildner [Fri, 17 Dec 2010 14:45:34 +0000 (15:45 +0100)]
manpages: Remove some unneeded .Pp's.

13 years agofortune - change dig to drill
Max Herrgård [Wed, 15 Dec 2010 20:28:09 +0000 (21:28 +0100)]
fortune - change dig to drill

13 years agolast - add forgotten files
Alex Hornung [Thu, 16 Dec 2010 17:35:43 +0000 (17:35 +0000)]
last - add forgotten files

13 years agoFix build of last(1).
Sascha Wildner [Thu, 16 Dec 2010 16:42:53 +0000 (17:42 +0100)]
Fix build of last(1).

13 years agossh - use utmpx
Alex Hornung [Sun, 5 Dec 2010 09:57:02 +0000 (09:57 +0000)]
ssh - use utmpx

13 years agoutmpx - Bring in utmpx,wtmpx and lastlogx support
Alex Hornung [Sun, 4 Oct 2009 17:44:56 +0000 (18:44 +0100)]
utmpx - Bring in utmpx,wtmpx and lastlogx support

* This commit introduces the necessary support for utmpx, wtmpx and
  lastlogx, as well as updating many base utils to work with these
  while mostly maintaining compatibility with the old utmp, wtmp and
  lastlog.

* The new last(1) supports wtmpx but defaults to wtmp as not all wtmp
  writers have been updated for wtmpx.

* All utmp readers support both utmp and utmpx now.

* lastlogin (the only lastlog reader) supports both lastlog and
  lastlogx.

* The utils who(1) and finger have been almost directly replaced by
  their NetBSD equivalent. In case of who(1) the only custom
  modification is the behaviour of '-b' to be as it has always been.

* Partially-Obtained-from: NetBSD

13 years agotzfile.h - install as include
Alex Hornung [Wed, 15 Dec 2010 19:05:47 +0000 (19:05 +0000)]
tzfile.h - install as include

13 years agotest
Sepherosa Ziehau [Thu, 16 Dec 2010 08:21:51 +0000 (16:21 +0800)]
test

13 years agotwe(4): Add some missing newlines in system messages.
Sascha Wildner [Thu, 16 Dec 2010 07:11:08 +0000 (08:11 +0100)]
twe(4): Add some missing newlines in system messages.

13 years agokernel - IPI subset of cpus on token de-collision.
Matthew Dillon [Wed, 15 Dec 2010 20:46:44 +0000 (12:46 -0800)]
kernel - IPI subset of cpus on token de-collision.

* Implement sysctl lwkt.token_ipi_dispatch and set the default value
  to 4, meaning when a token is released up to 4 conflicting cpus
  will be IPId to wake them up.

* Saves 20-40W under load on the 48-core monster (out of ~450W
  or so).

13 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Wed, 15 Dec 2010 20:32:54 +0000 (12:32 -0800)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

13 years agokern_proc - add kern.proc.cwd sysctl
Alex Hornung [Wed, 15 Dec 2010 11:38:25 +0000 (11:38 +0000)]
kern_proc - add kern.proc.cwd sysctl

* Add a kern.proc.cwd sysctl to be able to get the cwd of processes.
  Many terminal emulators need something this to set a window title.
  Right now, some simply don't work (konsole) and others (Terminal) use
  linprocfs.

13 years agokinfo.h - Document the units of some members
Alex Hornung [Wed, 15 Dec 2010 11:38:07 +0000 (11:38 +0000)]
kinfo.h - Document the units of some members

13 years agolibcrypt - install crypt.h header
Alex Hornung [Wed, 15 Dec 2010 11:37:21 +0000 (11:37 +0000)]
libcrypt - install crypt.h header

* Install the crypt.h header since some software (i.e. KDE) checks for
  crypt.h to decide whether it needs to link against libcrypt to be able
  to use crypt().

13 years agoif_clone: Don't destroy iface which is not create through if_clone mechanism
Sepherosa Ziehau [Tue, 14 Dec 2010 14:06:32 +0000 (22:06 +0800)]
if_clone: Don't destroy iface which is not create through if_clone mechanism

DragonFly-bug: http://bugs.dragonflybsd.org/issue1919

13 years agoSerialize IFADDR alteration by netisr0
Sepherosa Ziehau [Tue, 14 Dec 2010 13:13:21 +0000 (21:13 +0800)]
Serialize IFADDR alteration by netisr0

13 years agoImport libarchive-2.8.4.
Peter Avalos [Wed, 15 Dec 2010 08:07:20 +0000 (22:07 -1000)]
Import libarchive-2.8.4.

13 years agoRe-add README.DELETED to libarchive's vendor branch.
Peter Avalos [Wed, 15 Dec 2010 07:14:13 +0000 (21:14 -1000)]
Re-add README.DELETED to libarchive's vendor branch.

This was accidentally removed during the last import.

13 years agolibfsid(3): Make the filesystem type an enum and perform misc cleanup.
Sascha Wildner [Wed, 15 Dec 2010 07:03:16 +0000 (08:03 +0100)]
libfsid(3): Make the filesystem type an enum and perform misc cleanup.

13 years agomdoc: Add libfsid to the list of libraries.
Sascha Wildner [Wed, 15 Dec 2010 07:02:11 +0000 (08:02 +0100)]
mdoc: Add libfsid to the list of libraries.

13 years agomsdosfs: Add a define of 0x28 as extended boot record signature.
Sascha Wildner [Wed, 15 Dec 2010 07:01:03 +0000 (08:01 +0100)]
msdosfs: Add a define of 0x28 as extended boot record signature.

As per http://support.microsoft.com/kb/140418 (Detailed Explanation
of FAT Boot Sector), the "...extended boot record signature must be
either 0x28 or 0x29...".

13 years agoBump WARNS for latest import of ftp and adjust README.DRAGONFLY for git.
Peter Avalos [Wed, 15 Dec 2010 05:57:24 +0000 (19:57 -1000)]
Bump WARNS for latest import of ftp and adjust README.DRAGONFLY for git.

13 years agoMerge branch 'vendor/TNFTP'
Peter Avalos [Wed, 15 Dec 2010 05:54:39 +0000 (19:54 -1000)]
Merge branch 'vendor/TNFTP'

13 years agoSnyc tnftp with NetBSD:
Peter Avalos [Wed, 15 Dec 2010 05:40:35 +0000 (19:40 -1000)]
Snyc tnftp with NetBSD:

Fix numerous WARNS issues.

Rename internal getline() function to get_line() to prevent conflicts.

Rename argument from "bool" to "val".

Parse HTTP 'Date' entries in the `C' locale rather than the user's.

Avoid NULL dereference in log output if the command line parser
failed to extract a port number from the URL.

Use AF_INET instead of AF_UNSPEC as the default family if
!defined(INET6).

In ftpvis(), prevent incomplete escape sequences at end of dst,
and ensure NUL-termination of dst.  Also tweak for readibility.

13 years agoUpdate to zlib-1.2.5.
Peter Avalos [Tue, 14 Dec 2010 23:39:55 +0000 (13:39 -1000)]
Update to zlib-1.2.5.

This contains numerous bug fixes and improvements.  For more details,
see the ChangeLog.

Incorporated in this commit is removal of using patch files, and just
making the appropriate changes on master.