27cd876a539c04010f387279e9a7e7a2a709c1a5
[ikiwiki.git] / release52 / index.mdwn
1 # DragonFly BSD 5.2
2
3 * Version 5.2.0 released 10 April 2018
4
5 DragonFly version 5.2 brings Meltdown/Spectre mitigation, significant improvements to HAMMER2, ipfw, and graphics acceleration.   
6
7 The details of all commits between the 5.0 and 5.2 branches are available in the associated commit messages for [5.2.0rc](http://lists.dragonflybsd.org/pipermail/commits/2018-March/671887.html) and [5.2.0](http://lists.dragonflybsd.org/pipermail/commits/2018-April/671960.html).
8  
9 ## Big-ticket items
10
11 ### Meltdown and Spectre mitigation support
12
13 * Meltdown isolation and spectre mitigation support added.  Meltdown mitigation is automatically enabled for all Intel cpus.  Spectre mitigation must be enabled manually via sysctl if desired, using sysctls machdep.spectre_mitigation and machdep.meltdown_mitigation.
14
15 ### HAMMER2
16
17 * H2 has received a very large number of bug fixes and performance improvements.  We can now recommend H2 as the default root filesystem in non-clustered mode.  
18 * Clustered support is not yet available.
19
20 ### ipfw Updates
21
22 * Implement state based "redirect", i.e. without using libalias.
23 * ipfw now supports all possible ICMP types.
24 * Fix ICMP_MAXTYPE assumptions (now 40 as of this release).
25
26 ### Improved graphics support
27
28 * The drm/i915 kernel driver has been updated to support Intel Coffeelake GPUs
29 * Add 24-bit pixel format support to the EFI frame buffer code.
30 * Significantly improve fbio support for the "scfb" XOrg driver.  This allows EFI frame buffers to be used by X in situations where we do not otherwise support the GPU.
31 * Partly implement the FBIO_BLANK ioctl for display powersaving.
32 * Syscons waits for drm modesetting at appropriate places, avoiding races.
33
34 ## Details
35
36 ### Checksums
37
38     MD5 (dfly-x86_64-5.2.0_REL.img) = 8cac4bcc87bd93cb34fdf8dd42a79067
39     MD5 (dfly-x86_64-5.2.0_REL.iso) = ac650c26d51fb2a76d0f6f5649d7a81b
40     MD5 (dfly-x86_64-5.2.0_REL.img.bz2) = f4693457232c0de6351f775a2934d9bc
41     MD5 (dfly-x86_64-5.2.0_REL.iso.bz2) = 3becb284e84f5eeb077697f8fab4ec14
42
43 ### Upgrading
44
45 If you have an existing 5.0.x system and are running a generic kernel, the normal upgrade process, described below, will work.  
46
47 * Note that DSA OpenSSH keys were deprecated in the 4.6 to 4.8 release.  If you are upgrading from a release older than 4.8 and use DSA OpenSSH keys, please update your private/public key pair or risk locking yourself out.
48
49 * Note that due to base compiler updates, upgrading to 5.1 and later versions now require at least a 4.4 (or later) system.
50
51 Change your local /usr/src to 5.2:
52
53     cd /usr/src
54     git fetch origin
55     git branch DragonFly_RELEASE_5_2 origin/DragonFly_RELEASE_5_2
56     git checkout DragonFly_RELEASE_5_2
57     git pull
58
59 And then rebuild: (in /usr/src )
60
61     make buildworld
62     make buildkernel
63     make installkernel
64     make installworld
65     make upgrade
66
67 Don't forget to upgrade your existing packages.  5.2 packages have already been built and are immediately available.
68
69     pkg upgrade
70
71 ## All changes since DragonFly 5.0
72
73 ### Kernel
74
75 * The kernel-based if_ppp nic has been replaced with user ppp, i.e. ppp(8) and tun(4).  if_ppp has not been part of the base kernel config for a while.  It has now been removed.
76 * faith(4), also not part of the base kernel config for a while, has also been removed.  It has been determined that this IPV4<->IPV6 shim is no longer needed.
77 * tmpfs performance significantly improved when a large number of files are present.
78 * Fix a rare lockmgr() state transition, improving stability.
79 * Improve tsleep()/wakeup() queue collisions, significantly reducing spurious wakeup-related IPIs and improving performance.
80 * Fix GCC reordering issues with td_critcount that could lead to misordering and instability.
81 * Refuse to swapoff under certain conditions (presence of swapped tmpfs or vn pages), instead of panicing.
82 * cache-line separation for many things, reducing cache line collisions and improving performance on many-core systems.
83 * Essentially rewrite lockmgr(), significantly increasing shared lock performance and improving most other code paths.
84 * Refactor the buffer cache subsystem, removing B_MALLOC support entirely.  Also remove repurposebuf() (This was a shim prior to KVABIO support that is no longer needed).  Remove geteblk().
85 * Add KVABIO support to the buffer cache subsystem.  This allows buffer cache buffers to avoid smp_invltlb() calls on its buffer mappings when the related filesystems and storage devices in the chain also support KVABIO.  In particular, HAMMER2, the disk layer, and the NVME controller now support KVABIO.  tmpfs also supports KVABIO.
86 * Remove vm_hold_load_pages() and vm_hold_free_pages().  The only remaining use case was in CAM and we can change CAM to use getpbuf_mem() instead.
87 * Refactor SMP collisions statistics somewhat.
88 * Improve mountlist_scan() performance by using a shared token whenever possible.  Also fix a rare race, improving stability during periods of heavy mounting and unmounting (such as synth's use of tmpfs mounts).
89 * Refactor the pipe() code to significantly reduce IPIs and improve performance on many-cpu systems.  Performance is improved 75-100% (almost double in some cases).
90 * Increase the ncmount_cache array, improving the hit ratio to almost 100%.  We were hitting the slow path too often in synth runs.  The slow path is really horrible.
91 * Simplify umtx_sleep() and umtx_wakeup() support to improve pthreads performance and reduce bottlenecks.  Also rip-out vm_page_action() and vm_page_event() which this API used.  The vm_page_action/event code was pretty unfriendly to SMP.  Use a shared spinlock in places where it was exclusive before, significantly improving concurrent threaded umtx operations (pthreads again).
92 * Increase the pmap placemarks hash from 16 to 64 entries.  This improves concurrent fault performance a bit for heavily threaded programs.
93 * Refactor uidinfo.  Again improves SMP performance on many-cpus systems by removing a memory bottleneck.  Hits can now function locklessly.
94 * Partition large anonymous mmap()s, improving concurrent VM fault operation for threaded programs.  Note that the pmap itself is still a bottleneck.
95 * Add atomic_fcmpset_*() (suggested by mjg_), and use it all over the place to reduce unnecessary cache line ping-ponging during contended locking operations.
96 * Clean up ucred and plimit cache line locality, reducing unnecessary cache-line ping-ponging and improving performance.
97 * Refactor vm_page_busy() to add support for acquiring a soft-busy count without requiring ah ard-busy.  This allows us to 'lock' a vm_page in a shared manner via the soft-busy for situations where we only intend to read from it, aka sendfile() and vop_helper_read_shortcut().  Improves read() performance through filesystems.
98 * Add a D_QUICK device flag which allows certain static devices such as /dev/urandom, /dev/zero, and /dev/null to handle open() and close() in a more SMP-friendly manner.
99 * Improve SMP performance for devfs VOPs.  Ipmroves getattr(), read(), and readlink().  Mainly reduces contention during concurrent exec()s which almost always do the same bit of manipulation on specific devices, such as obtaining a random seed.
100 * Improve pmap hinting and performance.
101 * Refactor sysctl locking, significantly reducing SMP contention in heavily loaded environments.  Also allow certain sysctl()s to execute completely unlocked.
102 * Fix ACPI confusion that could arise due to ACPI_SEMAPHORES_MAX_PENDING being too small.  Redefine to a very large number.
103 * Adjust the proc structure a little so getppid() can run lockless.
104 * Implement exclusive priority for tokens under certain circumstances, improving performance when an exclusive token is needed on a heavily shared token.
105 * Add a second pageout daemon which only operates on anonymous pages.  This reduces low memory deadlocks that can arise due to the pageout daemon getting stuck on a filesystem-backed vm_page.
106 * Rewrite sendfile() to fix panics and corruption and to improve performance.  sendfile() now uses a UIO_NOCOPY/VMIO based VOP_READ() in the blind and loops to obtain file data instead of messing with individual pages.  We retain the synchronous VOP_READ() operation we had before because there isn't much point asynchronizing it for a web server which is already very heavily threaded.
107 * Fix a cluster_awrite() race, improving stability.
108 * Fix bugs in the namecache cleaning code and refactor the code.  This fixes a cpu live-lock situation that can arise when the namecache is dealing with a large number of hardlinked files.
109 * Fix boot and kernel issues when running with greater than 512GB of physical ram.  There were numerous scaling issues, including a bad DMAP initialization loop.  Tested to 1TB of ram.  DragonFly can now theoretically support up to 64TB of physical ram.
110 * Expand all page-count fields to 64 bits.  32-bit page-count fields limit us to 8TB of physical ram.  Expand to allow up to the DMAP limit of 64TB.
111 * Fix a 32-bit overflow in the pv_entry init code related to systems with large amounts of physical memory.
112 * Significantly increase the amount of KVA (Kernel Virtual Memory) appropriated in order to properly scale to larger amounts of physical ram.
113 * Improve magazine recycling performance in objcache by increasing MAGAZINE_CAPACITY_MAX.
114 * Fix an overflow in the vm.max_proc_mmap() calculation which could cause unexpected mmap() failures.
115 * Remove tons of debugging statistics that are no longer needed.  This also cleans up a ton of unnecessary cache-line ping-ponging that was occurring in the VFS subsystem.
116 * Fix bugs in vm_fault and vm_map related to concurrent faults in heavily threaded programs.  Also fix a bug in vm_fault_page().
117 * Attempt to fix a CAM unit numbering race that could result in two devices being assigned the same unit number.
118 * Increase the syscons history buffer from 4 screens to 10 screens worth.
119 * Adjust nbuf, maxvnodes, and max_softdeps counts to accomodate systems with a lot of physical memory.  Cap some of the fields to avoid wiring too much physical memory in our default configuration, as large-memory configurations are most typically intended to be used by userland, not kernel caching.
120 * Change several sysctls from 32-bits to 64-bits (e.g. hw.usermem, etc, which were in units of pages).  Implement a backwards compatibility feature for applications which still use 32-bit ints.
121 * Fix a crash which can occur when a cdev is destroyed.
122 * Fix an arbitrary maximum file size limitation in tmpfs.
123 * EFI code refactored to use TianoCore EDK II headers.
124 * Misc i386 cruft removed.
125 * Refactor and clean up a large chunk of the nata driver so it can be modularized.
126 * Increase the microcode size limit from 32KB to 4MB so we can support newer microcodes.
127 * Handle ig4 startup errors for situations where the BIOS makes it inaccessible.  Also implement driver priortization for ig4 and gpio_intel to manage probe order because we don't handle ACPI _DEP methods properly.
128 * lock xhci during attach to avoid spurious interrupts from executing too early.
129 * Add Kabylake support to corepower.ko
130 * Fix kernel minidumps.  These were broken when we extended physical memory support to multiple DMAP pages.  The minidump now dumps the PDP array for the entire system VA space.  Minidumps will actually be a bit smaller on systems with lots of memory due to the page-table optimizations made in the dump format.
131 * Significantly reduce kernel boot times due to various timer calibration functions.
132 * Fix CAM peripheral error handling, primarily for AHCI.  This fixes instabilities which could develop when a storage device throws lots of errors, ultimately resulting in a kernel panic.
133 * Fix a dataloss issue that can occur with tmpfs vnodes when the kernel devices to recycle the vnodes.
134 * Remove kprintf %r, %b, %y support, as well as from libstand.
135 * Do not attach the PS2 controller via the legacy ISA bus, if FADT says so.
136 * Properly flag /dev/mem and /dev/kmem with D_MEM, which makes seeking actually work as intended and improves the performance for various tools which uses these devices.
137 * Untangle sysmouse from tty handling and add a custom FIFO.  This ensures that reads from the character device always get only complete sysmouse packets.
138 * Fix a rare race in mutex ownership transfers which could lead to memory corruption.
139 * Improve shared spinlock performance by allowing atomic_fetchadd_*() to be used for several shared-lock cases that were previously using atomic_cmpset_*().
140 * Fix a udev devfs leak and possible panic related to the cloning code.
141 * Fix several issues in devfs() which could lead to panics or memory leaks, as well as deadlocks during a reboot.
142 * Implement a QUICKHALT flag for certain VFS's such as tmpfs and devfs.  This allows the kernel to avoid actually unmounting / cleaning-up certain mounts when all it wants to do is halt.  Regular filesystem mounts are of course still unmounted normally.
143 * Add additional ACPI PNP IDs for atkbdc operation.
144 * Fix tapN creation >= 32 units.  Fix pty allocation issues >= 32 ptys.  These problems were due to devfs_clone_bitmap_*() bugs that imploded on unit numbers >= 32.
145
146 ### Networking
147
148 * Limit the number of accepted sockets that kevent() reports.  This improves the performance for heavily optimized userland networking workloads.  Specifically, nginx.
149 * Remove the power-of-2 cpu threads limitation for netisrs.  Netisrs now run on all cpu threads, improving load balancing and performance.
150 * In if_vtnet, disable rx csum offload due to unuspported ipv6 rx csum offloading.
151 * In if_vtnet, clean up the IFCAP flags.
152 * Make non-prefix and directly reachable inet6 routes work properly.
153 * Properly zero out syncache_percpu, fixing a rare panic.
154 * Synchronize ix to Intel's ix-3.2.17.
155 * Synchronize igb with Intel's igb-2.5.3.
156 * Synchronize em/emx to Intel's em-7.6.2.
157 * Change how the TCP local ephemeral port is selected to reduce the chance of connection forwarding between cpus.  This change significantly reduces the IPI rate for connection establishment.
158 * Increase max stage packet count to 16.  This increases the IP forwarding rate in tests by 200Kpps to 300Kpps.  Normal forwarding achieves 11.3Mpps while fastforwarding achieves 14.2Mpps.  Values higher than 16 do not improve the rate further.
159 * Set ip_porthash_trycount based on the number of netisrs.  This reduces connect IPIs on many-cores machines and improves the connection rate a bit in tests.
160 * Use a fast close if SO_LINGER and linger == 0.  This is widely used to reset a TCP connection by userland applications.
161 * Major updates to iwm.  Track firmware state better, improved handling of iwm_newstate(), avoid tx wsatchdog timeouts, improve time event handling, and more.
162 * More TSC and LAPIC timer calibration improvements.  Calibration times are typically reduced from 1 second to 200ms.
163
164 ### Other drivers
165
166 * Bring in vmx(4) (VMWare virtual network driver, aka vmxnet3)
167 * nvme driver now supports KVABIO for significantly higher performance and concurrency on many-core systems.
168 * Fix the capacity calculation in virtio_blk
169 * Upgrade arcmsr(4) to Areca's Revision 1.40.00.00, which adds support for ARC1203, ARC1216, ARC1226, and ARC1884.
170 * Fix mtime updates for deferred writes from shared R+W mmap()s.  This bug could cause make and other programs to get confused, often triggered by ld.gold's use of shared R+W mmap().
171 * Fix a vclean() assertion due to a short-cut taken by TMPFS.
172 * Improve compatibility for kqueue(2)'s EVFILT_FS support.
173 * Bring in autofs.
174 * Restore floppy driver functionality.  Floppies work again!  REJOICE!
175 * Bring in evdev from FreeBSD (a generic input event interface).  Add evdev support to kbdmux, ukbd, and ums.
176 * Fix dm disk info synchronization which could lead to a race that causes cryptsetup luksOpen to fail.
177
178 ### Userland
179
180 * Removed many 'r' commands and daemons.  rcp, rlogin, rlogind, rsh, and rshd have been removed.  People that still need them can get them from the net/bsdrcmds port.
181 * Remove mailaddr(7).
182 * Kernel configuration cleanup, numerous options that have been NOPs for a long time have been removed outright.
183 * Bring s_ceill() into libc from OpenBSD.
184 * Fix a few issues in libthread_xu that we believe were confusing certain heavily-threaded user applications, improving the stability of those applications.
185 * Refactor rtld locks as well as add an atfork() facility.  Refactor many libthread_xu modules (pthreads).  All this work improves the stability for fork/exec operations in heavily threaded environments (particularly chrome threads).
186 * Numerous pthreads fixes for chrome, thunderbird, and other heavily threaded programs.  Also use the new atfork() facility in our malloc implementation to fix deadlocks which could sometimes arise when heavily threaded programs fork().
187 * Fix locale support for cal(1).
188 * Fix symbol conflicts between libcrypt and LIBRECRYPTO (buildworld issues).
189 * Add static PAM modules support.
190 * Remove inherited helpers left over from the initial FreeBSD fork 10+ years ago.  Also remove helpers for upgrading directly from pre-4.4, as we no longer support upgrading directly from pre-4.4 (it is impossible due to compiler differences).
191 * Really support a static toolchain.
192 * Jailbreak games from Dungeon Master.  Games are no longer group-shared, improving security.  Only allow users in the games group to write to the /var/games directory.
193 * Remove dm(8).
194 * Patch and cleanup a few games.  battlestar(6), hack(6), rogue(6).
195 * Move-out non-games from /usr/games.  Move strfile(8) and unstr(8) to /usr/bin.
196 * Move banner(6) into games/ where it belongs.  
197 * Bring in OpenBSD's banner(1).  
198 * Bring in OpenBSD's boggle(6).
199 * Bring in OpenBSD's tetris(6).
200 * Add hostprog variant of tic and link against the wide version of ncurses.
201 * Update strfile() to big-endian and produce architecture-independent .dat files.
202 * Fix the ownership of several directories in /usr/share.
203 * Add a few more fortunes to fortune(6).
204 * Use O_CLOEXEC in many more places to reduce descriptor leakages when heavily threaded programs fork().
205 * Fix seg-faults in top(1) on many-core systems.
206 * Preemptive censor certain unnamed quotes in fortune because honestly we're a laid back BSD and don't want to deal with the flying crap.
207 * Add a helper script, efisetup(8), which will set up a blank storage device with appropriate gpt partitions for EFI and a DFly disklabel in s1.
208 * Add cfmakesane() to libc/termios.
209 * Add support for sha512 to md5(1).
210 * Handle size_t overflows in posix_memalign() and malloc().
211 * Add decoding functionality to morse(6).  You can use -r to supply a sequence of dots and dashes and morse(6) will decode it.
212 * Improve application compatibility by relaxing the return code on fflush() when used on a read-only stream.  Return success for this case.  Needed to support the c++ runtime library.  Taken from FreeBSD.
213 * Many manual page cleanups.
214 * Misc libc/locale cleanups and a few adjustments.
215 * libc/nls synchronized with FreeBSD (Jan 4 2018, roughly).
216 * Fix an old bug in newsyslog related to log file retention.  One extra file was being retained.
217 * Improve initrd/oinit crypto bootstrapping.  chdir into the new root before chrooting to it (fixes 'pwd' issues).  Also don't try to mount the real root when using the 'r' boot menu option to get to the rescue disk.
218 * Misc changes to periodic scripts, support, and utilities.  Primarily synchronized from FreeBSD.
219
220 ### Various tools have been upgraded in the base system:
221
222 * cpdup has a few new features to make .cpignore files more useful.
223 * cpdup is now able to rmdir chflagged directories (it already handles this properly for regular files).
224 * cpdup now ignores the UF_ARCHIVE file flag when deciding whether to copy a file.
225 * ls command has been enhanced with new options -S and -D, see manual page.
226 * Enhance nologin to log nologin attempts to syslog.
227 * Fix set-faults on crypt(3) failures.
228 * OpenSSH upgraded to 7.6p1.
229 * Update the pciconf(8) database to the Dec 20 2017 snapshot.
230 * Fix vmstat formatting to deal with large numbers and not run numbers into each other any more.
231 * Zoneinfo synchronized to tzdata2018d.
232 * Minor fixes to pr(1).
233 * newlocale(3) add compat support for c++ runtime libs.  Add support for native complex locale.
234 * Amd10h support added to cpucontrol.  Allows AMD microcodes to be installed from their packed format, instead of having to unpack them first (from FreeBSD).
235 * lvm(8) Add line editing support via libedit.
236 * Add a new modifier 'R' to newsyslog, alternative to sending a signal to the process.  Also, -n now implies -r.  mtime is updated after archiving.  Fix a few incorrect messages.  Fix interval-based rotations when the -t flag is used.  And a fix for NFS.  And many other adjustments. Mostly from FreeBSD.
237 * fish(6) no longer allows users to request cards they have made books for.
238 * Add a new directive to the gpt(8) utility called 'init' which does a bit more helpful work when creating a fresh gpt table.  It will create the msdos slice 0 and create a blank DragonFly Label64 in slice 1 that is ready to edit.  If -B is also specified, the msdos slice will be loaded with our EFI boot code.
239 * The disktype is now optional and deprecated for disklabel64.
240 * libpcap-1.8.1 imported.
241 * Misc mkinitrd improvements.
242
243 ### Hammer1 Changes
244
245 * Numerous cleanups.
246
247 ### Hammer2 Changes
248
249 * Many, many bug fixes, improving stability.
250 * Numerous performance fixes, including KVABIO support which improves performance on many-core systems.
251 * Add support for hammer2 cleaning in the periodic cron, enabled by default.
252 * Work around a bug in LZ4_compress_limitedOutput(), the code could sometimes overrun the supplied buffer.
253 * Add hammer2 utilities to initrd for hammer2 crypto bootstrapping and rescue.
254
255 ### Compiler status
256
257 * A port of gcc-80 is in-progress but not yet ready.
258 * Clang currently available via a dport, but there may still be issues trying to compile the world or kernel with it.
259
260 ### Package updates
261
262 * We can now build over 29000 packages.
263 * Note that firefox does not currently build due to the rust language being out of date.  We are working on that and also working on getting a more recent version of chrome into the tree.
264
265 ### 64-bit status
266
267 * Note that DragonFly is a 64-bit-only operating system as of 4.6, and will not run on 32-bit hardware.
268
269