In all the loops over map entries where the iterator wasn't called 'entry' and the last several versions of this patch renamed it to 'entry', revert the name back to what is was before, mostly limiting this patch to its original purpose and leaving a renaming patch for another day.
- Queries
- All Stories
- Search
- Advanced Search
- Transactions
- Transaction Logs
Advanced Search
Nov 20 2019
Undo some overzealous style-fixing.
Address online and offline comments.
Address reviewer feedback.
Address small style violations from an in-person review.
Nov 19 2019
Update after overlapping change.
Accept reviewer suggestions. Where the introduction of "next_entry" suggests that a for loop could replace a while loop, do so. Where that looks tricky because of a mid-loop continue (wire/unwire), make sure the continue case sets next_entry too. Observe that this all makes the 'first_iteration' state variable redundant, and eliminate it.
Nov 18 2019
Add dstobject->type == OBJT_SWAP test in swp_pager_xfer_source.
Missing semicolon.
Fix a leak pointed out by Ota on a different review thread.
Make that a write lock on deletion.
Nov 17 2019
Adapt to recent swap_pager.c change.
Use the FOREACH macros for iterating over the old map in vm_fork. Reformat a comment to fit in 80 columns.
Update to account for r354785. Address reviewer comments.
Nov 16 2019
Clean up the comment following the change.
I can't comment on the accuracy of any of this, but I can channel my 9th grade English teacher, Mrs. Weaver. There's some more passive voice in there (is awakened? by who?), but you're probably more interested in technical feedback.
I see nothing clearly wrong with this.
Rewrite a couple of lines to that prev_entry isn't, briefly, after entry.
Fix a transcription error.
Rename variables in vm_map loops, so that the fixed starting point is called 'first_entry', the iterator is called 'entry', and the iterator trailing it, if any, is called 'prev_entry'.
Nov 15 2019
This change reduces the size of mac_process.o and vm_map.o by 56 and 656 bytes, respectively, on the amd64 machine I'm testing on.
Add parens around returned value in vm_map_entry_first.
Fix indentation.
Nov 13 2019
Nov 12 2019
In D21964#488336, @markj wrote:I read through this a couple of times and it seems fine to me. You might consider breaking this into several patches, the first of which introduces vm_map_entry_{pred,succ}() as wrappers for direct accesses of entry->next and entry->pred and converts existing code to use them.
Nov 11 2019
Remove an inaccurate comment.
Rename "copy" to "xfer" or "transfer" in several places.
Move a dstobject==NULL test from callee to caller.
Nov 10 2019
Fix indentation. Discard some comments.
Discard the changes that eliminate swap_meta_ctl. Those changes distract from the primary purpose of this change.
Nov 9 2019
Resolve conflicts.
Define swp_pager_meta_copy_free to implement swp_pager_meta_free and part of swap_pager_copy, to avoid code duplication and to exploit some of the optimizations of the meta_free code when copying.
Nov 8 2019
Nov 7 2019
I'll commit this over the upcoming weekend if there are no further comments.
Nov 4 2019
Oct 30 2019
Get it to compile in GENERIC, with DIAGNOSTIC defined or not.
Initialize nupdates in init.
Add a missing "while(0)"
For cases when DIAGNOSTIC is #defined, add a counter to vm_map, to count the number of map updates since last write-unlock assertion check. Add a potential thread-unlock assertion check everywhere the map lock is freed or downgraded after a potential map update, where 'potential' means 'only if the operation count exceeds the number of map entries'. Make the default behavior, when DIAGNOSTIC is defined, to only to assertion checks in these unlock cases, but leave in the possibility of doing all the assertion checks we do now, for the sake of the person trying to debug a problem highlighted by the infrequent assertion checks.
Oct 29 2019
Oct 26 2019
Oct 17 2019
Fix a bug in the debug patch.
Here is a small patch that adds a few KASSERTS. There might be some value in seeing which of them is tripped first on the way to this failure.
Oct 16 2019
It seems that this change broke something:
Hi Doug,
Oct 14 2019
Restore the invariant-checking code that fell out of the last patch.
Reformat vm_map_entry_{pred,succ}.
Would there be a problem with changing the #defines:
#define PQ_NONE 255
#define PQ_UNSWAPPABLE 0
#define PQ_LAUNDRY 1
#define PQ_INACTIVE 2
#define PQ_ACTIVE 3
#define PQ_COUNT 4
Oct 13 2019
Oct 12 2019
Oct 10 2019
Oct 8 2019
VME_ -> VM_MAP_ENTRY_
Remove purposeless counter.
Move KASSERT out of loop.