dragonfly.git
4 years agodrm: Add linux/ktime.h
François Tigeot [Sun, 24 May 2015 09:04:12 +0000 (11:04 +0200)]
drm: Add linux/ktime.h

4 years agokernel - Add utimensat() support
Matthew Dillon [Sun, 24 May 2015 04:19:04 +0000 (21:19 -0700)]
kernel - Add utimensat() support

* Brings in utimensat() from FreeBSD, adjusted for DragonFly system
  call mechanics.

Submitted-by: stateless #2818
4 years agodrm/i915: Fix a __raw_i915_read32() definition
François Tigeot [Sat, 23 May 2015 17:08:11 +0000 (19:08 +0200)]
drm/i915: Fix a __raw_i915_read32() definition

We don't have pci_iomap() yet so registers can't be properly mapped
in the Linux way.

4 years agodrm: Put abs64 definition in the right place
François Tigeot [Sat, 23 May 2015 06:24:11 +0000 (08:24 +0200)]
drm: Put abs64 definition in the right place

4 years agodrm/linux: Add a few smp_mb_xxx_atomic_inc() functions
François Tigeot [Sat, 23 May 2015 06:15:04 +0000 (08:15 +0200)]
drm/linux: Add a few smp_mb_xxx_atomic_inc() functions

4 years agolinux/i2c.h: Properly define struct device
François Tigeot [Sat, 23 May 2015 06:11:42 +0000 (08:11 +0200)]
linux/i2c.h: Properly define struct device

4 years agodrm/linux: Add TASK_COMM_LEN
François Tigeot [Sat, 23 May 2015 06:06:03 +0000 (08:06 +0200)]
drm/linux: Add TASK_COMM_LEN

4 years agodrm/linux: Add mod_timer_pinned()
François Tigeot [Sat, 23 May 2015 06:00:42 +0000 (08:00 +0200)]
drm/linux: Add mod_timer_pinned()

4 years agodrm/linux: define destroy_timer_on_stack()
François Tigeot [Sat, 23 May 2015 05:58:41 +0000 (07:58 +0200)]
drm/linux: define destroy_timer_on_stack()

4 years agodrm/linux: define ETIME
François Tigeot [Sat, 23 May 2015 05:51:07 +0000 (07:51 +0200)]
drm/linux: define ETIME

4 years agodrm/linux: Implement DEFINE_MUTEX()
François Tigeot [Fri, 22 May 2015 20:23:13 +0000 (22:23 +0200)]
drm/linux: Implement DEFINE_MUTEX()

4 years agodrm/linux: Add set_pages_uc()
François Tigeot [Fri, 22 May 2015 18:38:34 +0000 (20:38 +0200)]
drm/linux: Add set_pages_uc()

4 years agoWORLD_CCVER: Fix buildworld with clangXX
John Marino [Fri, 22 May 2015 16:40:24 +0000 (09:40 -0700)]
WORLD_CCVER: Fix buildworld with clangXX

The backtrace library requires unwind.h to build.  This file was never
created, so the base GCC's would fall back to the version in /usr/libdata.
Clang compilers from ports don't have unwind.h so they were failing on the
world build (building gcc50).  This modification makes unwind.h available
for backtrace.c and allows the build to complete with WORLD_CCVER=clang36

4 years agokernel - Change cpu_idle_hlt default
Matthew Dillon [Fri, 22 May 2015 17:03:48 +0000 (10:03 -0700)]
kernel - Change cpu_idle_hlt default

* Set cpu_idle_hlt default to 1 for Intel Haswell or later cpus.  These
  cpus do major power management in the HLT instruction.

  Leave cpu_idle_hlt default at 2 for AMD cpus or older Intel cpus.
  These cpus do not do major management in the HLT instruction and ACPI
  entry is required to reduce idle power consumption.

4 years agohammer2 - Fix hammer2_cluster_load_async() issue
Matthew Dillon [Fri, 22 May 2015 01:48:06 +0000 (18:48 -0700)]
hammer2 - Fix hammer2_cluster_load_async() issue

* Fix a hammer2_cluster_load_async() issue. Old code hardwired the cluster
  index to 0, but this might not be a validated chain.  Use cluster->focus
  instead.

4 years agodrm: Improve mutex_lock_interruptible() again
François Tigeot [Thu, 21 May 2015 20:44:00 +0000 (22:44 +0200)]
drm: Improve mutex_lock_interruptible() again

It should really be interruptible by signals

Spotted-by: dillon
4 years agodrm/linux: Improve the implementation of mutex_lock_interruptible()
François Tigeot [Thu, 21 May 2015 18:47:46 +0000 (20:47 +0200)]
drm/linux: Improve the implementation of mutex_lock_interruptible()

4 years agodrm/linux: Add get_page()
François Tigeot [Thu, 21 May 2015 18:17:59 +0000 (20:17 +0200)]
drm/linux: Add get_page()

4 years agoipfw3.8: Some cleanup.
Sascha Wildner [Thu, 21 May 2015 16:35:04 +0000 (18:35 +0200)]
ipfw3.8: Some cleanup.

4 years agokernel - Change bundirty() location in I/O sequence
Matthew Dillon [Thu, 21 May 2015 05:18:41 +0000 (22:18 -0700)]
kernel - Change bundirty() location in I/O sequence

* When doing a write BIO, do not bundirty() the buffer prior to issuing
  the vn_strategy().  Instead, bundirty() the buffer when the I/O
  is complete, primarily in bpdone().

  The I/O's data buffer is protected during the operation by vfs_busy_pages(),
  so related VM pages cannot be modified while the write is running.  And,
  of course, the buffer itself is locked exclusively for the duration of the
  opeartion.  Thus this change should NOT introduce any redirtying races.

* This change ensures that vp->v_rbdirty_tree remains non-empty until all
  related write I/Os have completed, removing a race condition for code
  which checks vp->v_rbdirty_tree to determine e.g. if a file requires
  synchronization or not.

  This race could cause problems because the system buffer flusher might
  be in the midst of flushing a buffer just as a filesystem decides to
  sync and starts checking vp->v_rbdirty_tree.

* This should theoretically fix a long-standing but difficult-to-reproduce
  bug in HAMMER1 where a backend flush occurs at an inopportune time.

4 years agohammer2 - Per-PFS transaction management
Matthew Dillon [Thu, 21 May 2015 05:10:45 +0000 (22:10 -0700)]
hammer2 - Per-PFS transaction management

* Replace the global transaction manager with a per-mount transaction
  manager.

* Each media volume's spmp (super-root pfs) also gets its own transaction
  manager.

* The Filesystem sync now flushes each PFS associated with the mount,
  and then flushes the super-root for the related physical volumes.

  When flushing the super-root, the flush stops at the PFS transition.

* Interactions on one mount point no longer stall other mount points on
  the same media.  This also means that freemap updates related to
  other mount points may occur while a flush is occuring on one of them.
  (might have broken recovery here, will fix in another pass).

* For now keep the syncer interlock vs new modifying operations to ensure
  a stable snapshot.

4 years agohammer2 - per-node sync threads
Matthew Dillon [Thu, 21 May 2015 01:04:49 +0000 (18:04 -0700)]
hammer2 - per-node sync threads

* Change the per-pfs sync threads into per-node sync threads.  Each sync
  thread is responsible for synchronizing its particular node to the
  pfs-based cluster when its particular node is out-of-sync.

* Significant work to the cluster iteration code to fix numerous deadlocks.

* Call vclrisdirty() conditionally at end of flush.

* Do not call vclrisdirty() unconditionally in hammer2_vop_fsync().

* Misc cleanups.

4 years agodrm/linux: Add seq_puts()
François Tigeot [Wed, 20 May 2015 20:00:08 +0000 (22:00 +0200)]
drm/linux: Add seq_puts()

4 years agohammer - limit certain diagnostics to 1/sec.
Matthew Dillon [Wed, 20 May 2015 16:35:02 +0000 (09:35 -0700)]
hammer - limit certain diagnostics to 1/sec.

* Limit certain diagnostics that can degenerately print in huge volumes
  to the console to one per second.

4 years agoecc/e3: Hook up error correction counting into sensors framework.
Sepherosa Ziehau [Thu, 14 May 2015 15:48:43 +0000 (23:48 +0800)]
ecc/e3: Hook up error correction counting into sensors framework.

4 years agoHAMMER: Add "hammer abort-cleanup" command
John Marino [Sun, 5 Apr 2015 11:06:49 +0000 (13:06 +0200)]
HAMMER: Add "hammer abort-cleanup" command

A new command has been added to HAMMER: abort-cleanup.  As could be
deduced from its name, this command will terminate all active cleanup
operations.  It takes no arguments.

It works by searching the /var/run directory for pidfiles starting with
"hammer.cleanup.".  It gets the pid from the filename rather than by
reading the contents of the pidfile.  Once the pid is obtained, the
SIGTERM signal is set to it.  Any successfully terminated process will
be announced on stdout.

The SIGINT signal could also be used, but this one does not print
"Terminated" on the process's terminal, which I find useful.

Currently if the cleanup is interrupted another way, the pidfile will
not be removed.  These hammer.cleanup pidfiles will accumulate until
the next "hammer abort-cleanup" command is executed.  Stale pidfiles
will be removed if encountered by abort-cleanup command.

4 years agopipe2 - Adjust manual page
Matthew Dillon [Tue, 19 May 2015 18:49:43 +0000 (11:49 -0700)]
pipe2 - Adjust manual page

* Add a description of pipe2 to the pipe manual page.

Taken-from: FreeBSD

4 years agokernel - fix O_CLOEXEC race in open() and fhopen()
Matthew Dillon [Tue, 19 May 2015 18:46:07 +0000 (11:46 -0700)]
kernel - fix O_CLOEXEC race in open() and fhopen()

* Fix an O_CLOEXEC race where a fork/exec can race an
  open(...O_CLOEXEC) and improperly inherit the descriptor.

4 years agokernel, libc - add pipe2()
Matthew Dillon [Tue, 19 May 2015 18:45:09 +0000 (11:45 -0700)]
kernel, libc - add pipe2()

* Add the pipe2() system call.

4 years agosbin/usched: Fix man usched(8)
Tomohiro Kusumi [Tue, 19 May 2015 11:25:30 +0000 (20:25 +0900)]
sbin/usched: Fix man usched(8)

- Add description on when cpumask has multiple bits set.

- e.g. When cpumask is 15 (0xF) then usched(8) first does
  usched_set(getpid(), USCHED_SET_CPU, 1, ...) for cpu#0 and then
  usched_set(getpid(), USCHED_ADD_CPU, x, ...) for cpu#1,2,3.

  # usched -d dfly:15 true
  DEBUG: USCHED_SET_SCHEDULER: scheduler: dfly
  DEBUG: USCHED_SET_CPU: cpuid: 0
  DEBUG: USCHED_ADD_CPU: cpuid: 1
  DEBUG: USCHED_ADD_CPU: cpuid: 2
  DEBUG: USCHED_ADD_CPU: cpuid: 3

4 years agosbin/usched: Make perror show pid/cpu#/scheduler
Tomohiro Kusumi [Sun, 17 May 2015 14:53:32 +0000 (23:53 +0900)]
sbin/usched: Make perror show pid/cpu#/scheduler

- Note that the caller's pid (or 0) is the only choice for pid currently.

4 years agosbin/usched: Use uint64_t for cpu#
Tomohiro Kusumi [Sun, 17 May 2015 14:25:07 +0000 (23:25 +0900)]
sbin/usched: Use uint64_t for cpu#

- Use uint64_t for 64 cpus(mask) instead of unsigned long.

4 years agoecc/e5: Log error for critical ECC errors
Sepherosa Ziehau [Mon, 18 May 2015 12:26:33 +0000 (20:26 +0800)]
ecc/e5: Log error for critical ECC errors

4 years agoecc/e5: Remove unused fields
Sepherosa Ziehau [Mon, 18 May 2015 12:21:42 +0000 (20:21 +0800)]
ecc/e5: Remove unused fields

4 years agoUpdate the pciconf(8) database.
Sascha Wildner [Mon, 18 May 2015 19:20:41 +0000 (21:20 +0200)]
Update the pciconf(8) database.

May 13, 2015 snapshot from http://pciids.sourceforge.net/

4 years agodrm/linux: Add uapi/linux/fb.h
François Tigeot [Mon, 18 May 2015 15:24:16 +0000 (17:24 +0200)]
drm/linux: Add uapi/linux/fb.h

4 years agokernel - Fix cpu lockup on resume after entering the debugger
Matthew Dillon [Mon, 18 May 2015 05:52:05 +0000 (22:52 -0700)]
kernel - Fix cpu lockup on resume after entering the debugger

* Xcpustop was not testing ipending on resume.  Since Xcpustop STIs
  it is possible for it to receive further interrupts while stopped
  which can cause ipending to be set.

* Use doreti instead of doreti_iret.   doreti will test ipending,
  fpending, the per-cpu flags.

* Change the semantics to work more similarly to normal interrupt vectors.

* Note that dumping is still problematic.

4 years agohammer2 - slave sync work
Matthew Dillon [Mon, 18 May 2015 00:23:50 +0000 (17:23 -0700)]
hammer2 - slave sync work

* Break hammer2_cluster_resolve() into three passes, do a better job
  validating the elements of a cluster.

* Fix miscellaneous focus issues in the hammer2_cluster_*() API.

* Acquire required spinlock when doing certain base block array updates.

* Fix miscellaneous recursion bugs in the slave sync thread.

* Fix a panic case when writing embedded data in an inode.

4 years agodrm - Add chip=161E8086
Matthew Dillon [Sun, 17 May 2015 20:24:33 +0000 (13:24 -0700)]
drm - Add chip=161E8086

* Add chip for broadwell  m-5y70

4 years agodrm/linux: Add list_for_each_entry_continue()
François Tigeot [Sun, 17 May 2015 18:26:31 +0000 (20:26 +0200)]
drm/linux: Add list_for_each_entry_continue()

4 years agodrm: Update linux/list.h
François Tigeot [Sun, 17 May 2015 18:24:34 +0000 (20:24 +0200)]
drm: Update linux/list.h

Obtained-from: FreeBSD/OFED

4 years agousched: Fix man usched_set(2)
Tomohiro Kusumi [Sat, 16 May 2015 23:54:23 +0000 (08:54 +0900)]
usched: Fix man usched_set(2)

- pid 0 is also allowed according to the current implementation.

- EINVAL is returned if
  'if (uap->pid != 0 && uap->pid != curthread->td_proc->p_pid)'.

4 years agousched: Add comments
Tomohiro Kusumi [Fri, 15 May 2015 08:17:41 +0000 (17:17 +0900)]
usched: Add comments

4 years agoswapon - Implement encrypted swap
Matthew Dillon [Sat, 16 May 2015 20:45:03 +0000 (13:45 -0700)]
swapon - Implement encrypted swap

Implement crypting of the swap device.  When enabled in this manner
/dev/urandom is used to generate a 256-bit random key and the base device
is automatically cryptsetup and mapped, making crypted swap trivial.

* Implement the 'crypt' fstab option, so swapon -a and swapoff -a work
  as expected for crypted swap.  Again, the base device (e.g. /dev/da0s1b)
  should be specified.  The option will automatically map it with cryptsetup
  and swap on the mapping.

  Also implement -c to crypt manual swapon/swapoff commands.  If used for
  swapon it must also be used for swapoff.  Again, specify the base device
  (e.g. /dev/da0s1b), not the /dev/mapper device, for both cases.

* Implement the 'trim' fstab option, allow trim to be specified in the fstab
  instead of requiring a rc.conf option.

* The trim option no longer exits with an error if the device does not
  support TRIM or TRIM is not enabled.

4 years agokernel/acpi_thermal: Improve hw.acpi.thermal.polling_rate sysctl behaviour
Imre Vadász [Sat, 16 May 2015 17:49:39 +0000 (19:49 +0200)]
kernel/acpi_thermal: Improve hw.acpi.thermal.polling_rate sysctl behaviour

* No longer allow setting hw.acpi.thermal.polling_rate to negative or to
  meaninglessly large values of more than 3600s.

* Wake up the acpi_tz_thread after changing hw.acpi.thermal.polling_rate,
  to wake it up when hw.acpi.thermal.polling_rate was set to 0 (i.e.
  disabled polling) or a very large value before.

4 years agosysctl_add_oid.9: Document the "IK" sysctl oid format.
Imre Vadasz [Sat, 16 May 2015 19:03:07 +0000 (21:03 +0200)]
sysctl_add_oid.9: Document the "IK" sysctl oid format.

4 years agokernel/acpi_fadt: Allow FADT revision 6.
Sascha Wildner [Sat, 16 May 2015 10:17:26 +0000 (12:17 +0200)]
kernel/acpi_fadt: Allow FADT revision 6.

4 years agoSync ACPICA with Intel's version 20150515.
Sascha Wildner [Sat, 16 May 2015 08:06:04 +0000 (10:06 +0200)]
Sync ACPICA with Intel's version 20150515.

General changes:

* Runtime argument checking and return value checking for all new
  ACPI 6.0 predefined names.

iasl(8) and other tools specific changes:

* Added support for all new ACPI 6.0 predefined names and tables and
  for changes to existing tables (FADT, MADT).

* Added a new directive to enable inclusion of binary objects into
  ASL code, #includebinary.

* Add support for all new ACPI 6.0 predefined names to acpihelp(8).

* Add new options -d (display iASL preprocessor directives) and
  -t (display all known/supported ACPI tables) to acpihelp(8).

For a more detailed list, please see sys/contrib/dev/acpica/changes.txt.

4 years agolibm: Add a missing closing comment (fixes -Wcomment).
Sascha Wildner [Fri, 15 May 2015 16:44:55 +0000 (18:44 +0200)]
libm: Add a missing closing comment (fixes -Wcomment).

4 years agolibc: Make generation of nslexer.c more robust.
Sascha Wildner [Fri, 15 May 2015 16:43:17 +0000 (18:43 +0200)]
libc: Make generation of nslexer.c more robust.

Quoting FreeBSD's r268620 commit msg:

Ensure that lex errors fail the build instead of being silently ignored
due to the piped call.  Also postpone the update of the nslexer.c file
until we are sure we have generated it properly.

[...]

In DragonFly, this issue was causing a buildworld to stall if certain
-W... warning options were added.

Taken-from: FreeBSD

4 years agodimm: Allow increasing internal ECC error counter, instead of setting
Sepherosa Ziehau [Thu, 14 May 2015 15:42:12 +0000 (23:42 +0800)]
dimm: Allow increasing internal ECC error counter, instead of setting

4 years agoecc/e5: Fix error processing on attach path
Sepherosa Ziehau [Thu, 14 May 2015 13:44:39 +0000 (21:44 +0800)]
ecc/e5: Fix error processing on attach path

4 years agodimm: Allow ECC error threshold to be configured
Sepherosa Ziehau [Thu, 14 May 2015 13:31:48 +0000 (21:31 +0800)]
dimm: Allow ECC error threshold to be configured

4 years agodimm/ecc: Send devctl notify if there are too many ECC errors
Sepherosa Ziehau [Thu, 14 May 2015 13:15:29 +0000 (21:15 +0800)]
dimm/ecc: Send devctl notify if there are too many ECC errors

4 years agosys/vfs/tmpfs: Remove duplicated cross-device check on nlink vop
Tomohiro Kusumi [Wed, 13 May 2015 21:54:24 +0000 (06:54 +0900)]
sys/vfs/tmpfs: Remove duplicated cross-device check on nlink vop

- 'if (dvp->v_mount != vp->v_mount)' which avoids cross-device
  hard link appears twice in this function after this one.

- Maybe this should be done in sys/kern/vfs_vopops.c considering
  fs that implement nlink have the same check (not sure if it
  should be applied to all fs though  e.g. unionfs).

  # grep -rIl EXDEV sys/vfs/
  sys/vfs/smbfs/smbfs_vnops.c
  sys/vfs/union/union_vnops.c
  sys/vfs/tmpfs/tmpfs_vnops.c
  sys/vfs/dirfs/dirfs_vnops.c
  sys/vfs/nfs/nfs_serv.c
  sys/vfs/nfs/nfs_vnops.c
  sys/vfs/hammer2/hammer2_vnops.c
  sys/vfs/puffs/puffs_vfsops.c
  sys/vfs/puffs/puffs_vnops.c
  sys/vfs/ufs/ufs_vnops.c
  sys/vfs/msdosfs/msdosfs_vnops.c
  sys/vfs/hammer/hammer_vnops.c

4 years agosys/vfs/tmpfs: Add comment
Tomohiro Kusumi [Wed, 13 May 2015 01:36:09 +0000 (10:36 +0900)]
sys/vfs/tmpfs: Add comment

- VTOI() was added for userspace (usr.bin/fstat/tmpfs.c).

4 years agoAnsify a few functions.
Sascha Wildner [Wed, 13 May 2015 19:32:07 +0000 (21:32 +0200)]
Ansify a few functions.

4 years agoipfw3: Indent two switch()es better and add braces to while().
Sascha Wildner [Wed, 13 May 2015 17:59:49 +0000 (19:59 +0200)]
ipfw3: Indent two switch()es better and add braces to while().

4 years agosystat/sensors: Filter sensors based on sensor device name
Sepherosa Ziehau [Wed, 13 May 2015 11:25:31 +0000 (19:25 +0800)]
systat/sensors: Filter sensors based on sensor device name

4 years agosystat/sensors: Filter sensors based on sensor type
Sepherosa Ziehau [Wed, 13 May 2015 11:24:36 +0000 (19:24 +0800)]
systat/sensors: Filter sensors based on sensor type

4 years agosensor: Add ECC sensor type
Sepherosa Ziehau [Wed, 13 May 2015 11:24:03 +0000 (19:24 +0800)]
sensor: Add ECC sensor type

4 years agokernel - Improve cpu topology text output
Matthew Dillon [Tue, 12 May 2015 22:58:54 +0000 (15:58 -0700)]
kernel - Improve cpu topology text output

* Fix a bug the cpu range display to properly
  display e.g. cpu 3 through cpu 3 as cpu 3 instead
  of cpu 3-3.

* Makes sysctl hw.cpu_topology more readable.

4 years agosys/vfs/tmpfs: Remove nested #ifdef _KERNEL
Tomohiro Kusumi [Tue, 12 May 2015 18:59:04 +0000 (03:59 +0900)]
sys/vfs/tmpfs: Remove nested #ifdef _KERNEL

- #ifdef _KERNEL around function prototypes for tmpfs_subr.c
  is nested. It's in another #ifdef _KERNEL.

4 years agocryptsetup(8): Remove -std=gcc89 and make getline()'s prototype visible.
Sascha Wildner [Tue, 12 May 2015 20:25:07 +0000 (22:25 +0200)]
cryptsetup(8): Remove -std=gcc89 and make getline()'s prototype visible.

4 years agosys/vfs/tmpfs: Rename ROOTINO to TMPFS_ROOTINO
Tomohiro Kusumi [Tue, 12 May 2015 01:49:38 +0000 (10:49 +0900)]
sys/vfs/tmpfs: Rename ROOTINO to TMPFS_ROOTINO

- Rename it so that the utility program can distinguish it from UFS's
  ROOTINO when they need to include filesystem headers possibly in the
  future.

4 years agoRevert this commit to avoid a possible complaint by compiler when
Tomohiro Kusumi [Tue, 12 May 2015 01:10:45 +0000 (10:10 +0900)]
Revert this commit to avoid a possible complaint by compiler when
INVARIANTS is not set which leaves code 'if(cond);'.
Spotted-by: dillon
Revert "sys/vfs/tmpfs: Cleanups"

This reverts commit 215b902242b386e5a01c72d8245df7535bed0bd0.

4 years agoIt only exceeds the limit by small number, so it's ok to do this without a lock.
Tomohiro Kusumi [Tue, 12 May 2015 00:58:57 +0000 (09:58 +0900)]
It only exceeds the limit by small number, so it's ok to do this without a lock.
Take performance than exact accuracy of the #.
Spotted-by: dillon
Revert "sys/vfs/tmpfs: Lock tmpfs_mount member"

This reverts commit 8c24f24ee096861731f6e5a082e22370a972701c.

4 years agoReverting series of commits (1/2 and 2/2) since they introduce
Tomohiro Kusumi [Tue, 12 May 2015 00:57:44 +0000 (09:57 +0900)]
Reverting series of commits (1/2 and 2/2) since they introduce
performance degrade.
'if ((node->tn_status & TMPFS_NODE_ACCESSED) == 0) {'
can be done without inode lock and helps performance.

Spotted-by: dillon
Revert "sys/vfs/tmpfs: Make flag handling consistent [1/2]"

This reverts commit e6db94b29aacbd288774574b1967828c8c07c013.

4 years agoReverting series of commits (1/2 and 2/2) since they introduce
Tomohiro Kusumi [Tue, 12 May 2015 00:49:45 +0000 (09:49 +0900)]
Reverting series of commits (1/2 and 2/2) since they introduce
performance degrade.
'if ((node->tn_status & TMPFS_NODE_ACCESSED) == 0) {'
can be done without inode lock and helps performance.

Spotted-by: dillon
Revert "sys/vfs/tmpfs: Make flag handling consistent [2/2]"

This reverts commit c595728587e3d04ed27f9c275bddd0eafd6427ce.

4 years agosys/vfs/tmpfs: Bring in a macro from UFS
Tomohiro Kusumi [Mon, 11 May 2015 15:20:02 +0000 (00:20 +0900)]
sys/vfs/tmpfs: Bring in a macro from UFS

- Bring in ROOTINO macro from UFS whose root inode# also starts from 2.

4 years agoipfw3(8): Small indent adjustment.
Sascha Wildner [Mon, 11 May 2015 11:18:47 +0000 (13:18 +0200)]
ipfw3(8): Small indent adjustment.

4 years agoFix: buf size issue in do_get/set_x
Bill Yuan [Mon, 11 May 2015 07:32:21 +0000 (15:32 +0800)]
Fix: buf size issue in do_get/set_x

4 years agoLicense: Preserve previous licensor information
Bill Yuan [Mon, 11 May 2015 06:40:43 +0000 (14:40 +0800)]
License: Preserve previous licensor information

4 years agohammer - Avoid panic in particular corruption situations
Matthew Dillon [Mon, 11 May 2015 02:51:18 +0000 (19:51 -0700)]
hammer - Avoid panic in particular corruption situations

This commit fixes two panics which can arise from attempting to access a
corrupted filesystem.  It does not fix the issue that led to the corruption
in the first place (which we believe might have been GPU-related random
memory corruption on a particular machine).  It allows the filesystem to
continue to operate so it can be spooled off and reformatted.

* Do not panic on a NULL pointer dereference if a cursor iteration
  fails due to corruption.

* Do not panic during a flush on a sequence space error if the filesystem
  has been forced into read-only mode (which prevents older sequence spaces
  from being flushed).

Reported-by: Sephe
4 years agosys/kern: Remove trailing ; from DO_OPS()
Tomohiro Kusumi [Sun, 10 May 2015 17:17:57 +0000 (02:17 +0900)]
sys/kern: Remove trailing ; from DO_OPS()

- The trailing ; is redundant.

4 years agosys/kern: Fix comments
Tomohiro Kusumi [Sun, 10 May 2015 16:56:43 +0000 (01:56 +0900)]
sys/kern: Fix comments

- hunk1 - Add missing MPSAFE comment.

- hunk2 - It actually acquires per-mount-token and get_mplock();
  although it says get_mplock(); is /* TEMPORARY */.
  See sys/sys/mount.h.

4 years agosys/sys: Rename VFS_MPLOCK1 to VFS_MPLOCK
Tomohiro Kusumi [Sat, 9 May 2015 22:45:08 +0000 (07:45 +0900)]
sys/sys: Rename VFS_MPLOCK1 to VFS_MPLOCK

- The previous commit has removed VFS_MPLOCK2 macro.

- VFS_MPLOCK1 is the only VFS_MPLOCK* macro now, so strip '1'
  from VFS_MPLOCK1. It's confusing with '1' since VFS_MPUNLOCK
  has no '1' as well with no numbered variants.

4 years agosys/sys: Remove VFS_MPLOCK2 macro
Tomohiro Kusumi [Sat, 9 May 2015 21:28:25 +0000 (06:28 +0900)]
sys/sys: Remove VFS_MPLOCK2 macro

- Not only vfs and filesystems are NOT using this macro,
  but also this macro doesn't work given that

- The local variable 'xlock_mpsafe' (which is visibly hidden
  from vfs C code) is being used without initializing, while
  this header doesn't provide a macro to initialze it.
  (even if it did provide the purpose of VFS_MPLOCK2 isn't
  very clear either).

- VFS_MPLOCK1 is the only one that works as expected and all
  the syscalls actually use this. Replacing VFS_MPLOCK1 with
  VFS_MPLOCK2 results compile error with -Werror=uninitialized.

  error: 'xlock_mpsafe' is used uninitialized in this function
  [-Werror=uninitialized]
      if (xlock_mpsafe) {

4 years agoFix LINT64 build.
Sascha Wildner [Sun, 10 May 2015 07:03:28 +0000 (09:03 +0200)]
Fix LINT64 build.

4 years agoClean up some more signal handlers in various places.
Sascha Wildner [Sun, 10 May 2015 05:07:12 +0000 (07:07 +0200)]
Clean up some more signal handlers in various places.

4 years agosail(6): Clean up some signal handlers.
Sascha Wildner [Sun, 10 May 2015 03:29:17 +0000 (05:29 +0200)]
sail(6): Clean up some signal handlers.

4 years agoStop using 'union wait' for the status of wait*() in a few places.
Sascha Wildner [Sun, 10 May 2015 02:21:02 +0000 (04:21 +0200)]
Stop using 'union wait' for the status of wait*() in a few places.

It is deprecated old 4.3BSD compatibility stuff and will soon go away.

4 years agodrm: less verbose prints with DRM_DEBUG option
zrj [Sat, 9 May 2015 10:07:07 +0000 (13:07 +0300)]
drm: less verbose prints with DRM_DEBUG option

Old behaviour can be used with 'options DRM_DEBUG=2'

4 years agodrm: Start using kcalloc()
François Tigeot [Sat, 9 May 2015 08:54:30 +0000 (10:54 +0200)]
drm: Start using kcalloc()

Reducing differences with Linux and fixing a few bugs where allocated
memory was not properly zeroed.

4 years agodrm: Implement kcalloc()
François Tigeot [Sat, 9 May 2015 08:26:29 +0000 (10:26 +0200)]
drm: Implement kcalloc()

4 years agonrelease: Fix for empty DPORTS_PACKAGES.
Sascha Wildner [Sat, 9 May 2015 00:20:46 +0000 (02:20 +0200)]
nrelease: Fix for empty DPORTS_PACKAGES.

Also fix up the previously existing 'nopkgs' target and document it.

Reported-by: Rimvydas Jasinskas <rimvydas.jasinskas@gmail.com>
4 years agosys/vfs/tmpfs: Make flag handling consistent [2/2]
Tomohiro Kusumi [Fri, 8 May 2015 11:33:07 +0000 (20:33 +0900)]
sys/vfs/tmpfs: Make flag handling consistent [2/2]

- Remove unnecessary unlock/lock after the previous commit.

4 years agosys/vfs/tmpfs: Make flag handling consistent [1/2]
Tomohiro Kusumi [Fri, 8 May 2015 11:19:09 +0000 (20:19 +0900)]
sys/vfs/tmpfs: Make flag handling consistent [1/2]

- Not taking inode lock on if-test for inode status introduces
  a potential race.

- Above race is basically harmless though since if-test itself
  was redundant and basically results the same with or without it.
  So get rid of it and keep the |= part with inode lock.

4 years agosys/vfs/tmpfs: Cleanups
Tomohiro Kusumi [Fri, 8 May 2015 10:48:47 +0000 (19:48 +0900)]
sys/vfs/tmpfs: Cleanups

- hunk1 - Remove unnecessary #if0/endif.

- hunk2 - Remove unnecessary goto.

4 years agoagp: Remove support for pre-amd64 ALI, AMD, ATI and Nvidia chipsets
François Tigeot [Fri, 8 May 2015 12:14:01 +0000 (14:14 +0200)]
agp: Remove support for pre-amd64 ALI, AMD, ATI and Nvidia chipsets

These chipsets were paired with i386-only CPUs and thus have no
chance of ever being used on DragonFly anymore.

4 years agodrm/i915: Update to Linux 3.14
François Tigeot [Fri, 8 May 2015 07:25:57 +0000 (08:25 +0100)]
drm/i915: Update to Linux 3.14

Changes specific to the DragonFly driver:

* Most GEM code paths are now similar to Linux, leading to increased
  stability and performance.
  Making this change was greatly helped by studying the OpenBSD code.

* We were previously using legacy functions to set up page table entries and
  this was starting to become a serious problem on particular platforms such
  as gen4 or Broadwell. As of this commit, we now use the same chip-specific
  virtual functions as Linux.

* RC6 and Frame Buffer Compression power savings enabled by default, depending
  on the GPU family

Changes brought by the Linux 3.11 => 3.14 driver update:

* Various bug fixes on all GPU generations, especially stability improvements

* Power consumption improvements

* Many Valleyview/Baytrail support improvements

* The giant 128MB L4 cache is now enabled when present on Haswell

* Added support for Broadwell GPUs

* HDMI 4K support

* basic support for 3D/stereo displays on HDMI

4 years agoagp: Fix install_gtt_pte functions
François Tigeot [Fri, 8 May 2015 06:22:24 +0000 (08:22 +0200)]
agp: Fix install_gtt_pte functions

Some chips used the wrong functions and some chip-specific install_gtt_pte
functions were buggy.

Fix both issues.

4 years agoagp: Add Broadwell support
Matthew Dillon [Fri, 8 May 2015 06:17:24 +0000 (08:17 +0200)]
agp: Add Broadwell support

4 years agoinstaller: Add missing dir to install.
Sascha Wildner [Thu, 7 May 2015 16:45:41 +0000 (18:45 +0200)]
installer: Add missing dir to install.

4 years agosys/vfs/tmpfs: Fix lock ordering
Tomohiro Kusumi [Thu, 7 May 2015 15:33:43 +0000 (00:33 +0900)]
sys/vfs/tmpfs: Fix lock ordering

- Get locks in consistent order (dnode -> node).

4 years agokernel/acpi: Remove some local changes from a no-longer used file.
Sascha Wildner [Wed, 6 May 2015 21:26:42 +0000 (23:26 +0200)]
kernel/acpi: Remove some local changes from a no-longer used file.

4 years agosys/vfs/tmpfs: Fix typo
Tomohiro Kusumi [Wed, 6 May 2015 16:09:23 +0000 (01:09 +0900)]
sys/vfs/tmpfs: Fix typo

- Flush all vnodes on unmount(2).

4 years agosys/vfs/tmpfs: Fix assertion
Tomohiro Kusumi [Wed, 6 May 2015 16:03:09 +0000 (01:03 +0900)]
sys/vfs/tmpfs: Fix assertion

- It's always expected to be 2.

4 years agobsd-family-tree: Sync with FreeBSD.
Sascha Wildner [Wed, 6 May 2015 16:40:56 +0000 (18:40 +0200)]
bsd-family-tree: Sync with FreeBSD.

* DragonFly 4.0.2 to 4.0.5

* OpenBSD 5.7

* The Design and Implementation of the FreeBSD Operating System, 2nd Ed.

4 years agocoretemp: Add 'temp' to sensor description.
Sepherosa Ziehau [Tue, 5 May 2015 14:19:36 +0000 (22:19 +0800)]
coretemp: Add 'temp' to sensor description.