DragonFlyBSD/src f66cf37sys/vfs/hammer2 hammer2_io.c hammer2_vfsops.c

hammer2 - Add the vfs.hammer2.cluster_write sysctl back in

* Value may be 0 or 1, defaults to 0 (disabled).  Was previously
  enabled.

* By default H2 no longer sets B_CLUSTEROK on dirty buffers being
  written.  Theoretically this shouldn't be a problem because H2
  already uses a large 64KB buffer size.

* Should improve I/O throughput on high-performance SSDs by removing
  kernel overhead and should also work better with vfsync's dirty
  buffer scan which is already sorted.

DragonFlyBSD/src a8bb935sys/kern vfs_subr.c

kernel - remove BUF_TIMELOCK use in fast flush pass

* Remove the BUF_TIMELOCK call in the fast flush pass.  This call can
  cause unnecessary flush stalls due to clustered writes getting ahead
  of the vfsync scan.

* Significantly improves filesystem flush performance to SSDs.
DeltaFile
+13-4sys/kern/vfs_subr.c
+13-41 files

DragonFlyBSD/src 1eb5a42sys/platform/pc64/isa clock.c

kernel - Refactor the TSC MP synchronization test

* Refactor the TSC MP synchronization test.  Do not use cpusync.
  Using cpusync results in O(N x N) worth of overhead instead of
  O(N) worth of overhead.

  Instead, have the per-cpu threads run the test simultaneously using
  each other's data.

* We synchronize to the last TSC element that was saved on each cpu.
  This probably needs a bit of work to ensure determinism, but at
  the moment its good in that it synchronizes all cores off of a
  single cache mastership change, instead of having them all compete
  for cache mastership.

* Probably needs some fine tuning, at the moment I allow a slop of
  10uS which is almost certainly too much.  Note, however, that
  SMP interactions can create ~1uS latencies on particular memory
  accesses.

* Solves serious issues with the old test on 64 cpu threads.
  These issues may also have been related to the ipiq fifo size
  being too small.

DragonFlyBSD/src 3919f5csys/sys thread.h

kernel - Increase MAXCPUFIFO from 32 to 256

* Increase to 256, ensures that no deadlocks can occur on systems
  with more than 32 cpu threads.
DeltaFile
+1-1sys/sys/thread.h
+1-11 files

DragonFlyBSD/src cfbb806share/zoneinfo backzone pacificnew

Revert "[zoneinfo] Add some missing zoneinfo files"

This reverts commit e6c3cf619df176c8ebd2391f8f731dfefbc48fcd.

We do not need those files and they were left out intentionally.

Also, adding them broke installworld because we would have needed
new directories in /usr/share/zoneinfo via mtree.

DragonFlyBSD/src e6c3cf6share/zoneinfo backzone pacificnew

[zoneinfo] Add some missing zoneinfo files

DragonFlyBSD/src 67ab010share/misc pci_vendors

Update the pciconf(8) database.

August 12, 2018 snapshot from https://pci-ids.ucw.cz
DeltaFile
+306-183share/misc/pci_vendors
+306-1831 files

DragonFlyBSD/src 057a077share/misc bsd-family-tree

bsd-family-tree: Small sync with FreeBSD.

DragonFlyBSD/src 3f2f08f. Makefile_upgrade.inc Makefile.inc1

Build - for /rescue transition must make upgrade

* Must make upgrade before make rescue when transitioning to the new
  /rescue topology.

* Must ensure certain header files are not present.  make rescue
  currently improperly uses /usr/include which can have all sorts of
  cruft in it.

* This is a quick hack, will be fixed by a later cleanup of the
  make rescue target to properly split it into buildworld (to build)
  and installworld (to install).

DragonFlyBSD/src fa2d203sys/kern vfs_bio.c

kernel - Clear bp->b_error prior to initiating write I/O

* Clear bp->b_error prior to initiating write I/O so a lingering
  b_error code from a retry that later succeeds is not retained.
DeltaFile
+2-0sys/kern/vfs_bio.c
+2-01 files

DragonFlyBSD/src c4421f0sys/vfs/hammer2 hammer2.h hammer2_xops.c

hammer2 - Remote xop implementation part 1

* Normalize naming conventions for XOP functions.

* Change the XOP callback API to remove the hammer2_thread argument.
  Pass the clindex and scratch buffer in directly.

* Change the XOP API to pass in a function descriptor instead of a
  function pointer, create prototypes for DMSG send/receive XOPs which
  will be used for XOP components which are DMSG based and not
  local-storage based.

* Adjust comments.

DragonFlyBSD/src ab8c8a1sys/vfs/hammer2 hammer2_xops.c hammer2_inode.c

hammer2 - Shift inode xop functions into hammer2_xop.c

* Move the inode related xop functions from hammer2_inode.c
  to hammer2_xop.c.  Leave the xop functions in strategy
  and flush where they are.

* Fix desc macro.

DragonFlyBSD/src 0b1d8a0sys/vfs/autofs autofs.h autofs.c

sys/vfs/autofs: Change u_xxx -> unsigned xxx

(ap->a_cmd and refcount apis are of u_xxx)

DragonFlyBSD/src 5037afcsys/conf options, sys/config X86_64_GENERIC LINT64

kernel/drm: Remove CONFIG_PCI as a kernel option.

The code does not link in the absence of it and neither do we expect
systems without PCI support configured, nor does it make sense for
DRM specific stuff in particular, so just set it unconditionally.

If anything, it could be tied to NPCI being >0 (to check if
"device pci" is in the kernel), but for that it would have to
actually build/link without CONFIG_PCI in the first place.

DragonFlyBSD/src 2afeb59sys/contrib/dev/acpica changes.txt, sys/contrib/dev/acpica/source/components/dispatcher dsfield.c

Sync ACPICA with Intel's version 20180810:

* Attempt to continue initially loading ACPI tables regardless of
  malformed AML.

* Enhance acpiexec(8)'s -fi option and plug a memory leak in it.

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

DragonFlyBSD/src d4d73b3sys/dev/drm drm_pci.c drm_drv.c, sys/dev/drm/i915 i915_drv.c

drm: Sync drm_pci.c with Linux 4.7.10

DragonFlyBSD/src 14e0ef2sys/conf options, sys/config X86_64_GENERIC LINT64

drm: Add CONFIG_PCI

DragonFlyBSD/src 1c45d30sys/dev/drm drm_dragonfly.c, sys/dev/drm/include/linux pci.h

drm/linux: Add field devfn to struct pci_dev

DragonFlyBSD/src b6b35a1lib/libc/gen fpclassify.3 Makefile.inc, lib/libm Makefile

Move fpclassify.3 from libc to libm where it belongs.

DragonFlyBSD/src d000ce6lib/libm Makefile, lib/libm/man signbit.3

Add back a signbit.3 manpage that was killed w/o providing a substitute.

DragonFlyBSD/src 9856497share/man/man3 fpgetround.3

fpgetround.3: Replace references to the former fenv.3 manual page.

OpenBSD's libm has 4 separate manual pages for these.

DragonFlyBSD/src 4f0a7ecshare/man/man4 wi.4 ath.4

Remove two references (one commented) to a non-existant manpage.

DragonFlyBSD/src 3beada3. Makefile_upgrade.inc, share/man/man3 fpgetround.3 Makefile

Remove some documentation of the i386 specific fpresetsticky().

DragonFlyBSD/src d15093bsys/net/pf pf_ioctl.c pf_if.c, usr.sbin/pfctl pfctl_qstats.c pfctl_altq.c

Revert "pf: Allow disappearing or not yet existing interfaces for ALTQ"

This reverts commit 0a887f91f9633448c99b9a5b7c6116a0a22d25d6.

1. It's incorrect to change the ifnet_unlock().  The original protection
   range is used to make sure that the ifp does not get ripped out behind
   our back.

2. We don't suffer from the issue that that commit was intended to fix.

Thanks-to: sephe

DragonFlyBSD/src acc24b6share/man/man9 EVENTHANDLER.9

eventhandler.9: Update events list

* Remove "dev_clone"

* Add "iflladdr_event", "mountroot", and "usb_dev_configured".
  Descriptions are taken from FreeBSD.

DragonFlyBSD/src bc1a39eshare/man/man9 EVENTHANDLER.9, sys/net if_var.h if.c

eventhandler: Implement ifnet_link_event

The "ifnet_link_event" is triggered by the change of the link state of
an interface.

Taken-from: FreeBSD

DragonFlyBSD/src 3bbcdccsys/net/pf pfvar.h

pf: Update pfi_kif and pfi_kif_cmp structs

For struct "pfi_kif", add "pfik_name" entry while remove multiple obsolete
entries and macros.  Rename "pfik_ifname" to "pfik_name" for "pfi_kif_cmp"
struct.

Based on both OpenBSD and FreeBSD.
DeltaFile
+2-14sys/net/pf/pfvar.h
+2-141 files

DragonFlyBSD/src c8f430bsys/net/pf if_pfsync.c

if_pfsync: Depend on "pf" module and some cleanups

* Explicitly depend on the "pf" module to make sure it is initialized
  later.

* Remove the unnecessary ksnprintf directive that sets if_xname.

* Order several directives in pfsync_clone_create(), making it more
  consistent with pflog_clone_create().
DeltaFile
+11-10sys/net/pf/if_pfsync.c
+11-101 files

DragonFlyBSD/src 5304134share/man/man5 pf.conf.5

pf.conf.5: Describe the use of interface group

Add the description on interface group, which is supported by DragonFly
BSD's PF now.

Meanwhile, bring in many small updates/fixes from FreeBSD.
DeltaFile
+56-38share/man/man5/pf.conf.5
+56-381 files

DragonFlyBSD/src fcddd1bshare/man/man9 EVENTHANDLER.9, sys/net if_var.h if.c

eventhandler: Implement ifnet_event

Implement the "ifnet_event" which is triggered on interface up and down.

Taken-from: FreeBSD

DragonFlyBSD/src c686757sys/net/pf pf_if.c pf_ioctl.c

pf: Fix and improve interface group support

The old PF code has broken partial support of the interface group.
Without this patch, loading the 'pf.ko' module will panic the system.

* Add event handlers of pfi_{attach,detach,change}_group_event()
  to support the interface groups.  Meanwhile, add event handler
  of pfi_ifaddr_event() that is called when an address is set up
  on an interface, and update pfi_{attach,detach}_event() handlers.
  (Based on FreeBSD)

* Remove function pfi_kifaddr_update() as it is merged into
  pfi_ifaddr_event() handler.

* Update pfi_initialize() and pfi_cleanup() functions (Based on
  FreeBSD).

* Split function pfi_kif_find() out of pfi_kif_get().
  (Based on OpenBSD)

* The PF module will be properly initialized on module load, so remove
  extra pfi_initialize() calls.

* Rename malloc type 'PFI_MTYPE' to 'M_PFI',  and merge with malloc type
  'M_PFIADDRPL'.

    [6 lines not shown]

DragonFlyBSD/src e826117share/man/man9 EVENTHANDLER.9, sys/net bpf.h

bpf: Move bpf_track event declaration to <net/bpf.h>

Move the declaration of the "bpf_track" event from <sys/eventhandler.h>
to <net/bpf.h>.

Document the "bpf_track" event in eventhandler.9 man page.

Based on FreeBSD.

DragonFlyBSD/src d27abe8share/man/man5 pf.conf.5 pf.os.5, usr.sbin/pfctl pf.conf.5 pf.os.5

Move pf.conf.5 and pf.os.5 to share/man/man5

DragonFlyBSD/src 0a887f9sys/net/pf pf_ioctl.c pf_if.c, usr.sbin/pfctl pfctl_qstats.c pfctl_altq.c

pf: Allow disappearing or not yet existing interfaces for ALTQ

Make ALTQ cope with disappearing interfaces (particularly common with
net/mpd4 and netgraph in general).  This also allows to add queues for
an interface that is not yet existing, however, you have to provide
the bandwidth for the interface.

Meanwhile, simplify the ifnet_unlock() calls for ifunit() use.

Taken-from: FreeBSD (r177700)

DragonFlyBSD/src d402430sbin/ifconfig ifgroup.c ifconfig.8

ifconfig(8): Add group support

Obtained from FreeBSD, with some minor changes.

DragonFlyBSD/src 426d6adsys/net if_loop.c

if_loop: Use ifc->ifc_name and minor cleanups

* Use "ifc->ifc_name" instead of explicit "lo".

* Minor style updates.
DeltaFile
+5-8sys/net/if_loop.c
+5-81 files

DragonFlyBSD/src 2949c68sys/net if_var.h if.c, sys/net/pf pfvar.h pf_ioctl.c

net: Tweak some styles and comments

DragonFlyBSD/src a6ccd68sys/net/pf if_pflog.c if_pflog.h

if_pflog: Explicitly depend on "pf" and various cleanups

* Explicitly depend on the "pf" module to make sure it is initialized
  later than the "pf" main module.

* Fix a missing lwkt token release in pflog_clone_create().

* Remove unnecessary kmalloc() check.

* Use if_initname() to properly set up if_{xname,dname,dunit}.

* Use pflogattach() in module load event handle.

* Staticize functions and variables.

* Remove the unused pflogrtrequest() function.

* Remove the "old_pfloghdr" struct from if_pflog.h.

* Mark some __unused variables.

DragonFlyBSD/src 5e983a2sys/net if_clone.c

if_clone: Add cloned interface to the group of its device name

When a new interface is cloned, add it to the group of its device name,
e.g., cloned interfaces tapX will belong to group of "tap" by default.
DeltaFile
+10-0sys/net/if_clone.c
+10-01 files

DragonFlyBSD/src 233c857share/man/man9 EVENTHANDLER.9, sys/net if.c if_var.h

net: Implement interface group support

The network interface group (aka ifgroup) functionality is currently only
used by the PF (still needs patch to make PF use the ifgroup), allowing
rules to use group names instead of the specific interface names, which
makes firewall rules more generic and simpler.

* The ifgroup data are stored at the following two places:
  - The global list of 'struct ifg_group': each entry is a group which has
    the name and members (a list of pointers to the interfaces).
  - The per-ifnet 'if_groups' list, which records the groups that the
    interface belongs to.

* Introduce the 'ifgroup_lock' locakmgr(9) to protect the global list
  of 'struct ifg_group' and per-ifnet 'if_groups' list.  The R/W locking
  operations are provided by the ifgroup_lockmgr() function.

* Move the copyout() out of the locked loop in if_getgroups() and
  if_getgroupmembers() functions.

* Fix several M_NOWAIT to be M_WAITOK.

* Use M_IFNET instead of M_TEMP for allocated ifgroup memory.

* Add SIOC[ADG]IFGROUP and SIOCGIFGMEMB ioctl's,

    [18 lines not shown]

DragonFlyBSD/src 1047b69sys/net if_clone.c

if_clone: Refactor out if_clone_createif() function

The new if_clone_createif() function will create a clone interface
with the given cloner and unit.
DeltaFile
+35-17sys/net/if_clone.c
+35-171 files

DragonFlyBSD/src 595dc8fsys/net if_clone.c if_clone.h

if_clone: Check cloner name to avoid duplicate in if_clone_attach()

Change if_clone_attach() to check the cloner name instead of the pointer
to avoid duplicate, also to return EEXIST instead of panic.

DragonFlyBSD/src 9ad42casys/net if_clone.c

if_clone: Refactor out if_clone_{alloc,free}_unit() functions

Refactor out if_clone_{alloc,free}_unit() functions from
if_clone_{create,destroy}() functions.
DeltaFile
+71-51sys/net/if_clone.c
+71-511 files

DragonFlyBSD/src 1e4b15csys/net if_clone.c

if_clone: Remove useless code wrongly added in 84cb91c376f

The code was inteded to obtain the created interface and add an
interface group for it, which is a work in progress.
DeltaFile
+0-6sys/net/if_clone.c
+0-61 files

DragonFlyBSD/src 50c6cbcsys/netgraph7/bridge ng_bridge.c, sys/vfs/nfs bootp_subr.c

Fix up more files for the <net/if.h> / <net/if_var.h> split (fixes LINT64).

DragonFlyBSD/src 64fc8f0share/man/man7 development.7

development.7: Update repo creation command

Reported-by: resolution (on IRC)

DragonFlyBSD/src d420a8asys/dev/drm drm_fops.c

drm: Sync drm_read() with Linux 4.7.10

This should fix various issues related to multithreaded races
and make the drm subsystem more robust.
DeltaFile
+59-45sys/dev/drm/drm_fops.c
+59-451 files

DragonFlyBSD/src e2d4945sys/net if_clone.c

if_clone: Fix if_clone_destroy() with renamed cloned interface

Since the interface can be renamed (SIOCSIFNAME), it's very wrong for
if_clone_destroy() to determine the unit number from interface name,
which has the following two serious problems:

(1) One may only change the unit number in the interface name, then
trying to destroy the interface will panic the system. e.g.,
% ifconfig tap0 create
% ifconfig tap0 name tap99999999
% ifconfig tap99999999 destroy
-> panic: if_clone_destroy: bit is already cleared

(2) The renamed interface cannot be destroyed anymore. e.g.,
% ifconfig tap0 create
% ifconfig tap0 name test
% ifconfig test destroy
-> ifconfig: SIOCIFDESTROY: Invalid argument

Fix the code to use the 'if_dunit' as the correct interface unit number.

Thanks to Jason A. Donenfeld <jason at zx2c4.com> and Brady O'Brien
<brady.obrien128 at gmail.com> for pointing out the above problem (1).
DeltaFile
+12-16sys/net/if_clone.c
+12-161 files

DragonFlyBSD/src 3b1300dsys/net if_clone.c

if_clone: Fix if_clone_destroy() with renamed cloned interface

Since the interface can be renamed (SIOCSIFNAME), it's very wrong for
if_clone_destroy() to determine the unit number from interface name,
which has the following two serious problems:

(1) One may only change the unit number in the interface name, then
trying to destroy the interface will panic the system. e.g.,
% ifconfig tap0 create
% ifconfig tap0 name tap99999999
% ifconfig tap99999999 destroy
-> panic: if_clone_destroy: bit is already cleared

(2) The renamed interface cannot be destroyed anymore. e.g.,
% ifconfig tap0 create
% ifconfig tap0 name test
% ifconfig test destroy
-> ifconfig: SIOCIFDESTROY: Invalid argument

Fix the code to use the 'if_dunit' as the correct interface unit number.

Thanks to Jason A. Donenfeld <jason at zx2c4.com> and Brady OBrien
<brady.obrien128 at gmail.com> for pointing out the above problem (1).
DeltaFile
+15-21sys/net/if_clone.c
+15-211 files

DragonFlyBSD/src e224e5esys/net if_clone.h if_clone.c

if_clone: Remove unneeded "ifc_namelen" from "struct if_clone"

The "strlen(ifc_name)" is used instead.