dragonfly.git
4 years agoetc/Makefile: Better handle removal of /var/db/entropy as a file.
Sascha Wildner [Sun, 28 Jul 2019 11:09:49 +0000 (13:09 +0200)]
etc/Makefile: Better handle removal of /var/db/entropy as a file.

Move it to the place where other such cases are handled.

4 years ago<vfs/hammer2/hammer2.h>: Fix buildworld after 120385e8e4086a3b.
Sascha Wildner [Sun, 28 Jul 2019 10:32:03 +0000 (12:32 +0200)]
<vfs/hammer2/hammer2.h>: Fix buildworld after 120385e8e4086a3b.

4 years ago<sys/buf2.h>: Remove a number of unneeded #include's.
Sascha Wildner [Sun, 28 Jul 2019 09:46:14 +0000 (11:46 +0200)]
<sys/buf2.h>: Remove a number of unneeded #include's.

Only <sys/buf.h> is actually needed for the header.

Adjust some kernel files accordingly.

4 years agobuild - Update pkg-static to version 03, bootstrap https
Matthew Dillon [Sun, 28 Jul 2019 04:42:23 +0000 (21:42 -0700)]
build - Update pkg-static to version 03, bootstrap https

* There appears to be a database versioning issue between pkg-static
  and pkg on master, re-synchronize the pkg-static tarball.

* Currently the pkg bootstrap installs a df-latest.conf with
  http:// paths instead of https:// paths, because it doesn't
  have the CA root.

  After installing pkg, Makefile.usr now also installs ca_root_nss
  and then copies the df-latest.conf.sample file to df-latest.conf,
  thus installing the official df-latest.conf using https.

* Note that this sequence is not entirely safe because the initial
  bootstrap will be insecure if the CA root certificates are not
  already installed.  They should be installed by our official images,
  but will not be (currently) if one creates an absolutely pristine
  base system with installworld/installkernel/distribution.

  The bootstrap should now work in both situations, but we really
  need to include root certs in the base system I think.

4 years agosys/vfs/hammer2: Update ascii-art/comments in hammer2_disk.h
Tomohiro Kusumi [Thu, 25 Jul 2019 20:43:22 +0000 (05:43 +0900)]
sys/vfs/hammer2: Update ascii-art/comments in hammer2_disk.h

Update old comments written when ondisk layout wasn't stable.

4 years agokmalloc.9: Mention M_CACHEALIGN.
Sascha Wildner [Sat, 27 Jul 2019 13:30:17 +0000 (15:30 +0200)]
kmalloc.9: Mention M_CACHEALIGN.

While here, move the examples to an EXAMPLES section.

4 years agokernel - Replace kmalloc_cachealign() with kmalloc(... M_CACHEALIGN)
Matthew Dillon [Thu, 25 Jul 2019 17:30:00 +0000 (10:30 -0700)]
kernel - Replace kmalloc_cachealign() with kmalloc(... M_CACHEALIGN)

* Add M_CACHEALIGN, which ensures that the result is aligned to
  a cache line.

* Remove kmalloc_cachealign(), replacing all uses with kmalloc
  using M_CACHEALIGN.

4 years agosbin/mount_hammer2: Fix perror(3) message
Tomohiro Kusumi [Thu, 25 Jul 2019 14:16:17 +0000 (23:16 +0900)]
sbin/mount_hammer2: Fix perror(3) message

": " is added by perror(3) itself.

4 years agosbin/hammer2: Add missing info for "show"
Tomohiro Kusumi [Thu, 25 Jul 2019 12:08:45 +0000 (21:08 +0900)]
sbin/hammer2: Add missing info for "show"

Add missing inode fields.
Also add blockref count for indirect blocks (i.e. not necessarily 4).

4 years agousr.sbin/fstyp: Minor fix for HAMMER2
Tomohiro Kusumi [Wed, 24 Jul 2019 15:43:42 +0000 (00:43 +0900)]
usr.sbin/fstyp: Minor fix for HAMMER2

4 years agosbin/hammer2: Add missing inode fields (0x0084-) for printinode
Tomohiro Kusumi [Wed, 24 Jul 2019 15:31:16 +0000 (00:31 +0900)]
sbin/hammer2: Add missing inode fields (0x0084-) for printinode

4 years agolibefivar: Remove unused PACKAGE from Makefile.
Sascha Wildner [Wed, 24 Jul 2019 00:23:22 +0000 (02:23 +0200)]
libefivar: Remove unused PACKAGE from Makefile.

4 years agousr.bin/kcollect - Rework the hosthame mismatch cases a bit
Antonio Huete Jimenez [Tue, 23 Jul 2019 23:18:52 +0000 (01:18 +0200)]
usr.bin/kcollect - Rework the hosthame mismatch cases a bit

- Fix a bug where it was not possible to show data from
  another host.
- Showing host live data won't be possible if there is a hostname
  mismatch between the DB and the host reading from it.

4 years agokcollect(8) - Add a description of the output fields.
Antonio Huete Jimenez [Tue, 23 Jul 2019 18:38:02 +0000 (20:38 +0200)]
kcollect(8) - Add a description of the output fields.

4 years agousr.bin/kcollect - Cleanup prototypes a bit.
Antonio Huete Jimenez [Tue, 23 Jul 2019 11:31:53 +0000 (13:31 +0200)]
usr.bin/kcollect - Cleanup prototypes a bit.

4 years agosbin/hammer2: Update printinode
Tomohiro Kusumi [Mon, 22 Jul 2019 20:42:58 +0000 (05:42 +0900)]
sbin/hammer2: Update printinode

Hasn't been updated since 2015.

4 years agousr.sbin/fstyp: Add -l option support for HAMMER2
Tomohiro Kusumi [Mon, 22 Jul 2019 16:38:30 +0000 (01:38 +0900)]
usr.sbin/fstyp: Add -l option support for HAMMER2

4 years agosbin/hammer2: Minor fix
Tomohiro Kusumi [Mon, 22 Jul 2019 16:34:55 +0000 (01:34 +0900)]
sbin/hammer2: Minor fix

4 years agolibcrypto: Remove two no longer needed .PATHs.
Sascha Wildner [Mon, 22 Jul 2019 23:03:07 +0000 (01:03 +0200)]
libcrypto: Remove two no longer needed .PATHs.

4 years agoprintf.3: .Fa -> .Dv
Sascha Wildner [Mon, 22 Jul 2019 16:19:49 +0000 (18:19 +0200)]
printf.3: .Fa -> .Dv

4 years agosys/vfs/hammer2: Add XXX for obsolete comments on hardlink
Tomohiro Kusumi [Mon, 22 Jul 2019 02:11:08 +0000 (11:11 +0900)]
sys/vfs/hammer2: Add XXX for obsolete comments on hardlink

4 years agokernel/drm: Various cleanups.
Sascha Wildner [Mon, 22 Jul 2019 14:54:59 +0000 (16:54 +0200)]
kernel/drm: Various cleanups.

* Change further references for the radeonkms.ko -> radeon.ko renaming.

* Remove no longer needed iicbus_if.h from Makefile.

* Cleanup radeon Makefile.

4 years agolibldns: Remove local copy of ldns.h.
Sascha Wildner [Mon, 22 Jul 2019 10:58:18 +0000 (12:58 +0200)]
libldns: Remove local copy of ldns.h.

It's identical to the version in contrib/.

4 years agoboot/stand.h: Remove zipfs_fsops extern.
Sascha Wildner [Mon, 22 Jul 2019 10:57:28 +0000 (12:57 +0200)]
boot/stand.h: Remove zipfs_fsops extern.

It was forgotten in f6f7cf3446e6c5f6332bcbf0ec9c442b38ac8652.

4 years agowho/utmpentry: Remove duplicate include and sort better.
Sascha Wildner [Mon, 22 Jul 2019 08:37:35 +0000 (10:37 +0200)]
who/utmpentry: Remove duplicate include and sort better.

4 years agoFix up recent entropy file commits.
Sascha Wildner [Mon, 22 Jul 2019 07:11:02 +0000 (09:11 +0200)]
Fix up recent entropy file commits.

* Use spaces, not tabs, in mtree files (see README).

* Move file to the right place in Makefile_upgrade.inc.

4 years agosbin/newfs_hammer2: Drop obsolete comment on inode
Tomohiro Kusumi [Sun, 21 Jul 2019 19:54:16 +0000 (04:54 +0900)]
sbin/newfs_hammer2: Drop obsolete comment on inode

Drop comment from 2012. Inode is 1024 bytes now.

4 years agosys/vfs/hammer2: Fix comments on HAMMER2_FREEMAP_LEVEL*_RADIX
Tomohiro Kusumi [Sun, 21 Jul 2019 19:53:34 +0000 (04:53 +0900)]
sys/vfs/hammer2: Fix comments on HAMMER2_FREEMAP_LEVEL*_RADIX

Also see 5cebbe36266c384e5bb3f6a9a2364cdd7d750fe1.

4 years agoworld - Change entropy file location (2)
Matthew Dillon [Mon, 22 Jul 2019 05:33:46 +0000 (22:33 -0700)]
world - Change entropy file location (2)

* Fix missing parenthesis

Reported-by: Aaron LI
4 years agodebug - Adjust vmpageinfo
Matthew Dillon [Mon, 22 Jul 2019 04:46:06 +0000 (21:46 -0700)]
debug - Adjust vmpageinfo

* Add the pmap writeable_count and pmap_count to the output.

4 years agoworld - Change entropy file location
Matthew Dillon [Mon, 22 Jul 2019 02:36:09 +0000 (19:36 -0700)]
world - Change entropy file location

* Move entropy to the file /var/db/entropy/reboot, set entropy_dir
  default to /var/db/entropy.

* The 'reboot' file is written out on reboot by default.

* Any file in /var/db/entropy will be added to the entropy on boot.
  (this was already operational)

4 years agohier.7: Mention /var/run/shm.
Sascha Wildner [Sun, 21 Jul 2019 17:50:55 +0000 (19:50 +0200)]
hier.7: Mention /var/run/shm.

4 years agoRemove rdate(8).
Sascha Wildner [Sun, 21 Jul 2019 16:36:17 +0000 (18:36 +0200)]
Remove rdate(8).

It is of little use in base, with dntpd(8) around, and a more up to date
version is in dports (sysutils/rdate).

4 years agodrm/linux: Port kfifo.h to DragonFly
François Tigeot [Sat, 20 Jul 2019 15:23:48 +0000 (17:23 +0200)]
drm/linux: Port kfifo.h to DragonFly

4 years agodrm/linux: Import linux/kfifo.h from NetBSD
François Tigeot [Sat, 20 Jul 2019 15:22:34 +0000 (17:22 +0200)]
drm/linux: Import linux/kfifo.h from NetBSD

4 years agosys/vfs/hammer2: Minor cleanup
Tomohiro Kusumi [Fri, 19 Jul 2019 15:52:18 +0000 (00:52 +0900)]
sys/vfs/hammer2: Minor cleanup

H2 code always uses typedef'd if exists.

4 years agokernel - Fix rare NFS deadlock
Matthew Dillon [Sat, 20 Jul 2019 04:15:27 +0000 (21:15 -0700)]
kernel - Fix rare NFS deadlock

* Fix a rare NFS deadlock which can occur on UIO_NOCOPY reads
  (memory mapped accesses).  VOP_GETATTR cannot be safely called
  in this situation without deadlocking against the VM system.

4 years agokernel - Fix panic related to USB cd
Matthew Dillon [Fri, 19 Jul 2019 01:33:49 +0000 (18:33 -0700)]
kernel - Fix panic related to USB cd

* The callouts managed by scsi/scsi_cd.c need to hold the SIM
  lock.

* Fixes an assertion (SIM lock not held).

4 years ago<signal.h> has to and does provide pid_t, so we can also use it.
Sascha Wildner [Tue, 16 Jul 2019 15:57:11 +0000 (17:57 +0200)]
<signal.h> has to and does provide pid_t, so we can also use it.

4 years agodrm/radeon: Update to Linux 4.4.180
François Tigeot [Mon, 15 Jul 2019 20:32:07 +0000 (22:32 +0200)]
drm/radeon: Update to Linux 4.4.180

* Bugfixes and workaround for hardware issues, including
  quirks for various R7 370 and R9 270 models

* VT switching fixes from dillon@

* Fan management improvements

* Improved support for 120+ Hz monitors

4 years agodrm: Remove no longer required iic code and dependencies
François Tigeot [Mon, 15 Jul 2019 19:52:32 +0000 (21:52 +0200)]
drm: Remove no longer required iic code and dependencies

4 years agodrm: Improve linux/pci.h
François Tigeot [Mon, 15 Jul 2019 19:09:26 +0000 (21:09 +0200)]
drm: Improve linux/pci.h

4 years agokcollect - Add hostname to .db file (2)
Matthew Dillon [Mon, 15 Jul 2019 18:21:21 +0000 (11:21 -0700)]
kcollect - Add hostname to .db file (2)

* Remove debugging printf().

4 years agokcollect - Add hostname to .db file
Matthew Dillon [Mon, 15 Jul 2019 18:19:42 +0000 (11:19 -0700)]
kcollect - Add hostname to .db file

* Use HEADER2 to indicate the hostname.

* Parse 8 HEADER%d fields generically.

* Automatically update missing or changed header fields in the database.

4 years agoUpdate the pciconf(8) database.
Sascha Wildner [Mon, 15 Jul 2019 07:21:02 +0000 (09:21 +0200)]
Update the pciconf(8) database.

June 30, 2019 snapshot from https://pci-ids.ucw.cz

4 years agousr.bin/kcollect - Add O flag
Antonio Huete Jimenez [Sun, 14 Jul 2019 19:26:50 +0000 (21:26 +0200)]
usr.bin/kcollect - Add O flag

- The O flag will allow to specify the output format for the
  kcollect data entries.
- Introduce a new output format: InfluxDB. This will try to
  output the statistics in a influxdb line protocol compatible
  format. Please note that this is experimental and subject to
  change in the future.

4 years agosys/vfs/hammer2: Drop obsolete comments on attr_tid/dirent_tid
Tomohiro Kusumi [Sun, 14 Jul 2019 18:24:24 +0000 (03:24 +0900)]
sys/vfs/hammer2: Drop obsolete comments on attr_tid/dirent_tid

Removed in 7fece146f268d677c46bde997079860f4cf553d0 in 2016.

4 years agotelnetd(8): Little followup fix to 0ba3ecdcefa6c94daf.
Sascha Wildner [Sun, 14 Jul 2019 17:19:47 +0000 (19:19 +0200)]
telnetd(8): Little followup fix to 0ba3ecdcefa6c94daf.

4 years agoRemove a few unneeded inclusions of <utmp.h>.
Sascha Wildner [Sun, 14 Jul 2019 11:29:20 +0000 (13:29 +0200)]
Remove a few unneeded inclusions of <utmp.h>.

4 years agotelnetd(8): Add wtmpx support and clean up a bit.
Sascha Wildner [Sun, 14 Jul 2019 09:19:49 +0000 (11:19 +0200)]
telnetd(8): Add wtmpx support and clean up a bit.

4 years agodate(1): Log to wtmpx too.
Sascha Wildner [Sat, 13 Jul 2019 13:41:28 +0000 (15:41 +0200)]
date(1): Log to wtmpx too.

As described in the wtmpx(5) manual page. Also add SUPPORT_UTMP{,X}
checks in preparation for us eventually moving to {u,w}tmpx only.

4 years agolast(1): Fix typo in an error msg.
Sascha Wildner [Sat, 13 Jul 2019 11:27:04 +0000 (13:27 +0200)]
last(1): Fix typo in an error msg.

4 years agoi386 removal, part 73/x: Remove the ancient nextboot(8) command.
Sascha Wildner [Sat, 13 Jul 2019 02:04:18 +0000 (04:04 +0200)]
i386 removal, part 73/x: Remove the ancient nextboot(8) command.

See FreeBSD's r97957.

Reported-by: aly
4 years agokernel/netgraph7: Fix build.
Sascha Wildner [Thu, 11 Jul 2019 16:54:31 +0000 (18:54 +0200)]
kernel/netgraph7: Fix build.

4 years agokernel - Zen 2 - Make sure %fs's selector is loaded in AP bootstrap
Matthew Dillon [Thu, 11 Jul 2019 06:57:02 +0000 (23:57 -0700)]
kernel - Zen 2 - Make sure %fs's selector is loaded in AP bootstrap

* Issue load_fs() in the AP bootstrap.  It appears that Zen 2 handles
  %fs in a weird way when the selector isn't loaded, causing the first
  wrmsr(MSR_FSBASE) to quietly fail, and possibly others too.

* For good measure, also issue load_ds() and load_es().

* Fixes DragonFlyBSD's boot on Zen 2.

4 years agokernel/netgraph7: Remove unneeded __va_*() definitions.
Sascha Wildner [Wed, 10 Jul 2019 19:26:53 +0000 (21:26 +0200)]
kernel/netgraph7: Remove unneeded __va_*() definitions.

4 years agokernel/hammer2: Use <sys/stdarg.h> in the kernel, not <stdarg.h>.
Sascha Wildner [Wed, 10 Jul 2019 19:25:35 +0000 (21:25 +0200)]
kernel/hammer2: Use <sys/stdarg.h> in the kernel, not <stdarg.h>.

4 years agoACPICA: Remove unneeded __va_*() definitions, include <sys/stdarg.h>.
Sascha Wildner [Wed, 10 Jul 2019 19:25:14 +0000 (21:25 +0200)]
ACPICA: Remove unneeded __va_*() definitions, include <sys/stdarg.h>.

4 years agokernel/drm: Use va_*() instead of __va_*(), just like upstream.
Sascha Wildner [Wed, 10 Jul 2019 19:23:24 +0000 (21:23 +0200)]
kernel/drm: Use va_*() instead of __va_*(), just like upstream.

4 years agopfctl(8): -DPFDEBUG can be used too now for pfctl(8).
Sascha Wildner [Wed, 10 Jul 2019 19:22:46 +0000 (21:22 +0200)]
pfctl(8): -DPFDEBUG can be used too now for pfctl(8).

Adding <sys/stdarg.h> fixed compilation with it and as far as I can see
there are a few places where it should give debug info from pfctl(8)
too.

4 years agoMake va_*() macros available to the kernel in <sys/stdarg.h>.
Sascha Wildner [Wed, 10 Jul 2019 18:41:14 +0000 (20:41 +0200)]
Make va_*() macros available to the kernel in <sys/stdarg.h>.

Previously, the kernel was restricted to __va_*() only but I can't see
any real reason to do that and it also forces stuff like ACPICA and
drm to use workarounds. Those will be cleaned up in subsequent commits.

For now, I've used <sys/stdarg.h>, because everything resolves to
__builtin_va*() in the end. If we ever need more machine specific
definitions, it has to be moved to <machine/stdarg.h>.

4 years agoSync ACPICA with Intel's version 20190703.
Sascha Wildner [Wed, 10 Jul 2019 18:26:51 +0000 (20:26 +0200)]
Sync ACPICA with Intel's version 20190703.

* Remove legacy module-level support code.

* Clear status of GPEs on first direct enable.

* Various improvements to iasl(8).

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

4 years agokcollect(8) - Fix mandoc -Tlint
Antonio Huete Jimenez [Sun, 7 Jul 2019 19:30:36 +0000 (21:30 +0200)]
kcollect(8) - Fix mandoc -Tlint

4 years agousr.bin/kcollect - Add F flag
Antonio Huete Jimenez [Sun, 7 Jul 2019 19:02:35 +0000 (21:02 +0200)]
usr.bin/kcollect - Add F flag

- '-F' option works like '-f' option but it does not show the whole
  kcollect buffer, just the last entries before starting to print a new
  entry every 10 seconds

4 years agotest (2)
Antonio Huete Jimenez [Sun, 7 Jul 2019 16:37:44 +0000 (18:37 +0200)]
test (2)

4 years agolast.1: Fix .Dd
Sascha Wildner [Sun, 7 Jul 2019 12:55:41 +0000 (14:55 +0200)]
last.1: Fix .Dd

4 years agolast(1): Switch the default to /var/log/wtmpx.
Sascha Wildner [Sun, 7 Jul 2019 12:07:45 +0000 (14:07 +0200)]
last(1): Switch the default to /var/log/wtmpx.

While here, sync usage() with getopt(), remove a few void casts, and
clean up the manual page a bit too.

Reported-by: Diederik de Groot <info@talon.nl>
4 years agodrm/linux: Add struct i2c_board_info and i2c_new_device()
François Tigeot [Sun, 7 Jul 2019 10:43:15 +0000 (12:43 +0200)]
drm/linux: Add struct i2c_board_info and i2c_new_device()

4 years agolibutil/logwtmpx: Remove unneeded #include <utmp.h>.
Sascha Wildner [Sun, 7 Jul 2019 09:51:56 +0000 (11:51 +0200)]
libutil/logwtmpx: Remove unneeded #include <utmp.h>.

4 years agoreboot(8): Log to wtmpx too.
Sascha Wildner [Sun, 7 Jul 2019 08:52:00 +0000 (10:52 +0200)]
reboot(8): Log to wtmpx too.

While here, put wtmp and wtmpx logging under SUPPORT_UTMP and
SUPPORT_UTMPX, respectively.

4 years agosshd - Make sshd use utmpx / wtmpx
Matthew Dillon [Sat, 6 Jul 2019 02:21:29 +0000 (19:21 -0700)]
sshd - Make sshd use utmpx / wtmpx

* For now adjust the Makefile for sshd to make it use utmpx and
  wtmpx.  The sshd contrib code expects UTMPX_FILE and WTMPX_FILE
  to be defined in order to use this API.

* sshd's login information is now properly using utmpx/wtmpx so
  'who' whos the full IPV6 address (etc).

Reported-by: dkgroot/NI33
4 years agowho - Fix buffer termination
Matthew Dillon [Sat, 6 Jul 2019 02:03:25 +0000 (19:03 -0700)]
who - Fix buffer termination

* Fix printing output when e.g. the utmp host field fills the whole
  buffer.  This doesn't fix the fact that the host field is too small.

Reported-by: dkgroot/NI33
4 years agodrm/linux: Add dmi_match()
François Tigeot [Fri, 5 Jul 2019 16:05:48 +0000 (18:05 +0200)]
drm/linux: Add dmi_match()

4 years agotest
Antonio Huete Jimenez [Fri, 5 Jul 2019 14:42:26 +0000 (16:42 +0200)]
test

4 years agoSync zoneinfo database with tzdata2019b from ftp://ftp.iana.org/tz/releases
Sascha Wildner [Wed, 3 Jul 2019 16:10:50 +0000 (18:10 +0200)]
Sync zoneinfo database with tzdata2019b from ftp://ftp.iana.org/tz/releases

* Brazil has canceled DST and will stay on standard time indefinitely.

* Predictions for Morocco now go through 2087 instead of 2037.

* Palestine's 2019 spring transition was 03-29 at 00:00, not 03-30
  at 01:00.

* Fix various past transitions for Hong Kong and Italy.

For a detailed list of changes, see share/zoneinfo/NEWS.

4 years agokernel - Fix lwp_tid ranging error
Matthew Dillon [Mon, 1 Jul 2019 18:35:52 +0000 (11:35 -0700)]
kernel - Fix lwp_tid ranging error

* We intended for lwp_tid's to range from 1..INT_MAX, but we
  had the following code in the kernel and unfortunately GCC
  optimizes out the conditional entirely.

  if (++lp->lwp_tid <= 0)
lp->lwp_tid = 1;

* In addition, the pthreads library actually would like to use
  a few high bits for flags, so fix the limit while we are
  here to 0x3FFFFFFF.  This saves us a pthreads assertion in
  the mutex code if an application is actually able to wind
  the thread id up this high over its life.  Since the TID
  allocation mechanism is pretty simplistic, it is entirely
  possible to do this given heavy thread creation / deletion
  rates and enough time.

* Change the conditional such that GCC does not optimize it out.
  We do not want to depend on -fwrapv for the kernel code to
  compile properly, so we don't use it.

  if (lp->lwp_tid == 0 || lp->lwp_tid == 0x3FFFFFFF)
lp->lwp_tid = 1;
  else
++lp->lwp_tid;

4 years agopthreads - Use mmap() for thread->specific data
Matthew Dillon [Mon, 1 Jul 2019 17:15:41 +0000 (10:15 -0700)]
pthreads - Use mmap() for thread->specific data

* Any application which tries to replace malloc() can wind up causing
  pthreads to implode due to its use of malloc() in the early thread
  initialization code.

* Change pthread_setspecific() to use mmap() instead of malloc()
  to allocate the per-thread keys array, allowing applications
  which replace malloc() to use pthread_setspecific() to initialize
  per-thread malloc data if so desired.

  The use of pthread_setspecific() predates TLS (per-thread) variable
  declarations, aka the __thread storage qualifier, which is the
  better way to implement per-thread data, but it is still a reasonable
  choice so make it work.

* For DragonFlyBSD this is not expected to improve chrome because
  our chrome build uses our base malloc() and does not try to replace
  it with tcmalloc().  However, this change might help a limited
  number of other applications that do.

Reported-by: sephe, tuxillo
4 years agolibc: Build inet/, isc/, and nameser/ from their subdirectories.
Sascha Wildner [Mon, 1 Jul 2019 01:11:05 +0000 (03:11 +0200)]
libc: Build inet/, isc/, and nameser/ from their subdirectories.

Also move inet's documentation to the right place.

4 years agolibc: Remove an unneeded .PATH.
Sascha Wildner [Sun, 30 Jun 2019 23:29:08 +0000 (01:29 +0200)]
libc: Remove an unneeded .PATH.

4 years agoinit(8): Put utmp/wtmp specific code under SUPPORT_UTMP.
Sascha Wildner [Sun, 30 Jun 2019 12:44:37 +0000 (14:44 +0200)]
init(8): Put utmp/wtmp specific code under SUPPORT_UTMP.

4 years agodrm: Start using flush_delayed_work()
François Tigeot [Sun, 30 Jun 2019 12:41:52 +0000 (14:41 +0200)]
drm: Start using flush_delayed_work()

4 years ago<sys/conf.h>: Move SPECNAMELEN to <sys/param.h>.
Sascha Wildner [Sun, 30 Jun 2019 10:25:56 +0000 (12:25 +0200)]
<sys/conf.h>: Move SPECNAMELEN to <sys/param.h>.

Some dports and also stuff in our tree depend on it being public, which
all compensate with local defines for now, some of them not having been
adjusted when SPECNAMELEN was bumped from 15 to 63, such as in
sysutils/{mfi,mpt}d. Patches for these ports have been submitted.

They all could have got at it by defining _KERNEL_STRUCTURES before
including <sys/conf.h> but that didn't catch up it seems.

It's public in <sys/param.h> in FreeBSD and I see no reason why we
shouldn't follow.

Reported-by: aly
4 years ago<sys/signal.h>: Adjust a number of struct member types to POSIX.
Sascha Wildner [Sat, 29 Jun 2019 19:08:15 +0000 (21:08 +0200)]
<sys/signal.h>: Adjust a number of struct member types to POSIX.

* siginfo_t's si_pid and si_uid, and stack_t's ss_size. For all of
  these, there are no changes in type sizes and signs.

* Also define the pid_t, uid_t and size_t types, as required by
  the standard.

4 years agoshm_open.3: Some miscellaneous cleanup.
Sascha Wildner [Sat, 29 Jun 2019 09:16:18 +0000 (11:16 +0200)]
shm_open.3: Some miscellaneous cleanup.

* Bump .Dd

* Start sentences on new lines.

* Put DragonFly specific implementation details into IMPLEMENTATION NOTES.

4 years agoRemove .Ud in some manual pages.
Sascha Wildner [Sat, 29 Jun 2019 06:41:03 +0000 (08:41 +0200)]
Remove .Ud in some manual pages.

4 years agoisa.4: Remove obsolete reference.
Sascha Wildner [Sat, 29 Jun 2019 02:03:05 +0000 (04:03 +0200)]
isa.4: Remove obsolete reference.

4 years agommap.2: Improve markup.
Sascha Wildner [Sat, 29 Jun 2019 02:02:17 +0000 (04:02 +0200)]
mmap.2: Improve markup.

4 years agodrm/linux: Add flush_delayed_work()
François Tigeot [Sat, 29 Jun 2019 05:06:10 +0000 (07:06 +0200)]
drm/linux: Add flush_delayed_work()

4 years agodrm/linux: Fix a NULL pointer dereference in signal_pending_state()
François Tigeot [Sat, 29 Jun 2019 05:00:40 +0000 (07:00 +0200)]
drm/linux: Fix a NULL pointer dereference in signal_pending_state()

Not all kernel threads have an associated userland lwp.

Reported-by: dillon
4 years agokernel - VM rework part 21 - Fix excessive paging to swap bug
Matthew Dillon [Fri, 28 Jun 2019 22:35:18 +0000 (15:35 -0700)]
kernel - VM rework part 21 - Fix excessive paging to swap bug

* Fix a bug where pages on the inactive queue would sometimes not
  get moved to the cache queue after being paged out, and also not
  get its [M]odify bit cleared, causing the pageout demon to repeatedly
  write numerous pages out without making progress.

  This may require some additional work to avoid a double-pageout
  condition, but it fixes the main issue.

* Returns us back to the 'feel' of paging prior to the VM rework,
  and should reduce stuttering in chrome and other paging-related lag
  users might experience.

  The bug was introduced due to differences in how the pmap code
  handle vm_page_protect(..., VM_PROT_READ).

4 years agodocs - Update shm_open(3) manual page
Matthew Dillon [Fri, 28 Jun 2019 16:22:39 +0000 (09:22 -0700)]
docs - Update shm_open(3) manual page

* Update to detail recent work.

Submitted-by: Lassi Kortela
4 years agoahci - Enforce 10-second poll of chipset
Matthew Dillon [Fri, 28 Jun 2019 05:54:44 +0000 (22:54 -0700)]
ahci - Enforce 10-second poll of chipset

* Enforce a poll every 10-seconds when the chipset is idle to try to
  catch any potential lost interrupts.  We have observed a number of
  'impossible' timeouts where the chipset registers indicate command
  completion, which should only be possible if a completion interrupt
  is lost.

4 years agokernel - Add TPS balancing mode to scsi_da (da* disks)
Matthew Dillon [Fri, 28 Jun 2019 04:58:49 +0000 (21:58 -0700)]
kernel - Add TPS balancing mode to scsi_da (da* disks)

* This feature brings write tps down to match read tps when both are
  pending.  Normally both read and write I/Os get at least a few tags,
  but because write I/O is buffered by devices, even giving it one tag
  can complete destroy read performance.

  To accomplish this the feature monitors approximate TPS using a counter
  with exponential decay and will temporarily sets write openings in the
  device queue to zero.

* SSDs usually do a better job on their own, but this feature won't hurt
  so we do not distinguish between HDDs and SSDs.

* New sysctls for this feature (feature is enabled by default):

  kern.cam.da.balance_enable 1 (0=disable, 1=enable)
  kern.cam.da.balance_ratio 100 (read:write ratio, 1:1 is 100)
  kern.cam.da.balance_debug 0 (log to console each second)

  You can adjust the read:write tps ratio as desired.  For example,
  the value 200 will adjust the ratio to 2:1.

4 years agoTest commit.
Sascha Wildner [Thu, 27 Jun 2019 09:48:37 +0000 (11:48 +0200)]
Test commit.

4 years agoftpd.8: Adjust for recent opie(4) removal.
Sascha Wildner [Thu, 27 Jun 2019 09:40:50 +0000 (11:40 +0200)]
ftpd.8: Adjust for recent opie(4) removal.

4 years agodrm/radeon: Switch to Linux i2c APIs
François Tigeot [Wed, 26 Jun 2019 21:12:18 +0000 (23:12 +0200)]
drm/radeon: Switch to Linux i2c APIs

* Enable radeon.hw_i2c by default

* Sync some code with Linux 3.19.8 in passing

4 years agokernel/genassym: Remove some unneeded assyms.
Sascha Wildner [Wed, 26 Jun 2019 15:40:35 +0000 (17:40 +0200)]
kernel/genassym: Remove some unneeded assyms.

4 years agokernel - Change tcp keepalive options from ms to seconds (DISRUPTIVE) (2)
Matthew Dillon [Wed, 26 Jun 2019 04:48:20 +0000 (21:48 -0700)]
kernel - Change tcp keepalive options from ms to seconds (DISRUPTIVE) (2)

* Refactor the code slightly to adopt the same limits and behavior
  as linux.  Instead of capping out we return EINVAL on any out-of-
  bound value.

* Also note that my history was wrong.  Sephe actually implemented
  these options, not me, and it was in 2011 (8 years ago, not 15+).
  So much for my vague memory!  At the time other operating used wildly
  different metrics, and we chose to use milliseconds.  But in the
  intervening years it looks like the main systems have adopted a
  1-second interval.

  In changing our parameters to match, we avoid a lot of pain when
  porting third party applications that use it, particularly chrome.
  But also a few others.

  If we need sub-second parameters in the future we will implement
  new option keywords for it.

4 years agobuild - Bump __DragonFly_version to 500702 in master
Matthew Dillon [Wed, 26 Jun 2019 02:03:27 +0000 (19:03 -0700)]
build - Bump __DragonFly_version to 500702 in master

* Bump __DragonFly_version to 500702 for the TCP_KEEP* socket
  options API change from milliseconds to seconds.

  This change corrected a 15+ year old mistake.  Most operating
  systems pass these parameters in seconds, but thinking a finer-grain
  would be grand (long ago), I changed the parameters to milliseconds.
  And we've been paying for it ever since.

4 years agoman - Adjust tcp(4) for API change
Matthew Dillon [Tue, 25 Jun 2019 17:38:18 +0000 (10:38 -0700)]
man - Adjust tcp(4) for API change

* Adjust tcp(4) for the TCP_KEEP* API change.