svn commit: r363532 - in head/sys: kern sys vm

2020-07-25 Thread Doug Moore
Author: dougm Date: Sat Jul 25 18:29:10 2020 New Revision: 363532 URL: https://svnweb.freebsd.org/changeset/base/363532 Log: Fix an overflow bug in the blist allocator that needlessly capped max swap size by dividing a value, which was always a multiple of 64, by 64. Remove the code that

svn commit: r363450 - in head: share/man/man3 sys/sys

2020-07-23 Thread Doug Moore
Author: dougm Date: Thu Jul 23 17:16:20 2020 New Revision: 363450 URL: https://svnweb.freebsd.org/changeset/base/363450 Log: Rank balanced (RB) trees are a class of balanced trees that includes AVL trees, red-black trees, and others. Weak AVL (wavl) trees are a recently discovered member of

svn commit: r362617 - head/sys/sys

2020-06-25 Thread Doug Moore
Author: dougm Date: Thu Jun 25 17:44:14 2020 New Revision: 362617 URL: https://svnweb.freebsd.org/changeset/base/362617 Log: Eliminate the color field from the RB element struct. Identify the color of a node (or, really, the color of the link from the parent to the node) by using one of the

svn commit: r362562 - head/sys/compat/linuxkpi/common/include/linux

2020-06-23 Thread Doug Moore
Author: dougm Date: Tue Jun 23 22:47:54 2020 New Revision: 362562 URL: https://svnweb.freebsd.org/changeset/base/362562 Log: In r362552, RB_SET_PARENT is defined, and use in parens in RB_CLEAR_NODE. But it is not an expression, and ought not to be enclosed in parens. Remove them.

svn commit: r362552 - in head/sys: compat/linuxkpi/common/include/linux sys

2020-06-23 Thread Doug Moore
Author: dougm Date: Tue Jun 23 20:02:55 2020 New Revision: 362552 URL: https://svnweb.freebsd.org/changeset/base/362552 Log: Define RB_SET_PARENT to do all assignments to rb parent pointers. Define RB_SWAP_CHILD to replace the child of a parent with its twin, and use it in 4 places. Use

svn commit: r362450 - head/sys/sys

2020-06-20 Thread Doug Moore
Author: dougm Date: Sat Jun 20 20:25:39 2020 New Revision: 362450 URL: https://svnweb.freebsd.org/changeset/base/362450 Log: In concluding RB_REMOVE_COLOR, in the case when the sibling of the root of the too-short tree is black and at least one of the children of that sibling is red, either

svn commit: r362139 - in head/sys: compat/linuxkpi/common/include/linux sys

2020-06-12 Thread Doug Moore
Author: dougm Date: Sat Jun 13 01:54:09 2020 New Revision: 362139 URL: https://svnweb.freebsd.org/changeset/base/362139 Log: Linuxkpi uses the rb-tree structures without using their interfaces, making them break when the representation changes. Revert changes that eliminated the color field

Re: svn commit: r362110 - head/sys/compat/linuxkpi/common/include/linux

2020-06-12 Thread Doug Moore
can.  Thanks for your inquiry. Doug Moore On 2020-06-12 12:53, Hans Petter Selasky wrote: > On 2020-06-12 19:51, Hans Petter Selasky wrote: >> On 2020-06-12 19:48, Doug Moore wrote: >>> Author: dougm >>> Date: Fri Jun 12 17:48:12 2020 >>> New Revision: 362110

svn commit: r362110 - head/sys/compat/linuxkpi/common/include/linux

2020-06-12 Thread Doug Moore
Author: dougm Date: Fri Jun 12 17:48:12 2020 New Revision: 362110 URL: https://svnweb.freebsd.org/changeset/base/362110 Log: Revert r362108, as it breaks compilation. Modified: head/sys/compat/linuxkpi/common/include/linux/rbtree.h Modified:

svn commit: r362108 - head/sys/compat/linuxkpi/common/include/linux

2020-06-12 Thread Doug Moore
Author: dougm Date: Fri Jun 12 16:51:55 2020 New Revision: 362108 URL: https://svnweb.freebsd.org/changeset/base/362108 Log: The linuxkpi code accesses left/right rb tree pointers without using RB_LEFT or RB_RIGHT, so they aren't stripping off the color bit encoded there. Strip off that bit

svn commit: r362000 - head/sys/sys

2020-06-09 Thread Doug Moore
Author: dougm Date: Wed Jun 10 03:36:17 2020 New Revision: 362000 URL: https://svnweb.freebsd.org/changeset/base/362000 Log: Fixup r361997 by balancing parens. Duh. Modified: head/sys/sys/tree.h Modified: head/sys/sys/tree.h

svn commit: r361997 - head/sys/sys

2020-06-09 Thread Doug Moore
Author: dougm Date: Wed Jun 10 02:50:25 2020 New Revision: 361997 URL: https://svnweb.freebsd.org/changeset/base/361997 Log: Restore an RB_COLOR macro, for the benefit of a bit of DIAGNOSTIC code that depends on it. Reported by: rpokala, mjguzik Reviewed by: markj Differential

svn commit: r361984 - in head/sys: compat/linuxkpi/common/include/linux sys

2020-06-09 Thread Doug Moore
Author: dougm Date: Tue Jun 9 20:19:11 2020 New Revision: 361984 URL: https://svnweb.freebsd.org/changeset/base/361984 Log: To reduce the size of an rb_node, drop the color field. Set the least significant bit in the pointer to the node from its parent to indicate that the node is red.

svn commit: r361727 - head/sys/sys

2020-06-02 Thread Doug Moore
Author: dougm Date: Tue Jun 2 17:18:16 2020 New Revision: 361727 URL: https://svnweb.freebsd.org/changeset/base/361727 Log: Remove from RB_REMOVE_COLOR some null checks where the pointer checked is provably never null. Restructure the surrounding code just enough to make the non-nullness

svn commit: r361640 - head/sys/sys

2020-05-29 Thread Doug Moore
Author: dougm Date: Sat May 30 01:48:12 2020 New Revision: 361640 URL: https://svnweb.freebsd.org/changeset/base/361640 Log: RB_REMOVE invokes RB_REMOVE_COLOR either when child is red or child is null. In the first case, RB_REMOVE_COLOR just changes the child to black and returns. With this

svn commit: r361324 - head/sys/sys

2020-05-20 Thread Doug Moore
Author: dougm Date: Thu May 21 05:34:02 2020 New Revision: 361324 URL: https://svnweb.freebsd.org/changeset/base/361324 Log: For the case when RB_REMOVE requires a nontrivial search to find the node to replace the one being removed, restructure to first remove the replacement node and

svn commit: r358268 - head/sys/vm

2020-02-23 Thread Doug Moore
Author: dougm Date: Mon Feb 24 04:01:09 2020 New Revision: 358268 URL: https://svnweb.freebsd.org/changeset/base/358268 Log: The last argument to swp_pager_getswapspace is always 1. Remove that argument. Reviewed by: markj Differential Revision:https://reviews.freebsd.org/D23810

svn commit: r357389 - head/sys/x86/iommu

2020-02-01 Thread Doug Moore
Author: dougm Date: Sat Feb 1 21:47:34 2020 New Revision: 357389 URL: https://svnweb.freebsd.org/changeset/base/357389 Log: In dmar_gas_lowermatch, skip searching a subtree if all its addresses are greater than lowaddr. In dmar_gas_uppermatch, skip searching a subtree if all its

svn commit: r357173 - in head/sys: sys x86/iommu

2020-01-27 Thread Doug Moore
Author: dougm Date: Mon Jan 27 15:09:13 2020 New Revision: 357173 URL: https://svnweb.freebsd.org/changeset/base/357173 Log: Correct the use of RB_AUGMENT in the RB_TREE macros so that is invoked at the root of every subtree that changes in an insert or delete, and only once, and ordered

svn commit: r357073 - head/sys/vm

2020-01-23 Thread Doug Moore
Author: dougm Date: Fri Jan 24 07:48:11 2020 New Revision: 357073 URL: https://svnweb.freebsd.org/changeset/base/357073 Log: Most uses of vm_map_clip_start follow a call to vm_map_lookup. Define an inline function vm_map_lookup_clip_start that invokes them both and use it in places that

svn commit: r356243 - head/sys/vm

2019-12-31 Thread Doug Moore
Author: dougm Date: Tue Dec 31 22:20:54 2019 New Revision: 356243 URL: https://svnweb.freebsd.org/changeset/base/356243 Log: The map-entry clipping functions modify start and end entries of an entry in the vm_map, making invariants related to the max_free entry field invalid. Move the

svn commit: r356131 - stable/11/sys/fs/tmpfs

2019-12-27 Thread Doug Moore
Author: dougm Date: Fri Dec 27 17:55:56 2019 New Revision: 356131 URL: https://svnweb.freebsd.org/changeset/base/356131 Log: MFC r355913 Allow #include to compile when _KERNEL is not #defined. Modified: stable/11/sys/fs/tmpfs/tmpfs.h Directory Properties: stable/11/ (props changed)

svn commit: r356130 - stable/12/sys/fs/tmpfs

2019-12-27 Thread Doug Moore
Author: dougm Date: Fri Dec 27 17:41:41 2019 New Revision: 356130 URL: https://svnweb.freebsd.org/changeset/base/356130 Log: MFC r355913 Allow #include to compile when _KERNEL is not #defined. Modified: stable/12/sys/fs/tmpfs/tmpfs.h Directory Properties: stable/12/ (props changed)

svn commit: r356028 - head/sys/vm

2019-12-22 Thread Doug Moore
Author: dougm Date: Sun Dec 22 21:53:05 2019 New Revision: 356028 URL: https://svnweb.freebsd.org/changeset/base/356028 Log: Fix typo using RB_INITIALIZER. The macro RB_INITIALIZER ignores its argument, but is documented to require "" as argument to initialize "head". So using

svn commit: r355913 - head/sys/fs/tmpfs

2019-12-19 Thread Doug Moore
Author: dougm Date: Thu Dec 19 16:39:52 2019 New Revision: 355913 URL: https://svnweb.freebsd.org/changeset/base/355913 Log: Including into non-kernel software leads to a compilation error because, without _KERNEL defined, the macro TMPFS_VALIDATE_DIR is invoked, but never defined.

svn commit: r355757 - head/sys/kern

2019-12-14 Thread Doug Moore
Author: dougm Date: Sat Dec 14 19:44:42 2019 New Revision: 355757 URL: https://svnweb.freebsd.org/changeset/base/355757 Log: Simplify the processing a leaf mask to find big-enough ranges of set bits, by storing and modifying the complement of the original leaf mask, and by avoiding some

svn commit: r355612 - head/sys/vm

2019-12-11 Thread Doug Moore
Author: dougm Date: Wed Dec 11 16:09:57 2019 New Revision: 355612 URL: https://svnweb.freebsd.org/changeset/base/355612 Log: Extract code common to _vm_map_clip_start and _vm_map_clip_end into a function, vm_map_entry_clone, that can be invoked by each. Reviewed by: kib, markj

svn commit: r355552 - head/sys/vm

2019-12-08 Thread Doug Moore
Author: dougm Date: Mon Dec 9 05:09:46 2019 New Revision: 32 URL: https://svnweb.freebsd.org/changeset/base/32 Log: Revert r355505. The code that it allowed to compile has been removed. Modified: head/sys/vm/vm_map.h Modified: head/sys/vm/vm_map.h

svn commit: r355538 - in head: lib/libprocstat sys/vm

2019-12-08 Thread Doug Moore
Author: dougm Date: Sun Dec 8 22:33:51 2019 New Revision: 355538 URL: https://svnweb.freebsd.org/changeset/base/355538 Log: Define a vm_map method for user-space for advancing from a map entry to its successor in cases where examining a map entry requires a helper like kvm_read_all. Use

svn commit: r355502 - head/lib/libprocstat

2019-12-07 Thread Doug Moore
Author: dougm Date: Sat Dec 7 18:40:46 2019 New Revision: 355502 URL: https://svnweb.freebsd.org/changeset/base/355502 Log: Fix a type error in fixing libprocstat to be compatible with vm_map changes. Approved by: markj Differential Revision: https://reviews.freebsd.org/D22726

svn commit: r355501 - head/lib/libprocstat

2019-12-07 Thread Doug Moore
Author: dougm Date: Sat Dec 7 18:16:35 2019 New Revision: 355501 URL: https://svnweb.freebsd.org/changeset/base/355501 Log: r355491 broke compilation of libprocstat.c. Change that code to use new methods for accessing first, next map entries. Approved by: kib Differential Revision:

svn commit: r355491 - head/sys/vm

2019-12-07 Thread Doug Moore
Author: dougm Date: Sat Dec 7 17:14:33 2019 New Revision: 355491 URL: https://svnweb.freebsd.org/changeset/base/355491 Log: Remove the next and prev fields from vm_map_entry, to save a bit of space. Where the vm_map tree now has null pointers, store pointers to next and previous entries

svn commit: r355377 - head/sys/sys

2019-12-03 Thread Doug Moore
Author: dougm Date: Wed Dec 4 03:36:54 2019 New Revision: 355377 URL: https://svnweb.freebsd.org/changeset/base/355377 Log: Change the implementation of bit_ffc_area_at so that, in the worst case, the number of operations spent on each b-bit word is proportional to lg b rather than b.

svn commit: r355296 - stable/12/sys/vm

2019-12-02 Thread Doug Moore
Author: dougm Date: Mon Dec 2 17:28:20 2019 New Revision: 355296 URL: https://svnweb.freebsd.org/changeset/base/355296 Log: MFC r348749 - Speed-up vm_reserv_reclaim_config. Requested by: markj Modified: stable/12/sys/vm/vm_reserv.c Directory Properties: stable/12/ (props changed)

svn commit: r355201 - head/sys/vm

2019-11-28 Thread Doug Moore
Author: dougm Date: Fri Nov 29 02:06:45 2019 New Revision: 355201 URL: https://svnweb.freebsd.org/changeset/base/355201 Log: Functions that call vm_map_splay_merge sometimes set data fields (e.g. root->left = NULL) to affect the behavior of that function. This change stops that data

svn commit: r355147 - head/sys/vm

2019-11-27 Thread Doug Moore
Author: dougm Date: Wed Nov 27 21:00:44 2019 New Revision: 355147 URL: https://svnweb.freebsd.org/changeset/base/355147 Log: Inline some splay helper functions to improve performance on a micro-benchmark. Reviewed by: markj Tested by: pho Differential Revision:

svn commit: r355076 - head/sys/vm

2019-11-24 Thread Doug Moore
Author: dougm Date: Mon Nov 25 02:19:47 2019 New Revision: 355076 URL: https://svnweb.freebsd.org/changeset/base/355076 Log: Where 'current' is used to index over vm_map entries, use 'entry'. Where 'entry' is used to identify the starting point for iteration, use 'first_entry'. These are

svn commit: r355049 - stable/11/sys/vm

2019-11-23 Thread Doug Moore
Author: dougm Date: Sun Nov 24 06:54:17 2019 New Revision: 355049 URL: https://svnweb.freebsd.org/changeset/base/355049 Log: MFC r354785 The loop in vm_map_protect that verifies that all transition map entries are stabilized, repeatedly verifies the same entry. Check each entry in

svn commit: r355048 - stable/12/sys/vm

2019-11-23 Thread Doug Moore
Author: dougm Date: Sun Nov 24 06:46:49 2019 New Revision: 355048 URL: https://svnweb.freebsd.org/changeset/base/355048 Log: MFC r354785 The loop in vm_map_protect that verifies that all transition map entries are stabilized, repeatedly verifies the same entry. Check each entry in

svn commit: r355032 - head/tests/sys/sys

2019-11-23 Thread Doug Moore
Author: dougm Date: Sat Nov 23 17:22:36 2019 New Revision: 355032 URL: https://svnweb.freebsd.org/changeset/base/355032 Log: The error messages that indicate bugs in 'area' bitstring functions should identify accurately which function exhibited the bug. Reviewed by: asomers MFC after:

svn commit: r354895 - in head/sys: security/mac vm

2019-11-20 Thread Doug Moore
Author: dougm Date: Wed Nov 20 16:06:48 2019 New Revision: 354895 URL: https://svnweb.freebsd.org/changeset/base/354895 Log: Instead of looking up a predecessor or successor to the current map entry, when that entry has been seen already, keep the already-looked-up value in a variable and

svn commit: r354850 - head/sys/vm

2019-11-19 Thread Doug Moore
Author: dougm Date: Tue Nov 19 08:06:31 2019 New Revision: 354850 URL: https://svnweb.freebsd.org/changeset/base/354850 Log: Drop the extra argument from swp_pager_meta_ctl and have it do lookup only. Rename it swp_pager_meta_lookup. Stop checking for obj->type == swap there and assert it

svn commit: r354795 - head/sys/vm

2019-11-17 Thread Doug Moore
Author: dougm Date: Sun Nov 17 18:38:37 2019 New Revision: 354795 URL: https://svnweb.freebsd.org/changeset/base/354795 Log: Add a helper function for testing a swap block and freeing it if empty. Submitted by: ota_j.email.ne.jp Approved by: alc, kib, dougm Differential Revision:

svn commit: r354785 - head/sys/vm

2019-11-16 Thread Doug Moore
Author: dougm Date: Sun Nov 17 06:50:36 2019 New Revision: 354785 URL: https://svnweb.freebsd.org/changeset/base/354785 Log: The loop in vm_map_protect that verifies that all transition map entries are stabilized, repeatedly verifies the same entry. Check each entry in turn. Reviewed

svn commit: r354684 - in head/sys: security/mac vm

2019-11-13 Thread Doug Moore
Author: dougm Date: Wed Nov 13 15:56:07 2019 New Revision: 354684 URL: https://svnweb.freebsd.org/changeset/base/354684 Log: Define wrapper functions vm_map_entry_{succ,pred} to act as wrappers around entry->{next,prev} when those are used for ordered list traversal, and use those wrapper

svn commit: r354618 - head/sys/vm

2019-11-11 Thread Doug Moore
Author: dougm Date: Mon Nov 11 16:59:49 2019 New Revision: 354618 URL: https://svnweb.freebsd.org/changeset/base/354618 Log: swap_pager_meta_free() frees allocated blocks in a way that exploits the sparsity of allocated blocks in a range, without issuing an "are you there?" query for every

svn commit: r354570 - head/sys/vm

2019-11-09 Thread Doug Moore
Author: dougm Date: Sat Nov 9 17:08:27 2019 New Revision: 354570 URL: https://svnweb.freebsd.org/changeset/base/354570 Log: For vm_map, #defining DIAGNOSTIC to turn on full assertion-based consistency checking slows performance dramatically. This change reduces the number of assertions

svn commit: r353497 - head/sys/vm

2019-10-14 Thread Doug Moore
Author: dougm Date: Mon Oct 14 17:51:57 2019 New Revision: 353497 URL: https://svnweb.freebsd.org/changeset/base/353497 Log: Correct a transcription error that broke GENERIC introduced in r353496. Modified: head/sys/vm/vm_map.c Modified: head/sys/vm/vm_map.c

svn commit: r353496 - head/sys/vm

2019-10-14 Thread Doug Moore
Author: dougm Date: Mon Oct 14 17:15:42 2019 New Revision: 353496 URL: https://svnweb.freebsd.org/changeset/base/353496 Log: Move the definition of _vm_map_assert_consistent so that it can use vm_map_free_{left,right} rather than re-implementing them. Use the VM_MAP_FOREACH macro where

svn commit: r353298 - in head/sys: compat/linprocfs dev/hwpmc fs/procfs fs/tmpfs kern security/mac vm

2019-10-08 Thread Doug Moore
Author: dougm Date: Tue Oct 8 07:14:21 2019 New Revision: 353298 URL: https://svnweb.freebsd.org/changeset/base/353298 Log: Define macro VM_MAP_ENTRY_FOREACH for enumerating the entries in a vm_map. In case the implementation ever changes from using a chain of next pointers, then changing

svn commit: r352433 - head/sys/vm

2019-09-16 Thread Doug Moore
Author: dougm Date: Tue Sep 17 02:53:59 2019 New Revision: 352433 URL: https://svnweb.freebsd.org/changeset/base/352433 Log: Remove dead code from vm_map_unlink_entry made dead by r351476, and also a no-longer-used enumerant. Reviewed by: alc Approved by: markj (mentor, implicit)

svn commit: r352366 - stable/12/sys/vm

2019-09-15 Thread Doug Moore
Author: dougm Date: Sun Sep 15 21:13:13 2019 New Revision: 352366 URL: https://svnweb.freebsd.org/changeset/base/352366 Log: MFC r348809, r349767 Let swap_pager_swapoff_object and swp_pager_force_pagein operate on multiple pages per I/O operation. Reviewed by: alc Approved by: markj

svn commit: r352365 - in stable/12: sbin/swapon share/man/man5 sys/vm

2019-09-15 Thread Doug Moore
Author: dougm Date: Sun Sep 15 20:13:46 2019 New Revision: 352365 URL: https://svnweb.freebsd.org/changeset/base/352365 Log: MFC 351064 Don't let swapon trimming wipe the bsd label. Reviewed by: alc Approved by: markj (mentor, implicit) Modified: stable/12/sbin/swapon/swapon.8

svn commit: r351476 - in head/sys: security/mac vm

2019-08-25 Thread Doug Moore
Author: dougm Date: Sun Aug 25 07:06:51 2019 New Revision: 351476 URL: https://svnweb.freebsd.org/changeset/base/351476 Log: vm_map_simplify_entry considers merging an entry with its two neighbors, and is used in a way so that if entries a and b cannot be merged, we consider them twice,

svn commit: r351150 - stable/12/sys/vm

2019-08-16 Thread Doug Moore
Author: dougm Date: Fri Aug 16 21:54:12 2019 New Revision: 351150 URL: https://svnweb.freebsd.org/changeset/base/351150 Log: MFC r348968: Avoid overflow in computing gap sizes. Approved by: markj (mentor) Modified: stable/12/sys/vm/vm_map.c Directory Properties: stable/12/ (props

svn commit: r351148 - stable/12/sys/vm

2019-08-16 Thread Doug Moore
Author: dougm Date: Fri Aug 16 21:36:13 2019 New Revision: 351148 URL: https://svnweb.freebsd.org/changeset/base/351148 Log: MFC r348881: Touch fewer entries when altering vm_map. Approved by: markj (mentor) Modified: stable/12/sys/vm/vm_map.c Directory Properties: stable/12/

svn commit: r351064 - in head: sbin/swapon share/man/man5 sys/vm

2019-08-14 Thread Doug Moore
Author: dougm Date: Thu Aug 15 02:30:44 2019 New Revision: 351064 URL: https://svnweb.freebsd.org/changeset/base/351064 Log: swap_pager.c reserves 2 blocks for a bsd label. Change that 2 to the expression howmany(BBSIZE, PAGE_SIZE), where BBSIZE is the size of the boot block area. That

svn commit: r350495 - stable/12/sbin/swapon

2019-07-31 Thread Doug Moore
Author: dougm Date: Thu Aug 1 05:30:31 2019 New Revision: 350495 URL: https://svnweb.freebsd.org/changeset/base/350495 Log: MFC r350183, r350359 In trimming on startup, define swapon_trim() to invoke swapon before closing the fd used for trimming so that a geli device isn't detached

svn commit: r350392 - head/sys/vm

2019-07-28 Thread Doug Moore
Author: dougm Date: Sun Jul 28 19:32:23 2019 New Revision: 350392 URL: https://svnweb.freebsd.org/changeset/base/350392 Log: In swap_pager_putpages, move the initialization of a free-blocks counter, and the final freeing of freed swap blocks, outside the region where an object lock is held.

svn commit: r350359 - head/sbin/swapon

2019-07-26 Thread Doug Moore
Author: dougm Date: Fri Jul 26 15:18:11 2019 New Revision: 350359 URL: https://svnweb.freebsd.org/changeset/base/350359 Log: Rewrite the comments that explain swapon_trim() to make them more comprehensible. Suggested by: rpokala Approved by: markj (mentor) Differential Revision:

svn commit: r350183 - head/sbin/swapon

2019-07-20 Thread Doug Moore
Author: dougm Date: Sat Jul 20 20:47:07 2019 New Revision: 350183 URL: https://svnweb.freebsd.org/changeset/base/350183 Log: In trimming on startup, invoke swapon before closing the fd used for trimming so that a geli device isn't detached before swapon is invoked. Submitted by:

svn commit: r350155 - head/sys/vm

2019-07-19 Thread Doug Moore
Author: dougm Date: Fri Jul 19 20:47:35 2019 New Revision: 350155 URL: https://svnweb.freebsd.org/changeset/base/350155 Log: Define vm_map_entry_in_transition to handle an in-transition map entry, combining code currently in vm_map_unwire and vm_map_wire_locked into a single function,

svn commit: r349930 - in stable/12: sbin/swapon share/man/man5

2019-07-11 Thread Doug Moore
Author: dougm Date: Fri Jul 12 02:03:43 2019 New Revision: 349930 URL: https://svnweb.freebsd.org/changeset/base/349930 Log: MFC r349286, r349293 Modify swapon(8) to invoke BIO_DELETE to trim swap devices, either if '-E' appears on the swapon command line, or if "trimonce" appears as

svn commit: r349923 - head/sys/kern

2019-07-11 Thread Doug Moore
Author: dougm Date: Thu Jul 11 20:52:39 2019 New Revision: 349923 URL: https://svnweb.freebsd.org/changeset/base/349923 Log: Address problems in blist_alloc introduced in r349777. The swap block allocator could become corrupted if a retry to allocate swap space, after a larger allocation

svn commit: r349799 - head/sys/vm

2019-07-07 Thread Doug Moore
Author: dougm Date: Sun Jul 7 06:57:04 2019 New Revision: 349799 URL: https://svnweb.freebsd.org/changeset/base/349799 Log: A style-related change, r349791, made unclear the meaning of a comment. Rewrite that comment to improve its clarity. Reported by: cem Reviewed by: alc, cem

svn commit: r349791 - head/sys/vm

2019-07-06 Thread Doug Moore
Author: dougm Date: Sat Jul 6 15:55:16 2019 New Revision: 349791 URL: https://svnweb.freebsd.org/changeset/base/349791 Log: Fix style(9) violations involving division by PAGE_SIZE. Reviewed by: alc Approved by: markj (mentor) Differential Revision: https://reviews.freebsd.org/D20847

svn commit: r349777 - in head/sys: kern vm

2019-07-06 Thread Doug Moore
Author: dougm Date: Sat Jul 6 06:15:03 2019 New Revision: 349777 URL: https://svnweb.freebsd.org/changeset/base/349777 Log: Change blist_next_leaf_alloc so that it can examine more than one leaf after the one where the possible block allocation begins, and allocate a larger number of

svn commit: r349767 - head/sys/vm

2019-07-05 Thread Doug Moore
Author: dougm Date: Fri Jul 5 16:49:34 2019 New Revision: 349767 URL: https://svnweb.freebsd.org/changeset/base/349767 Log: Based on work posted at https://reviews.freebsd.org/D13484, change swap_pager_swapoff_object and swp_pager_force_pagein so that they can page in multiple pages at a

svn commit: r349745 - head/sys/vm

2019-07-04 Thread Doug Moore
Author: dougm Date: Thu Jul 4 19:25:30 2019 New Revision: 349745 URL: https://svnweb.freebsd.org/changeset/base/349745 Log: Move an assignment, drop a label, and change gotos to break statements in vm_map_unwire. The code generated on amd86 is unchanged. Approved by: markj (mentor)

svn commit: r349744 - head/sys/vm

2019-07-04 Thread Doug Moore
Author: dougm Date: Thu Jul 4 19:17:55 2019 New Revision: 349744 URL: https://svnweb.freebsd.org/changeset/base/349744 Log: Replace a 'goto' with an 'else' in vm_map_wire_locked. Reviewed by: alc Approved by: markj (mentor) Differential Revision:

svn commit: r349743 - head/sys/vm

2019-07-04 Thread Doug Moore
Author: dougm Date: Thu Jul 4 19:12:13 2019 New Revision: 349743 URL: https://svnweb.freebsd.org/changeset/base/349743 Log: Change boolean_t variables in vm_map_unwire and vm_map_wire_locked to bool. Drop result variable. Add holes_ok bool to replace repeated masking of flags parameter.

svn commit: r349741 - head/sys/vm

2019-07-04 Thread Doug Moore
Author: dougm Date: Thu Jul 4 18:28:49 2019 New Revision: 349741 URL: https://svnweb.freebsd.org/changeset/base/349741 Log: Drop a temp variable from vm_map_insert, with no effect on the resulting amd64 machine code. Reviewed by: alc Approved by: kib, markj (mentors, implicit)

svn commit: r349713 - head/sys/vm

2019-07-03 Thread Doug Moore
Author: dougm Date: Wed Jul 3 22:41:54 2019 New Revision: 349713 URL: https://svnweb.freebsd.org/changeset/base/349713 Log: Eliminate a goto and a label in vm_map_wire_locked by inserting an 'else'. Reviewed by: alc Approved by: kib, markj (mentors, implicit) Differential Revision:

svn commit: r349550 - head/sys/vm

2019-06-29 Thread Doug Moore
Author: dougm Date: Sun Jun 30 02:08:13 2019 New Revision: 349550 URL: https://svnweb.freebsd.org/changeset/base/349550 Log: Remove a call to vm_map_simplify_entry from _vm_map_clip_start. Recent changes to vm_map_protect have made it unnecessary. Reviewed by: alc Approved by: kib

svn commit: r349498 - head/sys/vm

2019-06-27 Thread Doug Moore
Author: dougm Date: Fri Jun 28 02:14:54 2019 New Revision: 349498 URL: https://svnweb.freebsd.org/changeset/base/349498 Log: If vm_map_protect fails with KERN_RESOURCE_SHORTAGE, be sure to simplify modified entries before returning. Reviewed by: alc, markj (earlier version), kib (earlier

svn commit: r349405 - head/sys/vm

2019-06-25 Thread Doug Moore
Author: dougm Date: Wed Jun 26 03:12:57 2019 New Revision: 349405 URL: https://svnweb.freebsd.org/changeset/base/349405 Log: Revert r349393, which leads to an assertion failure on bootup, in vm_map_stack_locked. Reported by: l...@lerctr.org Approved by: kib, markj (mentors, implicit)

svn commit: r349393 - head/sys/vm

2019-06-25 Thread Doug Moore
Author: dougm Date: Tue Jun 25 20:25:16 2019 New Revision: 349393 URL: https://svnweb.freebsd.org/changeset/base/349393 Log: Eliminate some uses of the prev and next fields of vm_map_entry_t. Since the only caller to vm_map_splay is vm_map_lookup_entry, move the implementation of

svn commit: r349379 - head/share/man/man9

2019-06-25 Thread Doug Moore
Author: dougm Date: Tue Jun 25 17:27:37 2019 New Revision: 349379 URL: https://svnweb.freebsd.org/changeset/base/349379 Log: Document the KERN_PROTECTION_FAILURE return value from vm_map_protect(). Reviewed by: alc (earlier version) Approved by: kib, markj (mentors) Differential

Re: svn commit: r349363 - head/sys/vm

2019-06-25 Thread Doug Moore
I regret that I omitted the following from the commit message below: Tested by: pho Doug Moore On 6/25/19 2:44 AM, Doug Moore wrote: > Author: dougm > Date: Tue Jun 25 07:44:37 2019 > New Revision: 349363 > URL: https://svnweb.freebsd.org/changeset/base/349363 > > Log: >

svn commit: r349363 - head/sys/vm

2019-06-25 Thread Doug Moore
Author: dougm Date: Tue Jun 25 07:44:37 2019 New Revision: 349363 URL: https://svnweb.freebsd.org/changeset/base/349363 Log: vm_map_protect may return an INVALID_ARGUMENT or PROTECTION_FAILURE error response after clipping the first map entry in the region to be reserved. This creates a

svn commit: r349293 - head/sbin/swapon

2019-06-22 Thread Doug Moore
Author: dougm Date: Sat Jun 22 19:27:09 2019 New Revision: 349293 URL: https://svnweb.freebsd.org/changeset/base/349293 Log: You can't use block special nodes for swap, so don't let that happen. Fix a style violation with regard to header file arrangement. Improved by: alc Approved

svn commit: r349286 - in head: sbin/swapon share/man/man5

2019-06-21 Thread Doug Moore
Author: dougm Date: Sat Jun 22 03:16:01 2019 New Revision: 349286 URL: https://svnweb.freebsd.org/changeset/base/349286 Log: Modify swapon(8) to invoke BIO_DELETE to trim swap devices, either if '-E' appears on the swapon command line, or if "trimonce" appears as an fstab option.

Re: svn commit: r349046 - head/sys/vm

2019-06-14 Thread Doug Moore
The patch makes it appear that a call to vm_map_simplify_entry has been removed, and that another has been added.  They are the same call, just moved from after a comment to before it. Doug Moore On 6/15/19 12:30 AM, Oliver Pinter wrote: > > > On Saturday, June 15, 2019, Doug Moore &

svn commit: r349046 - head/sys/vm

2019-06-14 Thread Doug Moore
Author: dougm Date: Sat Jun 15 04:30:13 2019 New Revision: 349046 URL: https://svnweb.freebsd.org/changeset/base/349046 Log: Critical comments were lost in r349203. This patch seeks to restore the lost information in new comments. Reported by: alc Reviewed by: alc Approved by: kib

svn commit: r349030 - head/sys/vm

2019-06-13 Thread Doug Moore
Author: dougm Date: Fri Jun 14 03:15:54 2019 New Revision: 349030 URL: https://svnweb.freebsd.org/changeset/base/349030 Log: Avoid using the prev field of vm_map_entry_t in two functions that iterate over consecutive vm_map entries, and that can easily just 'remember' the prev value instead

svn commit: r349023 - head/sys/vm

2019-06-13 Thread Doug Moore
Author: dougm Date: Thu Jun 13 20:09:07 2019 New Revision: 349023 URL: https://svnweb.freebsd.org/changeset/base/349023 Log: Create a function for creating objects to back map entries, and one for giving cred to a map entry backed by an object, and use them instead of the code duplicated

svn commit: r348968 - head/sys/vm

2019-06-11 Thread Doug Moore
Author: dougm Date: Tue Jun 11 22:41:39 2019 New Revision: 348968 URL: https://svnweb.freebsd.org/changeset/base/348968 Log: To test to see if a free space is big enough compare the required length to the difference of the two offsets that define the gap, to avoid overflow, rather that

svn commit: r348883 - head/sys/vm

2019-06-10 Thread Doug Moore
Author: dougm Date: Mon Jun 10 22:06:40 2019 New Revision: 348883 URL: https://svnweb.freebsd.org/changeset/base/348883 Log: r348879 introduced a wrong-way comparison that broke mmap. This change rights that comparison. Reported by: pho Approved by: markj (mentor) MFC after: 3 days

svn commit: r348881 - head/sys/vm

2019-06-10 Thread Doug Moore
Author: dougm Date: Mon Jun 10 21:34:07 2019 New Revision: 348881 URL: https://svnweb.freebsd.org/changeset/base/348881 Log: The computations of vm_map_splay_split and vm_map_splay_merge touch both children of every entry on the search path as part of updating values of the max_free field.

svn commit: r348879 - in head/sys: sys vm

2019-06-10 Thread Doug Moore
Author: dougm Date: Mon Jun 10 21:26:14 2019 New Revision: 348879 URL: https://svnweb.freebsd.org/changeset/base/348879 Log: Change the check for 'size' wrapping around to zero in kern_mmap to account for both the lower and upper bound modifications. Change the error returned to ENOMEM.

Re: svn commit: r348843 - head/sys/vm

2019-06-10 Thread Doug Moore
The comment and the code that rejects size==0, or doesn't, are copied below.  Konstantin Belousov is the last person to have touched most of it, and can better explain its meaning than I. Doug Moore     /*      * Enforce the constraints.      * Mapping of length 0 is only allowed for old

Re: svn commit: r348843 - head/sys/vm

2019-06-10 Thread Doug Moore
was transformed to zero, and which was the problem that Peter Holm reported. Doug Moore On 6/10/19 8:00 AM, Shawn Webb wrote: > On Mon, Jun 10, 2019 at 03:07:11AM +0000, Doug Moore wrote: >> Author: dougm >> Date: Mon Jun 10 03:07:10 2019 >> New Revision: 348843 >> URL: https://s

Re: svn commit: r348843 - head/sys/vm

2019-06-10 Thread Doug Moore
-fwrapv concerns signed arithmetic.  This calculation is with unsigned arithmetic, and the possibility of wrapping around to 0 is part of the language. Doug Moore On 6/10/19 1:35 AM, Andriy Gapon wrote: > On 10/06/2019 06:07, Doug Moore wrote: >> Author: dougm >> Date: Mon Jun 1

Re: svn commit: r348843 - head/sys/vm

2019-06-09 Thread Doug Moore
I understand that I ought to have included this in the previous checkin. MFC after: 3 days and that my description of the appropriateness of len==0 passed to mmap was imprecise.  I regret the error. Doug Moore On 6/9/19 10:07 PM, Doug Moore wrote: > Author: dougm > Date: Mon Jun 10 03

svn commit: r348843 - head/sys/vm

2019-06-09 Thread Doug Moore
Author: dougm Date: Mon Jun 10 03:07:10 2019 New Revision: 348843 URL: https://svnweb.freebsd.org/changeset/base/348843 Log: There are times when a len==0 parameter to mmap is okay. But on a 32-bit machine, a len parameter just a few bytes short of 4G, rounded up to a page boundary and

svn commit: r348809 - head/sys/vm

2019-06-08 Thread Doug Moore
Author: dougm Date: Sat Jun 8 17:49:17 2019 New Revision: 348809 URL: https://svnweb.freebsd.org/changeset/base/348809 Log: Simple code refactoring originally in D13484. Extract swp_pager_force_dirty() and swp_pager_force_launder() out of swp_pager_force_pagein(). Extract

svn commit: r348749 - head/sys/vm

2019-06-06 Thread Doug Moore
Author: dougm Date: Thu Jun 6 16:28:34 2019 New Revision: 348749 URL: https://svnweb.freebsd.org/changeset/base/348749 Log: The means of finding ranges of free pages was changed for vm_reserv_break in r348484, and there was found to improve performance minutely and reduce code size. This

svn commit: r348665 - head/usr.bin/calendar/calendars

2019-06-04 Thread Doug Moore
in Yalta, Crimea, USSR, 1988 11/28 Nik Clayton born in Peterborough, United Kingdom, 1973 11/28 Stanislav Sedov born in Chelyabinsk, USSR, 1985 +11/29 Doug Moore born in Arlington, Texas, United States, 1960 12/01 Hajimu Umemoto born in Nara, Japan, 1961 12/01 Alexey Dokuchaev born

Re: svn commit: r348484 - head/sys/vm

2019-06-01 Thread Doug Moore
On 5/31/19 10:05 PM, Kubilay Kocak wrote: > On 1/06/2019 7:02 am, Doug Moore wrote: >> Author: dougm >> Date: Fri May 31 21:02:42 2019 >> New Revision: 348484 >> URL: https://svnweb.freebsd.org/changeset/base/348484 >> > Can this be an MFC ca

svn commit: r348484 - head/sys/vm

2019-05-31 Thread Doug Moore
Author: dougm Date: Fri May 31 21:02:42 2019 New Revision: 348484 URL: https://svnweb.freebsd.org/changeset/base/348484 Log: The function vm_phys_free_contig invokes vm_phys_free_pages for every power-of-two page block it frees, launching an unsuccessful search for a buddy to pair up with

  1   2   >