Improve the description on 5.4.1 highlights
[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.
7
8 DragonFly version 5.4.1 has significant HAMMER2 improvements [(meta-consistency protection for snapshots and crashes, better on-media topology)](http://lists.dragonflybsd.org/pipermail/users/2018-December/358016.html), better WLAN interface handling, and improved WLAN connection with dhcpcd(8).
9
10 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).
11  
12 ## Big-ticket items
13
14 * 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).
15
16 * 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.
17
18 * 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.
19
20 * Major rewriting of the tty clist code and the tty locking code, significantly improving concurrency across multiple ttys and ptys.
21
22 ### GCC 8 
23
24 * DragonFly now ships with GCC 8.0, and runs as the default compiler. It is also now used for building dports.
25
26 * 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.
27
28 * Many passes through world sources were made to address various warnings and errors the new GCC brought with it.
29
30 ### HAMMER2
31
32 * HAMMER2 is recommended as the default root filesystem in non-clustered mode.
33 * Clustered support is not yet available.
34 * Increased bulkfree cache to reduce the number of iterations required.
35 * Fixed numerous bugs.
36 * Improved support on low-memory machines.
37 * Significant pre-work on the XOP API to help support future networked operations.
38 * (in 5.4.1) HAMMER2 filesystem meta-consistency protection for
39 snapshots and crashes has been improved, as has speed of snapshot generation.  See full notes at the end of the document
40
41 ## Details
42
43 ### Checksums
44
45     MD5 (dfly-x86_64-5.4.1_REL.img) = 5819175d148e8cfa08c384483b0b25e2
46     MD5 (dfly-x86_64-5.4.1_REL.iso) = 8030f4ff31c3308b20ffbeeeb89351ba
47     MD5 (dfly-x86_64-5.4.1_REL.img.bz2) = 271c0e5c247479791a35404973e71fcc
48     MD5 (dfly-x86_64-5.4.1_REL.iso.bz2) = 9ddb7eabf4aed34a39e188849cd4f36c
49
50 ### Upgrading
51
52 If you have an existing 5.2.x system and are running a generic kernel, the normal upgrade process, described below, will work.  
53
54 Change your local `/usr/src` to 5.4:
55
56     cd /usr/src
57     git fetch origin
58     git branch DragonFly_RELEASE_5_4 origin/DragonFly_RELEASE_5_4
59     git checkout DragonFly_RELEASE_5_4
60     git pull
61
62 And then rebuild: (in `/usr/src`)
63
64     make buildworld
65     make buildkernel
66     make installkernel
67     make installworld
68     make upgrade
69
70     (reboot your system)
71
72     make initrd 
73
74 `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.
75
76 Don't forget to upgrade your existing packages.  5.4 packages have already been built and are immediately available.
77
78     pkg update
79     pkg upgrade
80
81 ## All changes since DragonFly 5.2
82
83 ### Security Issues
84
85 * Fix CVE-2018-8897, debug register issue.
86 * Complete the full Spectre mitigation support.  Default disabled due to extreme performance loss.  The `machdep.spectre_support` sysctl can be used to probe the spectre support, and machdep.spectre_mitigation sysctl can be used to enable/disable support (can be done at runtime).
87 * Change the default `/root` perms from 755 to 700 in the build template.
88 * OpenBSD collab - completely remove delayed FP state to avoid the known side-channel attack.
89 * OpenBSD collab - proactively clean FP state on switch to avoid known side-channel attack.
90 * OpenBSD collab - proactively zero user registers on entry into kernel (syscall, interrupt, or exception) to avoid certain speculative side-channel attacks.
91
92 ### Kernel
93
94 * drm has been updated to match Linux kernel 4.7.10 in a number of locations.
95 * The radeon driver has been updated; currently matches Linux 3.18.
96 * CVE-2018-8897 mitigated.
97 * x2apic timer support added.
98 * Add a private_data field to struct file to improve application support.
99 * Fix pageout/sbusy race.
100 * Refactor AcpiOs*Lock() operation to use lockmgr locks to reduce freezes and improve debugability.
101 * Improve SPINLOCK and acpi_timer performance when under emulation.
102 * nvme - Improve the likelihood of dump success by removing certain blocking locks from the dump path.
103 * 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.
104 * Add a dirty vnode management facility.
105 * Remove bottlenecks from the rlimit handling code by reflecting p_limit into td_limit.
106 * Increase the size of the vm_object hash table by 4x to reduce collisions.
107 * Fix duplicate da* reporting at boot time and fix the related lockup.
108 * Implement a per-thread (fd,fp) cache to reduce cache ping-ponging in heavily-threaded processes.
109 * Refactor the lwkt_token pool hash algorithm to improve concurrency.
110 * Refactor uidinfo
111 * Refactor lockf operation to remove SMP bottlenecks.
112 * Increase copyin item batching from 8 to 32 for select() and poll().
113 * Improve concurrent tmpfs use by removing SMP bottlenecks.
114 * Improve allocvnode() by removing SMP bottlenecks.
115 * Improve common file descriptor internals for better SMP operation.
116 * Improve namecache performance.
117 * Improve scheduler concurrency by addressing some of the more blatent cache ping-ponging.
118 * Remove numerous kernel global debugging and (unused) statistics counters that were causing cache ping-ponging.
119 * Carefully refactored contended tokens and spinlocks for better SMP operation on many-cores systems.
120 * Carefully refactored the mutex contention code.
121 * Fix a kfree() statistics accounting bug.
122 * Improves kfree() SMP operation.
123 * Fix legacy IRQ bug by ensuring that legacy IRQs only appear on one CPU.
124 * Fix a multitude of usched issues that could cause unrelated processes to be misscheduled.
125 * Refactor the nice priority calculations to improve expected relative behavior when multiple cpu-bound processes are NICEd to different values.
126 * Refactor machdep.cpu_idle_hlt for better AMD handling.
127 * Rearrange pmap PV caching a bit to improve performance.
128 * Optimize the syscall path to improve performance.
129 * Rearrange a few structures to localize fields for cache line optimization.
130 * 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.
131 * X2APIC support added and tested.
132 * ACPI updated from Intel base.
133 * Fix a swapcache cleaning issue that could cause swapcache to behave in a non-useful manner.
134 * 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).
135 * Fix a rare pmap_scan_callback() panic.
136 * Fix a umtx race in the kernel.
137 * Fix a NULL pointer indirection on lost socket bug.
138 * 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.
139 * Refactor low-memory handling in the objcache subsystem.
140 * Bring in some jail work from FreeBSD.
141 * Rewrite the TSC probe code several times to improve boot times and reduce SMP issues on many-cores cpus and under emulation.
142 * Refactor the if_clone code and improve stability when used with TAP.
143 * Increase MAXCPUFIFO from 32 to 256 to fix deadlocks which can occur on ncpus > 32 systems.
144 * AMD topology detection rewritten.
145 * Add a heuristic to the scheduler to prioritize the 'better' cores in assymetric NUMA configurations (aka threadripper 2990WX).
146 * 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.
147 * Fix missing wakeup()s in kern_lock.c that could (rarely) lead to unkillable blocked processes.
148 * Fix a startup race in usched_dfly which sometimes caused early boot panics.
149 * Fix a missing brelse() in nvtruncbuf()'s error path which could deadlock the system on certain filesystem errors.
150 * Fix an early-boot interrupt race that sometimes caused a null-pointer deref panic.
151 * Optimize bcopy, bzero, memset, part 1.  part 2 didn't quite make it into this release.
152 * Improve kernel performance by macroing trivial mem*() and bcopy/bzero*() operations with known, small, static sizes.
153 * Improve kernel performance
154 * Add wait6(), waitid(), and si_pid/si_uid siginfo support.  This fixes the 'lightdm' X display manager.
155 * 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.
156 * Remove use of tty_token in the session management code, removing an annoying bottleneck from the fork/exec/wait/exit path.
157 * The keyboard subsystem now uses its own kbd_token instead of using tty_token.
158 * 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.
159 * Fix a kernel exit race in killalllwps() that could sometimes prevent a heavily threaded process from completing its exit().
160 *
161
162 ### Filesystems
163
164 * autofs - Various updates to autofs
165 * ufs - Fix an old UFS bug that would panic on certain filesystem full conditions.
166 * ufs - Rename UFS constants throughout to improve separation.
167 * ufs - Remove duplicate TRIMs and significantly improve 'rm -rf' performance.
168 * tmpfs - Fix NFS exports of tmpfs filesystems.
169 * tmpfs - Significantly improve tmpfs concurrency.
170 * tmpfs - Fix a rare deadlock.
171 * Fix minor bugs in HAMMER1 that could result in an assertion under heavy loads.
172 * HAMMER2 is now the recommended default filesystem for root.
173 * Fix ENOTDIR/EISDIR logic in certain situations.
174 * uid, gid, and (fake) inum added to the fstat() information for pipe()s and socket()s.
175
176 ### Networking
177
178 * 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.
179 * The [tap(4)](https://leaf.dragonflybsd.org/cgi/web-man?command=tap&section=4) and interface cloning have also received related updates and fixes.
180 * Fix an arp issue in the bridge code, plus add a few bug fixes.
181 * 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)
182 * 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.
183 * The ena (Elastic Network Adapter) network driver has been added.
184 * if_iwm has had multiple updates.
185 * if_vtnet, the virtual I/O Ethernet driver, has been updated.
186 * Significant work to ipfw3.
187 * Add BPF_MOD and BPF_XOR support to bpf, and update libpcap.
188 * Fix a user-after-free mbuf issue - obtained from NetBSD via FreeBSD.
189 * IPSEC has been removed from the system, for many reasons.  Basically, VPNs are far superior and more deterministic in terms of maintainability.
190 * ifconfig(8) - synchronized from FreeBSD.
191 * Reduce confusion by giving SEQPACKET sockets their own sysctls for limit setting.
192 * Increase all default limits for unix domain sockets to 65536 (fixes issues with wpa_supplicant and provides better defaults against application expectations).
193 * Add ip6addrctl(8) from FreeBSD.
194 * Fix a SACK related NULL pointer dereference.
195 * dhcpcd has been added to the base system (for IPV6), and will replace dhclient and rtsold - though not in this release.
196 * A number of network device drivers have been added.
197 * A couple of edge-case panics have been fixed.
198 * 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.
199 * Fix getsockname() on unnamed AF_LOCAL sockets to properly initialize the sockaddr.
200 * Set net.inet6.icmp6.nd6_onlink_ns_rfc4861 to 1 by default, contemporary implementations pretty much require it.
201 * Fix a misunderstanding in how igb(4) and ix(4) calculate the packet hash for encapsulated packets.
202
203 ### Driver updates
204
205 * 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.
206 * Improvements for DRM and radeon.
207 * Serial-output-only installs are now possible.
208 * The virtio_balloon memory driver has been added.
209 * /dev/sndstat can now be opened multiple times by the same device.
210 * mpr(4) driver for LSI Fusion-MPT 3/3.5 SAS controllers added.
211 * MosChip PCIe serial communications now supported.
212 * Add missing descriptions for usb4bsd C610/X99 controllers
213 * igb(4) bring in WOL (wake-on-lan) support from FreeBSD.
214 * Add support for PCIe serial com, and console support.
215 * Remove numerous old PCI and ISA serial drivers.
216 * nvme(4) fixes for AWS.  Handle interfaces without attached volumes.
217 * corepower(4) - Add support for platform energy counter.
218 * 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).
219 * dsp(4) fixes for mmap() handling.
220 * sound(4) now allows /dev/sndstat to be open multiple times from one process.
221
222 ### Userland
223
224 * Refactor /usr/Makefile (for src-create and other targets).
225 * Refactor buildworld, in particular moving the initrd build from installworld to buildworld
226 * Add rc support for ipfw3
227 * Major refactor of the initrd infrastructure.
228 * Update pwcache(3) from NetBSD
229 * Getty - minor sync from FreeBSD
230 * Update vis(3) and unvis(3) from NetBSD
231 * Update pciconf database.
232 * Fix -Walloc-size-large-than bug in gcc-4.7 and 5.0.
233 * Remove rhosts from the default template (the rcmds, like rcp, rlogin, etc. were removed from the tree in the previous release).
234 * Fix a signed overflow in mktime() that blew up GCC-8's -O2 constant folding code.
235 * Add strsuftoll[,x]() to libc in preparation for makefs(8).  This helps various dports as well.  Taken from NetBSD.
236 * Add tcsetsid() to libc.
237 * Adjust symlink() prototype to match standards.
238 * Improve buildworld concurrency when building the compilers.
239 * Significant crunchgen updates.  Add 70 more tools to the crunch.
240 * Add -N option to install(1).
241 * The resolver now allows underscores in the name, fixing numerous domains and domain forwarding issues.
242 * mtree - Replace with NetBSD's version.
243 * dumpon(8) - Improve error message clarity.
244 * Cache 4K, 8K, and other larger allocations in posix_memalign(), significantly improving its performance.
245
246 ### Boot
247
248 * 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.
249 * Crypto bootstrap, fix vfs.root.real_root to be vfs.root.realroot.
250 * Rescue boot mode does not try to mount the real root.
251 * Handle tftp block overflows properly, allowing the kernel image to exceed 65536 blocks when tftp pxe-booting is used instead of NFS pxe-booting.
252 * Slow down the NFS twiddle a bit.
253
254 ### Various tools have been upgraded in the base system:
255
256 * [dhcpcd](http://roy.marples.name/projects/dhcpcd) 7.0.8 imported.
257 * [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).
258 * [ip6addrctl(8)](https://leaf.dragonflybsd.org/cgi/web-man?command=ip6addrctl&section=8) together with a rc script imported from FreeBSD.
259 * DHCP server for network installs updated to net/isc-dhcp44-server.
260 * OpenSSH updated to 7.6p1.
261 * ACPICA updated to 20181031.
262 * Time zone data updated to tzdata2018g.
263 * Compiler - see next section
264 * diff utils updated.
265
266 ### Compiler status
267
268 * gcc 8.0 is the default compiler, for kernel, world, and dports.  GCC versions 4 and 5 are still installed and built if needed.
269
270 ### Package updates
271
272 * A full set of new binary packages has been built for 5.4, available through the pkg tool.
273 * 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.
274 * 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.
275
276 ### HAMMER2 changes in 5.4.1
277
278 * The HAMMER2 filesystem now has meta-consistency protection for snapshots and crashes.  This is on top of the lower-level radix tree protections it already had.  The coherency protection handles directory-entry-vs-inode dependencies which prior to this patch could sometimes get broken by a crash, causing the nlinks count on the inode to not match the number of directory entries referencing it, sometimes putting directory entry flushes and the related inode flushes in different sync groups, and often causing snapshot operations to 'cut' the filesystem while it is in an inconsistent state, when made in the midst of modifying activity.  Some people have noticed these issues recently, and while they can be cleaned up with manual hammer2 directives after the fact, it was really annoying to have to deal with.
279
280 * Files should now be completely consistent at write() boundaries on crash or snapshot.
281
282 * As an added bonus, concurrency between frontend filesystem calls and backend flushes is now much, much better than it was before.  Instead of having to wait for most of the flush to complete, modifying system calls (create/delete/write/truncate/etc) are now able to run concurrently in most situations.  In situations where concurrency is not possible, frontend operations reorder the flush sequence that is underway in the background to retire the stalled inodes as quickly as possible.  The kernel's buffer cache operations also run more smoothly, improving read-to-write concurrency.
283
284 * The new patch significantly improves snapshot operation, and adds a new directive called 'snapshot-debug' (which I will probably rename) which foregoes the standard sync-before-snapshot that the primary 'snapshot' directive implements.  Both directives will snapshot a fully consistent filesystem, the only difference is that snapshot-debug might not get changes made just prior to issuing the command (it uses a recorded blockmap from the most recent sync instead of forcing a new sync).
285