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