dragonfly.git
14 years agokernel - SWAP CACHE part 22/many - Fix counter overflow introduced in part 21
Matthew Dillon [Mon, 22 Feb 2010 02:33:43 +0000 (18:33 -0800)]
kernel - SWAP CACHE part 22/many - Fix counter overflow introduced in part 21

* vm_swapcache_inactive_heuristic can overflow, making it extremely negative
  and causing swapcache writing to cease for a long period of time.

* Two-in-one fix.  Check if it is too negative and reset it.  This also
  automatically adjusts the heuristic if the sysop manually changes
  the hysteresis to a smaller value.

14 years agokernel - Fix some rare pmap races in i386 and x86_64.
Matthew Dillon [Mon, 22 Feb 2010 02:23:13 +0000 (18:23 -0800)]
kernel - Fix some rare pmap races in i386 and x86_64.

* Adjust pmap_inval_init() to enter a critical section and add
  a new pmap_inval_done() function which flushes and exits it.

  It was possible for an interrupt or other preemptive action to
  come along during a pmap operation and issue its own pmap operation,
  potentially leading to races which corrupt the pmap.

  This case was tested an could actually occur, though the damage (if any)
  is unknown.  x86_64 machines have had a long standing and difficult to
  reproduce bug where a program would sometimes seg-fault for no reason.
  It is unknown whether this fixes the bug or not.

* Interlock the pmap structure when invalidating pages using a bit
  in the pm_active field.

  Check for the interlock in swtch.s when switching into threads
  and print a nice warning if it occurs.

  It was possible for one cpu to initiate a pmap modifying operation
  while another switches into a thread using the pmap the first cpu
  was in the middle of modifying.  The case is extremely rare but can
  occur if the cpu doing the modifying operation receives a SMI
  interrupt, stalling it long enough for the other cpu to switch
  into the thread and resume running in userspace.

* pmap_protect() assumed no races when clearing PG_RW and PG_M due
  to the pmap_inval operations it runs.  This should in fact be
  true with the above fixes.  However, the rest of the pmap code
  uses atomic operations so adjust pmap_protect() to also use atomic
  operations.

14 years agosetkey(8): Add missing token to fix a yacc warning.
Sascha Wildner [Mon, 22 Feb 2010 01:16:55 +0000 (02:16 +0100)]
setkey(8): Add missing token to fix a yacc warning.

14 years agoHAMMER Utility - Fix snapshots migration for non-default directories
YONETANI Tomokazu [Sun, 21 Feb 2010 22:36:59 +0000 (07:36 +0900)]
HAMMER Utility - Fix snapshots migration for non-default directories

Snapshots migration failed if the snapshots directory contained hyphens
or dots.  Also catch the case when it couldn't parse the name of a snapshot
symlink and give the operator a clue.

14 years agoMerge SUBDIRS and SUBDIRS3 and their LSYM* versions.
YONETANI Tomokazu [Sun, 21 Feb 2010 15:01:00 +0000 (00:01 +0900)]
Merge SUBDIRS and SUBDIRS3 and their LSYM* versions.
This also fixes three error messages caused by the wrong symlink
for dev/disk/mpt/mpilib, which doesn't actually belong to SUBDIRS3
because it has four directory components in the path.

14 years agokernel - TMPFS - Stabilization pass, fix assertion in nrmdir (again)
Matthew Dillon [Sun, 21 Feb 2010 19:41:03 +0000 (11:41 -0800)]
kernel - TMPFS - Stabilization pass, fix assertion in nrmdir (again)

* Oops, fix bug in last commit.  vp was garbage where it was being tested.

14 years agokernel - TMPFS - Stabilization pass, fix assertion in nrmdir
Matthew Dillon [Sun, 21 Feb 2010 16:41:15 +0000 (08:41 -0800)]
kernel - TMPFS - Stabilization pass, fix assertion in nrmdir

* Have tmpfs_nrmdir() test whether the vp is a directory and return
  the proper error before asserting that it is a directory.

* Fixes assertion panic if you attempt to rmdir a file in tmpfs.

14 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Sun, 21 Feb 2010 16:12:15 +0000 (08:12 -0800)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

14 years agoaps(4): use more c99
Constantine A. Murenin [Sun, 21 Feb 2010 12:09:32 +0000 (07:09 -0500)]
aps(4): use more c99

14 years agoHAMMER - Fix mirroring between 32 and 64-bit machines
Michael Neumann [Sun, 21 Feb 2010 11:39:26 +0000 (12:39 +0100)]
HAMMER - Fix mirroring between 32 and 64-bit machines

We need to pack struct hammer_pseudofs_data as it had differing sizes
on 32-bit vs. 64-bit machines. As this structure is send over-the-wire
this lead to an early abort in the hammer mirroring code (cmd_mirror.c)
when mirroring a PFS from a 32-bit machine to a 64-bit machine or vice
versa as it sanity checks the packets it gets.

Even so the structure is stored on-media, the change in size is no
issue as the tail is zero-padded with reserved fields.

WARNING:

    After this change, mirroring between 64-bit machines predating
    this commit and updated 64-bit machines will no longer work.
    PLEASE UPDATE them all in one go or leave them unmodified.
    32-bit machines are not affected at all, as this commit does
    not change the size of the structure for 32-bit machines.

Discussed-with: Matthew Dillon

14 years agokernel - Update swapcache manual page, document meta-data/inode ratios
Matthew Dillon [Sun, 21 Feb 2010 02:41:58 +0000 (18:41 -0800)]
kernel - Update swapcache manual page, document meta-data/inode ratios

* Document the meta-data cache vs inode ratio when configuring swapcache
  for meta-data caching.

14 years agokernel - Update swapcache manual page, fix breakage in last commit
Matthew Dillon [Sun, 21 Feb 2010 02:22:12 +0000 (18:22 -0800)]
kernel - Update swapcache manual page, fix breakage in last commit

* Oops, a bunch of stuff was accidently removed in the last
  update, add it back in.

14 years agoacpi_thinkpad(4): the refresh function should be declarared as per prototype
Constantine A. Murenin [Sat, 20 Feb 2010 23:32:48 +0000 (18:32 -0500)]
acpi_thinkpad(4): the refresh function should be declarared as per prototype

* The refresh function should be static void, the inconsistency is again
  linked to 10f97674 (through bringing back the refresh function from 48cf177).

14 years agoacpi_thinkpad(4): bring back relevant changes from 20b3fb for acpi_thinkpad_refresh
Constantine A. Murenin [Sat, 20 Feb 2010 23:15:56 +0000 (18:15 -0500)]
acpi_thinkpad(4): bring back relevant changes from 20b3fb for acpi_thinkpad_refresh

14 years agoacpi_thinkpad(4): revert the half-done rename of acpi_thinkpad to acpi_ibm
Constantine A. Murenin [Sat, 20 Feb 2010 23:01:39 +0000 (18:01 -0500)]
acpi_thinkpad(4): revert the half-done rename of acpi_thinkpad to acpi_ibm

* 10f976 ("Sync ACPI with FreeBSD 7.2") from 2009-11-08 broke a number of
  functionality in acpi_thinkpad, whereas there were no interesting changes
  between acpi_ibm.c#rev1.15 and acpi_ibm.c#rev1.19 on FreeBSD
* `git show 20b3fb 32af04 10f976 acpi_thinkpad.c | patch -R -p5 acpi_thinkpad.c`
  brings us back to da42c7

14 years agokernel - TMPFS - Features, don't sync on umount, enforce snocache on root
Matthew Dillon [Sat, 20 Feb 2010 23:03:41 +0000 (15:03 -0800)]
kernel - TMPFS - Features, don't sync on umount, enforce snocache on root

* The umount code was syncing the contents of tmpfs to swap.  Fix it so it
  doesn't.

* Set the snocache flag on the tmpfs root node and silently enforce it on
  any chflags operation.  This prevents swapcache from trying to pageout
  file data from tmpfs (which is already backed by swap).

14 years agomandoc(1): Update to 1.9.15.
Sascha Wildner [Sat, 20 Feb 2010 22:35:54 +0000 (23:35 +0100)]
mandoc(1): Update to 1.9.15.

For a full list of changes, see <http://mdocml.bsd.lv/ChangeLog.html>.

Thanks-to: Kristaps Dzonsons

14 years agokernel - Update swapcache manual page
Matthew Dillon [Sat, 20 Feb 2010 20:10:27 +0000 (12:10 -0800)]
kernel - Update swapcache manual page

* The manual page is still a work in progress but I'm pushing in everything
  I learn about SSDs into it as I learn them.

  At least insofar as the Intel X25-V 40G SSD goes the vendor-specified
  40TB write endurance limit appears to assume high write magnifications
  and significant inefficiencies in write patterns.  The theoretical
  write endurance limit for this SSD with static wear leveling is 400TB.

  My expectation is a practical endurance somewhere between 150-250TB
  when configuring 32G of swap on the 40G X25-V.  The manual page will be
  updated as I get better numbers from testing.

* Specify that disklabel64 should be used when labeling a SSD, so
  the partitions are properly aligned.  Kernels as of id 4921cba1f6
  (late 2.5.x) will align the partition base for virgin disklabel64
  labels to a 1MB boundary.

  MLC flash uses 128K write blocks, SLC uses 64K.  Swapcache will write
  in 64K clusters but also tends to issue multiple linear writes, leading
  to fairly optimal SSD operation.

14 years agokernel - disklabel64 - Increase partition start alignment to 1 megabyte.
Matthew Dillon [Sat, 20 Feb 2010 18:11:28 +0000 (10:11 -0800)]
kernel - disklabel64 - Increase partition start alignment to 1 megabyte.

* Someone suggested that instead of using a 32K alignment we use a larger
  alignment.  I forgot who suggested it but after thinking about it a bit
  and messing around with swapcache on a SSD I decided it was a good idea.

  SSDs using MLC flash have a physical block size of 128K.  SLC flash has
  a physical block size of 64K.  Most typical cluster operations in
  DragonFly are 64K to 128K but clustered writes are often linear on disk
  leading to larger linear writes from the point of view of the physical
  drive's write cache.

  swapcache and swap operation tends to have even larger write linearities
  and write amplification effects on SSDs can be reduced to better than 1:2
  (verses the 1:10 the vendor typically assumes).

* Virgin disklabel64's layed down by the kernel will now align the
  start of the partition space to 1MB (1024 * 1024).  In for a penny,
  in for a pound.

* Adjust the manual page and note the benefits of using a larger alignment,
  particularly when swapcache is used with SSDs.

14 years agokernel - TMPFS - Stabilization pass, fix VM object leak, msync
Matthew Dillon [Sat, 20 Feb 2010 03:07:43 +0000 (19:07 -0800)]
kernel - TMPFS - Stabilization pass, fix VM object leak, msync

* The swap vm_object backing regular files was not being deallocated
  properly and leaked kernel memory.

* Truncate deleted files a little earlier in the INACTIVE path.

* Set MNTK_NOMSYNC.  This prevents msync(), sync(), and the
  periodic filesystem syncer from flushing pages to swap.

  VM pages related to tmpfs are only flushed based on memory
  pressure.

14 years agokernel - Add MNTK_NOMSYNC and OBJ_NOMSYNC
Matthew Dillon [Sat, 20 Feb 2010 03:05:56 +0000 (19:05 -0800)]
kernel - Add MNTK_NOMSYNC and OBJ_NOMSYNC

* Add MNTK_NOMSYNC and OBJ_NOMSYNC for tmpfs, which is used to
  disable msync operations.

14 years agousr.sbin - Include some missing programs in x86_64.
Antonio Huete Jimenez [Fri, 19 Feb 2010 18:44:34 +0000 (19:44 +0100)]
usr.sbin - Include some missing programs in x86_64.

Following programs were only in i386. Now they've been
included also in x86_64:

 apm
 apmd
 battd
 kgmon
 kgzip
 lptcontrol
 mptable
 rndcontrol
 sgsc (WARNS raised to 6)
 sicontrol
 spkrtest
 stallion (WARNS lowered)

14 years agokernel - Fix (unused) SEGEX_IDX macro
Matthew Dillon [Fri, 19 Feb 2010 20:29:31 +0000 (12:29 -0800)]
kernel - Fix (unused) SEGEX_IDX macro

* Fix missing paren in the macro.  The macro is not used but I'm going
  to keep it around anyway.

Submitted-by: Mohd Farid Kamarudin <mokamaru@gmail.com>
14 years agoHAMMER VFS - Reduce stalls during bulk file operations
Matthew Dillon [Fri, 19 Feb 2010 18:41:22 +0000 (10:41 -0800)]
HAMMER VFS - Reduce stalls during bulk file operations

* Track modifying inode operations on a per-PID basis (loosely) and
  call hammer_inode_wait_reclaims() earlier for those pids.

  The algorithm selects a wait point based on the process's perceived
  contribution to the inode load.  The greater the contribution, the
  more readily we stall the process in order to wait for related reclaims
  to process.

  Processes with lower loads have higher reclaim points and do not stall
  as readily as they did before.

* Remove waitreclaims calls based on B-Tree scans.  I'm not sure why I had
  this in there but it was creating an excessive number of unnecessary
  stalls, so if any problems crop up I'll have to find another way to deal
  with them.

* These changes (particularly the first) should reduce unnecessary stalls
  for the programs not doing heavy inode operations.  Hopefully that means
  rm -rf and tar extractions will not have as quite the detrimental effect
  on other processes as they did before.

14 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Fri, 19 Feb 2010 06:57:35 +0000 (22:57 -0800)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

14 years agokernel - TMPFS - Stabilization pass, fix rename, symlink issues
Matthew Dillon [Fri, 19 Feb 2010 06:55:53 +0000 (22:55 -0800)]
kernel - TMPFS - Stabilization pass, fix rename, symlink issues

* Fix a NULL pointer dereference in the rename code

* Remove the recursive directory rename test, the kernel does this
  for us already.

* Recode the rename code.

* Remove an assertion from the symlink code, the kernel already
  enforces limits on the length of a symlink.

* tmpfs now passes fsstress

14 years agokernel - TMPFS - Stabilization pass, fix accounting for rmdir
Matthew Dillon [Fri, 19 Feb 2010 02:46:11 +0000 (18:46 -0800)]
kernel - TMPFS - Stabilization pass, fix accounting for rmdir

* directory nodes were not being removed internally, leading to an
  tmpfs inode link.

14 years agoaps(4): changes for DragonFly -- welcome aps(4)!
Constantine A. Murenin [Fri, 19 Feb 2010 02:30:09 +0000 (21:30 -0500)]
aps(4): changes for DragonFly -- welcome aps(4)!

14 years agoaps(4): raw sys/dev/isa/aps.c#rev1.19 and share/man/man4/aps.4#rev1.8 from OpenBSD
Constantine A. Murenin [Thu, 18 Feb 2010 00:04:45 +0000 (19:04 -0500)]
aps(4): raw sys/dev/isa/aps.c#rev1.19 and share/man/man4/aps.4#rev1.8 from OpenBSD

14 years agonvi - Work around problem with git
Matthew Dillon [Fri, 19 Feb 2010 00:32:39 +0000 (16:32 -0800)]
nvi - Work around problem with git

* When a vi session managed by a git commit is ^Z'd and then resumed, git
  for some reason will set STDIN to O_NONBLOCKING.  Not only will it do
  this, but the git process will do it in parallel with the resume so
  the point at which stdin becomes non-blocking from the point of view
  of vi is completely non-determinisitc.

* Do an end-run around badly behaving parent processes by using extpread()
  to explicitly override the blocking/non-blocking mode.  Now nvi doesn't
  care whether stdin is in non-blocking mode or not.

14 years agoboot - Switch boot2 loader path around
Matthew Dillon [Thu, 18 Feb 2010 23:39:01 +0000 (15:39 -0800)]
boot - Switch boot2 loader path around

* Test /loader first, then /boot/loader, makes hitting enter quickly
  to speed up booting work again through the boot2 bootstrap.

Submitted-by: Johannes Hofmann <johannes.hofmann@gmx.de>
14 years agokernel - Fix bogus compiler warning
Matthew Dillon [Thu, 18 Feb 2010 18:07:51 +0000 (10:07 -0800)]
kernel - Fix bogus compiler warning

* NULL out an object to fix a bogus compiler warning.

14 years agokernel - TMPFS - Parse tmpfs_args from mount()
Matthew Dillon [Thu, 18 Feb 2010 18:04:36 +0000 (10:04 -0800)]
kernel - TMPFS - Parse tmpfs_args from mount()

* Parse tmpfs_args from mount() to set max size and inodes.

* Allow a fixed percentage of memory + swap to be used, do not attempt
  to calculate actual free memory + swap (because its impossible to do
  correctly).

14 years agoutilities - TMPFS - Pass tmpfs_args to mount()
Matthew Dillon [Thu, 18 Feb 2010 18:02:29 +0000 (10:02 -0800)]
utilities - TMPFS - Pass tmpfs_args to mount()

* Pass parameters to mount().  Parameters were being ignored.

* Use dehumanize_number() so suffixes can be specified for numbers
  when using -s, -n.

14 years agokernel - TMPFS - Stabilization pass, fix lockf()
Matthew Dillon [Thu, 18 Feb 2010 17:04:55 +0000 (09:04 -0800)]
kernel - TMPFS - Stabilization pass, fix lockf()

* TMPFS needs to initialize the lockf structure embedded in tmpfs_node.

* Fixes panic when using the structure.

14 years agoevtranalyze: share debugging declarations
Aggelos Economopoulos [Thu, 18 Feb 2010 08:40:14 +0000 (10:40 +0200)]
evtranalyze: share debugging declarations

14 years agoacpi_thinkpad(4): make acpi_thinkpad sensors actually work
Constantine A. Murenin [Thu, 18 Feb 2010 07:13:00 +0000 (02:13 -0500)]
acpi_thinkpad(4): make acpi_thinkpad sensors actually work

* After this patch on my ThinkPad R51:
  %sysctl hw.sensors.acpi_ibm0
  hw.sensors.acpi_ibm0.temp0: 69.00 degC
  hw.sensors.acpi_ibm0.temp1: 52.00 degC
  hw.sensors.acpi_ibm0.temp2: 41.00 degC
  hw.sensors.acpi_ibm0.temp3: 59.00 degC
  hw.sensors.acpi_ibm0.temp4: 36.00 degC
  hw.sensors.acpi_ibm0.temp5: invalid
  hw.sensors.acpi_ibm0.temp6: 26.00 degC
  hw.sensors.acpi_ibm0.temp7: invalid
  hw.sensors.acpi_ibm0.fan0: 3469 RPM

* Before this patch:
  o The temperature values were absolutely random, since
    the /data/ variable was never initialised from temp[i].
  o The braces were missing from the fan error path of
    an if statement.
  o Whitespaces were used instead of tabs.

14 years agolibc: Sync asctime.c and localtime.c with tzcode2010a from elsie.
Sascha Wildner [Thu, 18 Feb 2010 02:41:04 +0000 (03:41 +0100)]
libc: Sync asctime.c and localtime.c with tzcode2010a from elsie.

asctime.c:   Set errno to EINVAL and return "??? ??? ?? ??:??:?? ????\n" if
             asctime_r() is called with a NULL struct tm pointer.
             (Note that asctime_r() is called by ctime_r() and asctime();
             asctime() is called by ctime().)

localtime.c: Set errno to EINVAL and return WRONG if time1() is called with
             a NULL struct tm pointer; avoid dereference if a NULL struct
             tm pointer is passed to timelocal(), timegm(), or timeoff().
             (Note that time1 is called by mktime(), timegm(), and timeoff();
             mktime is called by timelocal().)

14 years agoevtranalyze: correct allocation size
Aggelos Economopoulos [Wed, 17 Feb 2010 15:54:43 +0000 (17:54 +0200)]
evtranalyze: correct allocation size

Tracked-down-via: valgrind

14 years agokernel - if_alc - Add to conf/files, GENERIC, X86_64_GENERIC, and LINT
Matthew Dillon [Wed, 17 Feb 2010 17:03:14 +0000 (09:03 -0800)]
kernel - if_alc - Add to conf/files, GENERIC, X86_64_GENERIC, and LINT

* Add if_alc to the general build.

14 years agokernel - SWAP CACHE part 21/many - more manual page adjustments
Matthew Dillon [Wed, 17 Feb 2010 08:16:57 +0000 (00:16 -0800)]
kernel - SWAP CACHE part 21/many - more manual page adjustments

* Explain data caching issues with NFS

14 years agokernel - SWAP CACHE part 20/many - add 'cache' and 'noscache' chflags.
Matthew Dillon [Wed, 17 Feb 2010 07:52:14 +0000 (23:52 -0800)]
kernel - SWAP CACHE part 20/many - add 'cache' and 'noscache' chflags.

* Allow directory hierarchies to be selected for data caching when
  using vm.swapcache.data_enable.

* Add the vm.swapcache.use_chflags sysctl which defaults to ON and
  enables use of the new chflags flags to determine what directory
  trees the swapcache will cache data from.

* Add chflags cache and noscache.  The flags are tracked recursively
  by the namecache and do *NOT* have to be set recursively in the
  directory tree.  Setting a flag in a top-level directory is sufficient
  to cover the entire subtree.

  chflags cache - Any regular file in the subtree will be cached
by swapcache.

  chflags noscache - Disables any swapcacheing of data in the subtree,
overrides any use of chflags cache in the subtree.

  NOTE: Only applies to file data.  The caching of file meta-data by
  swapcache is controlled globally by vm.swapcache.meta_enable and
  ignores chflags flags..

* Adjust the manual pages for swapcache and chflags.

* NOTE! The default has been changed to require the use of chflags, data
  caching will not occur unless you either turn off the
  vm.swapcache.use_chflags sysctl (which enables data caching globally)
  or do something like 'chflags cache /'.  Of course vm.swapcache.read_enable
  must also be turned on for swapcache to cache file data.

* NOTE! World must be rebuilt for libc, chflags, and ls to understand the
  new flags.

14 years agokernel - tmpfs - Remove warning message on mount, update manual page
Matthew Dillon [Tue, 16 Feb 2010 19:27:55 +0000 (11:27 -0800)]
kernel - tmpfs - Remove warning message on mount, update manual page

* Remove the warning message on mount.

* Improve the manual page.

14 years agokernel - use matching type for res; this fixes x86_64 build
YONETANI Tomokazu [Tue, 16 Feb 2010 03:15:19 +0000 (12:15 +0900)]
kernel - use matching type for res; this fixes x86_64 build

14 years agoboot2 - Fix ufs inode cache corruption when ESC'ing out of boot2
Matthew Dillon [Mon, 15 Feb 2010 21:43:27 +0000 (13:43 -0800)]
boot2 - Fix ufs inode cache corruption when ESC'ing out of boot2

* Increase boot2_dmadat->secbuf[] from 512 to 2K to cover the
  disklabel64.

* ufs_init() needs to reset its inode cache

Submitted-by: Johannes Hofmann <johannes.hofmann@gmx.de>
14 years agoevtr: modularize debug output
Aggelos Economopoulos [Mon, 15 Feb 2010 18:48:58 +0000 (20:48 +0200)]
evtr: modularize debug output

14 years agonewfs.8: Remove tmpfs.8 MLINK.
Sascha Wildner [Mon, 15 Feb 2010 17:34:32 +0000 (18:34 +0100)]
newfs.8: Remove tmpfs.8 MLINK.

It seems it was created for former SunOS users (according to FreeBSD's
commit msg) and, more important, it shadowed tmpfs.5 when only
'man tmpfs' was entered.

14 years agokernel - Fix issue w/ buffer ortation when doing non-blocking read from bpf
Matthew Dillon [Mon, 15 Feb 2010 17:32:27 +0000 (09:32 -0800)]
kernel - Fix issue w/ buffer ortation when doing non-blocking read from bpf

* Non-blocking reads from a BPF device not in immediate mode would not
  rotate the buffers even if the was data in the store buffer, but not in
  the hold buffer.  So until the store buffer fills up, the reads would
  return -1 and set errno to EWOULDBLOCK.

Submitted-by: Guy Harris <guy@alum.mit.edu>
Taken-from: FreeBSD

14 years agoevtranalyze: add summary command and refactor interval code
Aggelos Economopoulos [Mon, 15 Feb 2010 12:28:07 +0000 (14:28 +0200)]
evtranalyze: add summary command and refactor interval code

Allow the user to specify a time interval in miliseconds. Coupled
with the summary command, this makes it easy to select a subset of
the events for the svg command.

Also fix the svg code to not assume there are always 5 threads
with activity.

Add a new option to the svg command to write to a different path
(the default remains "output.svg").

14 years agolibevtr: handle eof properly
Aggelos Economopoulos [Mon, 15 Feb 2010 12:06:23 +0000 (14:06 +0200)]
libevtr: handle eof properly

14 years agokernel - ACPI - Fix missing unlocks in error path in acpi_ec
Matthew Dillon [Mon, 15 Feb 2010 07:00:46 +0000 (23:00 -0800)]
kernel - ACPI - Fix missing unlocks in error path in acpi_ec

* Add missing unlocks

Submitted-by: Edward O'Callaghan
14 years agokernel - acpi - fix thermal thread loop
Matthew Dillon [Mon, 15 Feb 2010 05:37:01 +0000 (21:37 -0800)]
kernel - acpi - fix thermal thread loop

* The thermal thread was sleeping in tzpool with the thermal lock held,
  causing anyone trying to use the lock (e.g. apm) to block for very
  long periods of time (sometimes forever).

* Properly drop the lock when sleeping.

14 years agokernel - Video - Add suppor for Intel IGD chipsets (netbook / N450 etc)
Matthew Dillon [Mon, 15 Feb 2010 04:56:17 +0000 (20:56 -0800)]
kernel - Video - Add suppor for Intel IGD chipsets (netbook / N450 etc)

* Add support for Intel Pinetail graphics chips, PCI ids 0xA0018086
  and 0xA0118086.

* Tested on Gateway netbook LT2104u.  Works just dandy.

* NOTE: Xorg may require 'Option "FramebufferCompression" "off"' in
  the Device section of your xorg.conf.

Taken-from: FreeBSD bug report kern/143427
Author: msumida@mvc.biglobe.ne.jp

14 years agoalc(4): Bring in a manual page too (from FreeBSD).
Sascha Wildner [Sun, 14 Feb 2010 23:55:04 +0000 (00:55 +0100)]
alc(4): Bring in a manual page too (from FreeBSD).

14 years agokernel - Add atomic_readandclear_int()
Matthew Dillon [Sun, 14 Feb 2010 23:53:28 +0000 (15:53 -0800)]
kernel - Add atomic_readandclear_int()

* Add atomic_readandclear_int() to support if_alc and future
  uses.

14 years agonetif - alc driver port - Finishing touches
Matthew Dillon [Sun, 14 Feb 2010 23:52:06 +0000 (15:52 -0800)]
netif - alc driver port - Finishing touches

* Fix minor logic differences between FreeBSD and DragonFly.

* Finishing touches and basic testing.

14 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Sun, 14 Feb 2010 23:42:08 +0000 (15:42 -0800)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

14 years agogetnetconfig(3): Remove a temporary warning.
Sascha Wildner [Sun, 14 Feb 2010 22:41:48 +0000 (23:41 +0100)]
getnetconfig(3): Remove a temporary warning.

14 years agokate.4 && km.4: improve synopsis
Constantine A. Murenin [Sun, 14 Feb 2010 22:38:03 +0000 (17:38 -0500)]
kate.4 && km.4: improve synopsis

14 years agokernel - VM PAGER part 2/2 - addendum, fix compile time issue w/ext2
Matthew Dillon [Sun, 14 Feb 2010 22:22:00 +0000 (14:22 -0800)]
kernel - VM PAGER part 2/2 - addendum, fix compile time issue w/ext2

* Remove unused variable.

14 years agoSync hifn(4) documentation with FreeBSD, too.
Sascha Wildner [Sun, 14 Feb 2010 22:06:19 +0000 (23:06 +0100)]
Sync hifn(4) documentation with FreeBSD, too.

14 years agonetif - alc driver port - Initial work by Samuel J. Greear
Matthew Dillon [Sun, 14 Feb 2010 21:38:48 +0000 (13:38 -0800)]
netif - alc driver port - Initial work by Samuel J. Greear

Submitted-by: "Samuel J. Greear" <sjg@evilcode.net>
Taken-From: FreeBSD

14 years agodisklabel[32,64] utilities - Change the default disklabel program
Matthew Dillon [Sun, 14 Feb 2010 19:37:31 +0000 (11:37 -0800)]
disklabel[32,64] utilities - Change the default disklabel program

* 'disklabel' is now the 64-bit disklabel program.
* The 32 bit disklabel program can be accessed via 'disklabel32'
* The 64 bit disklabel program can also be accessed via 'disklabel64'

14 years agodisklabel64 utility - Allow pbase/pstop to be slice-relative-unaligned
Matthew Dillon [Sun, 14 Feb 2010 19:16:40 +0000 (11:16 -0800)]
disklabel64 utility - Allow pbase/pstop to be slice-relative-unaligned

* The kernel will now create 64-bit labels whos pbase/pstop are not
  aligned slice-relative, in order to align them physically.

* Adjust the disklabel64 utility to allow pbase/pstop to be unaligned,
  but still require the offset and size fields in the partition defs to
  be aligned (relative to pbase).

14 years agokernel - disklabel64 - Adjust partition base to be physically aligned
Matthew Dillon [Sun, 14 Feb 2010 18:57:27 +0000 (10:57 -0800)]
kernel - disklabel64 - Adjust partition base to be physically aligned

* When creating a new pristine label the kernel will align the
  partition base to the physical drive instead of to the logical
  slice.

  This is to accomodate fdisk/slice setups which do not align the
  slice properly (which is nearly all of them).

14 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Sun, 14 Feb 2010 16:34:57 +0000 (08:34 -0800)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

14 years agokernel - VM PAGER part 2/2 - Expand vinitvmio() and vnode_pager_alloc()
Matthew Dillon [Sun, 14 Feb 2010 16:29:10 +0000 (08:29 -0800)]
kernel - VM PAGER part 2/2 - Expand vinitvmio() and vnode_pager_alloc()

* vinitvmio() is responsible for assigning the initial VM object size based
  on the file size.  Adjust vinitvmio() to conform to the new nvextendbuf()
  and nvtruncbuf() API.

* vinitvmio() has been given two additional parameters, blksize and boff,
  to allow it to determine how much larger the VM object must be relative
  to the byte-granular file size passed to it.

* Remove vm_page_alloc() and remove the pgo_alloc vector from struct
  pagerops.  Convert all the VM pager allocation procedures into global
  procedures which are called directly.  Trying to feed everything through
  a single function was a joke when all the callers knew precisely what
  kind of VM object they were creating anyway.

  Add the extra arguments to vnode_pager_alloc() which vinitvmio() needs
  to pass in.

14 years agohifn - Update and unbreak
Alex Hornung [Sat, 23 Jan 2010 09:53:22 +0000 (09:53 +0000)]
hifn - Update and unbreak

* Update hifn to current FreeBSD status except for vulcan support.

* This should also fix current issues where hifn doesn't really work.

Dragonfly-bug: http://bugs.dragonflybsd.org/issue1638
Reported-by: Thomas Nikolajsen
Obtained-from: FreeBSD

14 years agowpa_supplicant/hostapd: Added some missing patches.
Jan Lentfer [Fri, 5 Feb 2010 06:32:02 +0000 (07:32 +0100)]
wpa_supplicant/hostapd: Added some missing patches.

14 years agowpa_supplicant/hostapd: Update to 0.6.10
Jan Lentfer [Thu, 4 Feb 2010 15:57:55 +0000 (16:57 +0100)]
wpa_supplicant/hostapd: Update to 0.6.10

14 years agohostapd: Update vendor branch to 0.6.10
Jan Lentfer [Thu, 4 Feb 2010 12:26:03 +0000 (13:26 +0100)]
hostapd: Update vendor branch to 0.6.10

14 years agowpa_supplicant: update vendor branch to 0.6.10
Jan Lentfer [Thu, 4 Feb 2010 08:37:41 +0000 (09:37 +0100)]
wpa_supplicant: update vendor branch to 0.6.10

14 years agohostpad: Update to work without version tag
Jan Lentfer [Wed, 3 Feb 2010 11:50:47 +0000 (12:50 +0100)]
hostpad: Update to work without version tag

14 years agohostapd: remove version tag from directory
Jan Lentfer [Wed, 3 Feb 2010 10:45:18 +0000 (11:45 +0100)]
hostapd: remove version tag from directory

14 years agowpa_supplicant: Update to work without verision tag
Jan Lentfer [Wed, 3 Feb 2010 10:23:03 +0000 (11:23 +0100)]
wpa_supplicant: Update to work without verision tag

14 years agowpa-supplicant: remove version tag from directory
Jan Lentfer [Wed, 27 Jan 2010 21:55:51 +0000 (22:55 +0100)]
wpa-supplicant: remove version tag from directory

14 years agokate(4): put missing \n into device_printf(9) calls
Constantine A. Murenin [Sun, 14 Feb 2010 08:57:54 +0000 (03:57 -0500)]
kate(4): put missing \n into device_printf(9) calls

14 years agotest commit
Constantine A. Murenin [Sun, 14 Feb 2010 08:49:56 +0000 (03:49 -0500)]
test commit

14 years agokernel - VM PAGER part 1/2 - Remove vm_page_alloc()
Matthew Dillon [Sun, 14 Feb 2010 02:09:49 +0000 (18:09 -0800)]
kernel - VM PAGER part 1/2 - Remove vm_page_alloc()

* Break out the individual VM object allocation functions and remove
  the vm_pager_alloc() ops vector.

* This is in preparation for giving the vnode_pager_alloc() some
  additional arguments to match recent buffer cache work.

14 years agokernel - TMPFS - Stabilization pass, fix vnode list corruption
Matthew Dillon [Sun, 14 Feb 2010 01:31:19 +0000 (17:31 -0800)]
kernel - TMPFS - Stabilization pass, fix vnode list corruption

* Clean up tn_size when destroying a VLNK node.

* Interlock the vnode while holding the node lock before calling
  vget() to prevent it from being ripped out from under the vget().

  Then re-test that the relationship between the tmpfs node and
  vnode holds.

* Minor formatting cleanup in the same area.

14 years agokernel - Cleanup, add assertions in the vnode freeing path
Matthew Dillon [Sun, 14 Feb 2010 01:30:02 +0000 (17:30 -0800)]
kernel - Cleanup, add assertions in the vnode freeing path

* Remove debug kprintf: "Warning ncp ... deadlock avoided".

* Add assertions on the vnode flag state when adding and removing
  from the freelist, or when dtor() is called by the backing store.

14 years agokate.4 & km.4: Silence 'make manlint' warnings.
Sascha Wildner [Sat, 13 Feb 2010 18:18:49 +0000 (19:18 +0100)]
kate.4 & km.4: Silence 'make manlint' warnings.

14 years agokgdb - Fix kernel trapframe backtraces for x86_64
Matthew Dillon [Sat, 13 Feb 2010 17:41:33 +0000 (09:41 -0800)]
kgdb - Fix kernel trapframe backtraces for x86_64

* Bring in same infrastructure that i386 uses

* Make the stack trace cross the "trapframe" frame properly.

14 years agokernel - More readdirplus deadlock avoidance work
Matthew Dillon [Sat, 13 Feb 2010 17:23:33 +0000 (09:23 -0800)]
kernel - More readdirplus deadlock avoidance work

* Add cache_nlookup_nonblock() and nfs_nget_nonblock()

* Adjust the readdirplus code to use the new functions.   Basically
  there are too many locks being held by callers and then readdirplus
  goes and tries to acquire (and lock) nodes for the directory elements
  on top of that, leading to deadlocks.

  Attempts to order the locks have failed so now we just use a
  non-blocking approach since the readdirplus entries are all
  advisory anyway.

14 years agoinstaller: Fix the check for partitions <50GB a bit more.
Sascha Wildner [Sat, 13 Feb 2010 17:07:04 +0000 (18:07 +0100)]
installer: Fix the check for partitions <50GB a bit more.

/boot or swap could have '*' for size too, in theory.

14 years agoinstaller: Raise the size proposal for /boot to 768M for HAMMER installs.
Sascha Wildner [Sat, 13 Feb 2010 16:44:02 +0000 (17:44 +0100)]
installer: Raise the size proposal for /boot to 768M for HAMMER installs.

Rewrite the algorithm for calculating size recommendations to be a bit
more flexible, especially with smaller disks (as in VMs e.g.). It should
always give a valid set now.

/boot tries to be 768M if space permits. This way several kernels and
module directories can comfortably fit on it.

Reported-by: many
While I'm here, fix another issue regarding HAMMER installs:

The check for filesystems <50GB wasn't working at all. Fix and improve it.
Instead of checking only the root filesystem, check the sizes of all HAMMER
filesystems created. If a HAMMER filesystem <50GB has been encountered,
display a warning similar to hammer_newfs(8) and allow the user to either
confirm or cancel.

14 years agokate(4) and km(4): temperature sensors for AMD Family 0Fh, 10h and 11h AMD64 processors
Constantine A. Murenin [Sat, 13 Feb 2010 04:05:19 +0000 (23:05 -0500)]
kate(4) and km(4): temperature sensors for AMD Family 0Fh, 10h and 11h AMD64 processors

14 years agopcidevs: unbreak a75ee873 from 2009-10-04 (geode/cs5536)
Constantine A. Murenin [Sat, 13 Feb 2010 07:53:01 +0000 (02:53 -0500)]
pcidevs: unbreak a75ee873 from 2009-10-04 (geode/cs5536)

14 years agolibevtr: fix warnings
Aggelos Economopoulos [Sat, 13 Feb 2010 13:32:50 +0000 (15:32 +0200)]
libevtr: fix warnings

14 years agoevtranalyze: fix sloppy format strings
Aggelos Economopoulos [Sat, 13 Feb 2010 13:00:24 +0000 (15:00 +0200)]
evtranalyze: fix sloppy format strings

Patch-by: nant@
14 years agoktrdump: always sort entries when dumping
Aggelos Economopoulos [Sat, 13 Feb 2010 12:49:12 +0000 (14:49 +0200)]
ktrdump: always sort entries when dumping

Also remove duplicate setting of rflag in ktrdump -a.

14 years agoevtr: dump core frequencies and use them to print timestamps in usecs
Aggelos Economopoulos [Sat, 13 Feb 2010 12:35:15 +0000 (14:35 +0200)]
evtr: dump core frequencies and use them to print timestamps in usecs

This commit dumps the same frequency for each core; there's no
point supporting different frequencies unless we monitor frequency
change events. We use the frequency to print out relative timestamps
in microseconds. This relies on ktrdump having done correct sorting.

14 years agolibevtr: fix thinko
Aggelos Economopoulos [Sat, 13 Feb 2010 12:31:30 +0000 (14:31 +0200)]
libevtr: fix thinko

14 years agoevtranalyze: correct a couple of filtering bugs
Aggelos Economopoulos [Fri, 12 Feb 2010 20:17:40 +0000 (22:17 +0200)]
evtranalyze: correct a couple of filtering bugs

14 years agoPut evtranalyze and ktrdump in the already existing i386 check.
Sascha Wildner [Sat, 13 Feb 2010 12:31:34 +0000 (13:31 +0100)]
Put evtranalyze and ktrdump in the already existing i386 check.

14 years agotest utilities - eatmem.c - Change size parameter from int to size_t
Matthew Dillon [Sat, 13 Feb 2010 10:02:16 +0000 (02:02 -0800)]
test utilities - eatmem.c - Change size parameter from int to size_t

* Allows large multi-gigabyte allocations on 64-bit boxes

14 years agokernel - TMPFS - Bug fixing pass - paging to/from swap, vnode recycling
Matthew Dillon [Sat, 13 Feb 2010 09:58:02 +0000 (01:58 -0800)]
kernel - TMPFS - Bug fixing pass - paging to/from swap, vnode recycling

* vm_page_set_validdirty() needs to flag the underlying object or
  the vfsync() code for the vnode will not know that its dirty.

* Any paging activity has to sync to swap because the kernel marks the
  VM pages as clean afterwords even if we [re]dirty them during the I/O.

  Testing the uio for UIO_NOCOPY is sufficient to detect when a tmpfs_write()
  is due to VM paging or not.

  This fixes vnode recycling - where the data is forced out to swap, and
  later can be paged back in, as well as paging due to memory pressure.

14 years agokernel - swapcache - vm_object_page_remove()
Matthew Dillon [Sat, 13 Feb 2010 08:01:13 +0000 (00:01 -0800)]
kernel - swapcache - vm_object_page_remove()

* vm_object_page_remove() may have to act on swap-backing for the VM
  object even if it contains no resident VM pages.

14 years agokernel - TMPFS - Bug fixing pass - vinitvmio(), umount, readdir
Matthew Dillon [Sat, 13 Feb 2010 07:57:53 +0000 (23:57 -0800)]
kernel - TMPFS - Bug fixing pass - vinitvmio(), umount, readdir

* Call vinitvmio() with a properly bufcache-aligned number of pages

* Do not call vinitvmio() for symlinks or directories (we don't use
  the buffer cache for those vnode types).

* Adjust tmpfs_dir_attach() and tmpfs_dir_detach() so the detach
  code can be called from umount, and call it from umount to fix
  a panic.

* tmpfs_dir_getdotdotdent() needed to be adjusted to handle the
  root vnode's NULL parent pointer.  Fixed empty root directories
  for the mount.

* Acquire TMPFS_NODE_LOCK() around opreations on dnode->tn_dir.tn_dirhead.

14 years agokernel - TMPFS - Bug fixing pass - fsync, vnode locks
Matthew Dillon [Sat, 13 Feb 2010 06:45:23 +0000 (22:45 -0800)]
kernel - TMPFS - Bug fixing pass - fsync, vnode locks

* tmpfs_fsync() needs to have a couple of special cases to properly deal
  with the backing store.

  (1) When unmounting any vnode or recycling a dead vnode the backing
      store can be destroyed.

  (2) When recycling a live vnode the OS is trying to free the vnode,
      meaning also free up the buffer cache for that vnode.  tmpfs must
      sync the data to swap backing store.

  (3) Otherwise fsync can be ignored.  We don't want to force data into
      swap.

* The DragonFly kernel handles nearly all vnode and namespace locking
  for VFSs.  If tmpfs tries to do its own it will cause deadlocks.

  At the moment we are not running MPSAFE but ultimately we will have
  to do a pass to properly lock tmpfs_nodes during operations.