c66c3ee56f4e2573d8c0fec54298232511173e52
[ikiwiki.git] / release54 / index.mdwn
1 # DragonFly BSD 5.4
2
3 * Version 5.4.0 released 03 December 2018
4 * Version 5.4.1 released 24 December 2018
5
6 DragonFly version 5.4 brings a new system compiler in GCC 8, improved NUMA support, a large number of network and virtual machine driver updates, and updates to video support.  This release is 64-bit only, as with previous releases.  5.4.1 adds more support for dhcpcd, though it is not yet default, and [better on-disk topology for HAMMER2](http://lists.dragonflybsd.org/pipermail/users/2018-December/358016.html).
7
8 The details of all commits between the 5.2 and 5.4 branches are available in the associated commit messages for [5.4.0rc](http://lists.dragonflybsd.org/pipermail/commits/2018-November/718131.html), [5.4.0](http://lists.dragonflybsd.org/pipermail/commits/2018-December/718171.html), and [5.4.1](http://lists.dragonflybsd.org/pipermail/commits/2018-December/718276.html).
9  
10 ## Big-ticket items
11
12 * Much better support for asymmetric NUMA (Non-Uniform Memory Access) configurations.  In particular, both the memory subsystem and the scheduler now understand the Threadripper 2990WX's architecture.  The scheduler will prioritize CPU nodes with direct-attached memory and the memory subsystem will normalize memory queues for CPU nodes without direct-attached memory (which improves cache locality on those CPUs).
13
14 * Incremental performance work.  DragonFly as a whole is very SMP friendly.  The type of performance work we are doing now mostly revolves around improving fairness for shared-vs-exclusive lock clashes, reducing cache ping-ponging due to non-contending SMP locks (i.e. massive use of shared locks on shared resources), and so forth.
15
16 * Major updates to dports brings us to within a week or two of FreeBSD's ports as of this writing, in particular major updates to chromium, and making the whole mess work with gcc-8.
17
18 * Major rewriting of the tty clist code and the tty locking code, significantly improving concurrency across multiple ttys and ptys.
19
20 ### GCC 8 
21
22 * DragonFly now ships with GCC 8.0, and runs as the default compiler. It is also now used for building dports.
23
24 * GCC 4.7.4 and GCC 5.4.1 are still installed.  4.7.4 is our backup compiler, and 5.4.1 is still there to ensure a smooth transition, but should generally not be used.  buildworld builds all three by default to ensure maximum compatibility.
25
26 * Many passes through world sources were made to address various warnings and errors the new GCC brought with it.
27
28 ### HAMMER2
29
30 * HAMMER2 is recommended as the default root filesystem in non-clustered mode.
31 * Clustered support is not yet available.
32 * Increased bulkfree cache to reduce the number of iterations required.
33 * Fixed numerous bugs.
34 * Improved support on low-memory machines.
35 * Significant pre-work on the XOP API to help support future networked operations.
36 * (in 5.4.1) HAMMER2 filesystem meta-consistency protection for
37 snapshots and crashes has been improved, as has speed of snapshot generation.  See full notes at the end of the document
38
39 ## Details
40
41 ### Checksums
42
43 MD5 (dfly-x86_64-5.4.1_REL.img) = 5819175d148e8cfa08c384483b0b25e2
44 MD5 (dfly-x86_64-5.4.1_REL.iso) = 8030f4ff31c3308b20ffbeeeb89351ba
45 MD5 (dfly-x86_64-5.4.1_REL.img.bz2) = 271c0e5c247479791a35404973e71fcc
46 MD5 (dfly-x86_64-5.4.1_REL.iso.bz2) = 9ddb7eabf4aed34a39e188849cd4f36c
47
48 ### Upgrading
49
50 If you have an existing 5.2.x system and are running a generic kernel, the normal upgrade process, described below, will work.  
51
52 Change your local /usr/src to 5.4:
53
54     cd /usr/src
55     git fetch origin
56     git branch DragonFly_RELEASE_5_4 origin/DragonFly_RELEASE_5_4
57     git checkout DragonFly_RELEASE_5_4
58     git pull
59
60 And then rebuild: (in /usr/src )
61
62     make buildworld
63     make buildkernel
64     make installkernel
65     make installworld
66     make upgrade
67
68     (reboot your system)
69
70     make initrd 
71
72 'make initrd' is optional for systems with unencrypted disks, and has been possible for several releases; it's mentioned here for completeness. Look at the [initrd(7)](https://leaf.dragonflybsd.org/cgi/web-man?command=initrd&section=ANY) man page for details on what it does.
73
74 Don't forget to upgrade your existing packages.  5.4 packages have already been built and are immediately available.
75
76     pkg update
77     pkg upgrade
78
79 ## All changes since DragonFly 5.2
80
81 ### Security Issues
82
83 * Fix CVE-2018-8897, debug register issue.
84 * Complete the full Spectre mitigation support.  Default disabled due to extreme performance loss.  The machdep.spectre_support sysctl can be used to probe support, and machdep.spectre_mitigation sysctl can be used to enable/disable support (can be done at run time).
85 * Change the default /root perms from 755 to 700 in the build template.
86 * OpenBSD collab - completely remove delayed FP state to avoid known side-channel attack.
87 * OpenBSD collab - proactively clean FP state on switch to avoid known side-channel attack.
88 * OpenBSD collab - proactively zero user registers on entry into kernel (syscall, interrupt, or exception) to avoid certain speculative side-channel attacks.
89
90 ### Kernel
91
92 * drm has been updated to match Linux kernel 4.7.10 in a number of locations.
93 * The radeon driver has been updated; currently matches Linux 3.18.
94 * CVE-2018-8897 mitigated.
95 * x2apic timer support added.
96 * Add a private_data field to struct file to improve application support.
97 * Fix pageout/sbusy race.
98 * Refactor AcpiOs*Lock() operation to use lockmgr locks to reduce freezes and improve debugability.
99 * Improve SPINLOCK and acpi_timer performance when under emulation.
100 * nvme - Improve the likelihood of dump success by removing certain blocking locks from the dump path.
101 * Numerous spinlock performance and edge-case improvements.  Deal with shared starvation in the face of a long series of exclusive locks, and vise-versa.  Add TSC-based windowing as a fall-back when excessive contention is present.
102 * Add a dirty vnode management facility.
103 * Remove bottlenecks from the rlimit handling code by reflecting p_limit into td_limit.
104 * Increase the size of the vm_object hash table by 4x to reduce collisions.
105 * Fix duplicate da* reporting at boot time and fix the related lockup.
106 * Implement a per-thread (fd,fp) cache to reduce cache ping-ponging in heavily-threaded processes.
107 * Refactor the lwkt_token pool hash algorithm to improve concurrency.
108 * Refactor uidinfo
109 * Refactor lockf operation to remove SMP bottlenecks.
110 * Increase copyin item batching from 8 to 32 for select() and poll().
111 * Improve concurrent tmpfs use by removing SMP bottlenecks.
112 * Improve allocvnode() by removing SMP bottlenecks.
113 * Improve common file descriptor internals for better SMP operation.
114 * Improve namecache performance.
115 * Improve scheduler concurrency by addressing some of the more blatent cache ping-ponging.
116 * Remove numerous kernel global debugging and (unused) statistics counters that were causing cache ping-ponging.
117 * Carefully refactored contended tokens and spinlocks for better SMP operation on many-cores systems.
118 * Carefully refactored the mutex contention code.
119 * Fix a kfree() statistics accounting bug.
120 * Improves kfree() SMP operation.
121 * Fix legacy IRQ bug by ensuring that legacy IRQs only appear on one CPU.
122 * Fix a multitude of usched issues that could cause unrelated processes to be misscheduled.
123 * Refactor the nice priority calculations to improve expected relative behavior when multiple cpu-bound processes are NICEd to different values.
124 * Refactor machdep.cpu_idle_hlt for better AMD handling.
125 * Rearrange pmap PV caching a bit to improve performance.
126 * Optimize the syscall path to improve performance.
127 * Rearrange a few structures to localize fields for cache line optimization.
128 * Remove vm_zeroidle.c.  Remove the asynchronous page zeroing code.  Instead, we now zero pages on demand, just before they are used, to reduce unnecessary cache interactions and to reduce a long-time debuggability issue with pre-zero'd pages.
129 * X2APIC support added and tested.
130 * ACPI updated from Intel base.
131 * Fix a swapcache cleaning issue that could cause swapcache to behave in a non-useful manner.
132 * Change closefrom() EINTR behavior.  closefrom() no longer breaks out of its loop when EINTR is received from close() (which could occur with NFS descriptors).  EINTR will still be rolled up and returned (callers usually ignore this).
133 * Fix a rare pmap_scan_callback() panic.
134 * Fix a umtx race in the kernel.
135 * Fix a NULL pointer indirection on lost socket bug.
136 * Enable NX for PROT_READ-only mappings by default.  NX cannot be enabled for PROT_WRITE (without PROT_EXEC) due to assumptions made by applications.  Suggested by OpenBSD.
137 * Refactor low-memory handling in the objcache subsystem.
138 * Bring in some jail work from FreeBSD.
139 * Rewrite the TSC probe code several times to improve boot times and reduce SMP issues on many-cores cpus and under emulation.
140 * Refactor the if_clone code and improve stability when used with TAP.
141 * Increase MAXCPUFIFO from 32 to 256 to fix deadlocks which can occur on ncpus > 32 systems.
142 * AMD topology detection rewritten.
143 * Add a heuristic to the scheduler to prioritize the 'better' cores in assymetric NUMA configurations (aka threadripper 2990WX).
144 * Add memory-on-node weighting to the schedule which detects assymetric NUMA configurations and assigns memory to nodes with too little actual memory.  This gives us better memory isolation on nodes without direct-attached memory, significantly improving their performance.
145 * Fix missing wakeup()s in kern_lock.c that could (rarely) lead to unkillable blocked processes.
146 * Fix a startup race in usched_dfly which sometimes caused early boot panics.
147 * Fix a missing brelse() in nvtruncbuf()'s error path which could deadlock the system on certain filesystem errors.
148 * Fix an early-boot interrupt race that sometimes caused a null-pointer deref panic.
149 * Optimize bcopy, bzero, memset, part 1.  part 2 didn't quite make it into this release.
150 * Improve kernel performance by macroing trivial mem*() and bcopy/bzero*() operations with known, small, static sizes.
151 * Improve kernel performance
152 * Add wait6(), waitid(), and si_pid/si_uid siginfo support.  This fixes the 'lightdm' X display manager.
153 * Move nearly all global tty_token uses to per-tty or per-pty tokens, significantly improving concurrency when writing to multiple ttys or ptys.  Remove unnecessary critical sections.
154 * Remove use of tty_token in the session management code, removing an annoying bottleneck from the fork/exec/wait/exit path.
155 * The keyboard subsystem now uses its own kbd_token instead of using tty_token.
156 * Rewrite the tty clist code.  Get rid of clists.  Instead, use a single linear buffer and a FIFO mechanism.  The original clist code was obsolete 20 years ago.
157 * Fix a kernel exit race in killalllwps() that could sometimes prevent a heavily threaded process from completing its exit().
158 *
159
160 ### Filesystems
161
162 * autofs - Various updates to autofs
163 * ufs - Fix an old UFS bug that would panic on certain filesystem full conditions.
164 * ufs - Rename UFS constants throughout to improve separation.
165 * ufs - Remove duplicate TRIMs and significantly improve 'rm -rf' performance.
166 * tmpfs - Fix NFS exports of tmpfs filesystems.
167 * tmpfs - Significantly improve tmpfs concurrency.
168 * tmpfs - Fix a rare deadlock.
169 * Fix minor bugs in HAMMER1 that could result in an assertion under heavy loads.
170 * HAMMER2 is now the recommended default filesystem for root.
171 * Fix ENOTDIR/EISDIR logic in certain situations.
172 * uid, gid, and (fake) inum added to the fstat() information for pipe()s and socket()s.
173
174 ### Networking
175
176 * The network tunnel driver, [tun(4)](https://leaf.dragonflybsd.org/cgi/web-man?command=tun&section=4), has been cleaned up and updated.  It's now clonable for anyone building VPN links.
177 * The [tap(4)](https://leaf.dragonflybsd.org/cgi/web-man?command=tap&section=4) and interface cloning have also received related updates and fixes.
178 * Fix an arp issue in the bridge code, plus add a few bug fixes.
179 * Interface groups are now supported in the kernel and [pf(4)](https://leaf.dragonflybsd.org/cgi/web-man?command=pf&section=4).  They can be configured with [ifconfig(8)](https://leaf.dragonflybsd.org/cgi/web-man?command=ifconfig&section=8)
180 * DragonFly now can use [dhcpcd(8)](https://leaf.dragonflybsd.org/cgi/web-man?command=dhcpcd&section=8) for DHCP, for both IPv4 and IPv6.  See [the announcement](http://lists.dragonflybsd.org/pipermail/users/2018-November/357989.html) for details.  The existing utilities dhclient(8) and rtsold(8) are still supported, so no configuration change is required yet.
181 * The ena (Elastic Network Adapter) network driver has been added.
182 * if_iwm has had multiple updates.
183 * if_vtnet, the virtual I/O Ethernet driver, has been updated.
184 * Significant work to ipfw3.
185 * Add BPF_MOD and BPF_XOR support to bpf, and update libpcap.
186 * Fix a user-after-free mbuf issue - obtained from NetBSD via FreeBSD.
187 * IPSEC has been removed from the system, for many reasons.  Basically, VPNs are far superior and more deterministic in terms of maintainability.
188 * ifconfig(8) - synchronized from FreeBSD.
189 * Reduce confusion by giving SEQPACKET sockets their own sysctls for limit setting.
190 * Increase all default limits for unix domain sockets to 65536 (fixes issues with wpa_supplicant and provides better defaults against application expectations).
191 * Add ip6addrctl(8) from FreeBSD.
192 * Fix a SACK related NULL pointer dereference.
193 * dhcpcd has been added to the base system (for IPV6), and will replace dhclient and rtsold - though not in this release.
194 * A number of network device drivers have been added.
195 * A couple of edge-case panics have been fixed.
196 * wpa_supplicant is installed via dports, by default, to override the default version in base.  The base version remains so that a mass pkg deletion doesn't accidentally remove the ability to get online.
197 * Fix getsockname() on unnamed AF_LOCAL sockets to properly initialize the sockaddr.
198 * Set net.inet6.icmp6.nd6_onlink_ns_rfc4861 to 1 by default, contemporary implementations pretty much require it.
199 * Fix a misunderstanding in how igb(4) and ix(4) calculate the packet hash for encapsulated packets.
200
201 ### Driver updates
202
203 * A number of drivers of use when running DragonFly as a guest VM have been added or updated, including ena (for AWS support), if_vtnet, virtio_balloon, and virtio_pci.
204 * Improvements for DRM and radeon.
205 * Serial-output-only installs are now possible.
206 * The virtio_balloon memory driver has been added.
207 * /dev/sndstat can now be opened multiple times by the same device.
208 * mpr(4) driver for LSI Fusion-MPT 3/3.5 SAS controllers added.
209 * MosChip PCIe serial communications now supported.
210 * Add missing descriptions for usb4bsd C610/X99 controllers
211 * igb(4) bring in WOL (wake-on-lan) support from FreeBSD.
212 * Add support for PCIe serial com, and console support.
213 * Remove numerous old PCI and ISA serial drivers.
214 * nvme(4) fixes for AWS.  Handle interfaces without attached volumes.
215 * corepower(4) - Add support for platform energy counter.
216 * ig4(4) Numerous changes to improve low-power support and stability.  Handle situations where ig4(4) is listed but is non-operational (probably because the BIOS has stolen it).
217 * dsp(4) fixes for mmap() handling.
218 * sound(4) now allows /dev/sndstat to be open multiple times from one process.
219
220 ### Userland
221
222 * Refactor /usr/Makefile (for src-create and other targets).
223 * Refactor buildworld, in particular moving the initrd build from installworld to buildworld
224 * Add rc support for ipfw3
225 * Major refactor of the initrd infrastructure.
226 * Update pwcache(3) from NetBSD
227 * Getty - minor sync from FreeBSD
228 * Update vis(3) and unvis(3) from NetBSD
229 * Update pciconf database.
230 * Fix -Walloc-size-large-than bug in gcc-4.7 and 5.0.
231 * Remove rhosts from the default template (the rcmds, like rcp, rlogin, etc. were removed from the tree in the previous release).
232 * Fix a signed overflow in mktime() that blew up GCC-8's -O2 constant folding code.
233 * Add strsuftoll[,x]() to libc in preparation for makefs(8).  This helps various dports as well.  Taken from NetBSD.
234 * Add tcsetsid() to libc.
235 * Adjust symlink() prototype to match standards.
236 * Improve buildworld concurrency when building the compilers.
237 * Significant crunchgen updates.  Add 70 more tools to the crunch.
238 * Add -N option to install(1).
239 * The resolver now allows underscores in the name, fixing numerous domains and domain forwarding issues.
240 * mtree - Replace with NetBSD's version.
241 * dumpon(8) - Improve error message clarity.
242 * Cache 4K, 8K, and other larger allocations in posix_memalign(), significantly improving its performance.
243
244 ### Boot
245
246 * The initrd has had significant improvement and now forms a much more complete rescue system, with over 70 tools added via [crunchgen(1)](https://leaf.dragonflybsd.org/cgi/web-man?command=crunchgen&section=1).  See the [initrd(7)](https://leaf.dragonflybsd.org/cgi/web-man?command=initrd&section=7) man page for details.
247 * Crypto bootstrap, fix vfs.root.real_root to be vfs.root.realroot.
248 * Rescue boot mode does not try to mount the real root.
249 * Handle tftp block overflows properly, allowing the kernel image to exceed 65536 blocks when tftp pxe-booting is used instead of NFS pxe-booting.
250 * Slow down the NFS twiddle a bit.
251
252 ### Various tools have been upgraded in the base system:
253
254 * [dhcpcd](http://roy.marples.name/projects/dhcpcd) 7.0.8 imported.
255 * [openresolv](https://roy.marples.name/projects/openresolv) 3.9.0 imported, installed as [resolvconf(8)](https://leaf.dragonflybsd.org/cgi/web-man?command=resolvconf&section=8).
256 * [ip6addrctl(8)](https://leaf.dragonflybsd.org/cgi/web-man?command=ip6addrctl&section=8) together with a rc script imported from FreeBSD.
257 * DHCP server for network installs updated to net/isc-dhcp44-server.
258 * OpenSSH updated to 7.6p1.
259 * ACPICA updated to 20181031.
260 * Time zone data updated to tzdata2018g.
261 * Compiler - see next section
262 * diff utils updated.
263
264 ### Compiler status
265
266 * gcc 8.0 is the default compiler, for kernel, world, and dports.  GCC versions 4 and 5 are still installed and built if needed.
267
268 ### Package updates
269
270 * A full set of new binary packages has been built for 5.4, available through the pkg tool.
271 * There's a number of options now for running a web browser on DragonFly; check the [browser documentation page](https://www.dragonflybsd.org/docs/docs/howtos/WebBrowsers/) for a full list.
272 * wpa_supplicant is installed as a package by default; delete if your system does not use wireless.  The version in base remains as a safety measure in case the dports version is deleted.
273
274 ### HAMMER2 changes in 5.4.1
275
276 * H2 filesystem now has meta-consistency protection for
277 snapshots and crashes.  This is on top of the lower-level radix tree
278 protections it already had.  The coherency protection handles
279 directory-entry-vs-inode dependencies which prior to this patch could
280 sometimes get broken by a crash, causing the nlinks count on the inode to
281 not match the number of directory entries referencing it, sometimes putting
282 directory entry flushes and the related inode flushes in different sync
283 groups, and often causing snapshot operations to 'cut' the filesystem while
284 it is in an inconsistent state, when made in the midst of modifying
285 activity.  Some people have noticed these issues recently, and while they
286 can be cleaned up with manual hammer2 directives after the fact, it was
287 really annoying to have to deal with.
288 * The update now under test in master fixes all of these issues and is also
289 able to guarantee buffer cache consistency... hence also write() atomicy
290 boundaries on snapshot or crash.
291 * As an added bonus, most of the front-end stalls that currently occur during a filesystem sync have also been cleaned up.  The frontend.. that is, the filesystem system calls made by programs, is now able to operate concurrently with a filesystem sync.   Previously the front-end stalled on
292 any modifying operation made to any inode during a filesystem sync (something I did to try to 'fix' the prior consistency issues, but which
293 didn't sufficiently fix the problems).  With the new work, the front-end
294 now only stalls on the specific inodes which are in the sync queue, and
295 will reorder any inodes it stalls on to the front of the sync queue in
296 order to retire their flushes as quickly as possible.  Once the inode is no
297 longer on the sync queue, the front-end can proceed with its modifying
298 operation concurrent with the continuing filesystem sync.  The result is
299 significantly better concurrency and far shorter-duration stalls for those
300 situations where a stall is mandatory.   The new code keeps track of and
301 handles any dependencies between inodes on the syncq and inodes not on the
302 syncq which arise during this operation.
303 * The new patch also significantly improves snapshot operation, and adds a
304 new directive called 'snapshot-debug' (which I will probably rename) which
305 foregoes the standard sync-before-snapshot that the primary 'snapshot'
306 directive implements.  Both directives will snapshot a fully consistent
307 filesystem, the only difference is that snapshot-debug might not get
308 changes made just prior to issuing the command (it uses a recorded blockmap
309 from the most recent sync instead of forcing a new sync).
310
311
312