User Details
- User Since
- Dec 14 2014, 5:52 AM (610 w, 1 d)
Tue, Aug 18
Revise a comment.
Sat, Aug 15
Move td = curthread; out of the critical section.
Fri, Aug 14
Tue, Aug 11
Mon, Aug 10
Sun, Aug 9
I'm waiting to hear if @andrew has any comments or questions.
As an aside, as the appearance of the word "harness" in the previous comment suggests, when I had Claude reviewing the changes, it actually built a user-space test harness containing the loop to check that every page in the range would be the target of an invalidation. And, it temporarily introduced a few bugs in the loop to check that those bugs were detected. Just thought this was interesting.
I ran a dozen -j8 buildworlds, each starting from an empty /usr/obj, with MALLOC_PRODUCTION enabled and LLVM assertions disabled on a GENERIC-NODEBUG kernel. Here is Claude's analysis of the data:
The change is a win. before after delta sys 1,070.67 1,012.58 −58.1 s (−5.43%) user 23,801.46 23,816.08 +14.6 s (+0.06%) user+sys 24,872.13 24,828.66 −43.5 s (−0.17%) wall 3,221.63 (53:41.63) 3,214.40 (53:34.40) −7.2 s (−0.22%)
Sat, Aug 8
While the conversion from a macro to an inline pmap_s1_invalidate_loop() had no real effect, just a couple instructions changed, pmap_s1_invalidate_strided() is not being inlined in some places due to its size. In that case, we are not benefiting from final_only always being a constant, but I think that is something for a different patch to deal with.
Convert macro to __always_inline function.
Fri, Aug 7
Sat, Aug 1
Jul 17 2026
I'm surprised that we didn't see this on arm64.
Jun 22 2026
May 7 2026
Apr 23 2026
Just out of curiosity, where are the pmap changes?
Apr 21 2026
Apr 20 2026
Apr 17 2026
Apr 16 2026
Mar 31 2026
"... pmap locks, than witness ..." -> "... pmap locks, then witness ..."
Mar 23 2026
Mar 5 2026
Feb 28 2026
@markj Do we know if there is actually a mix of clean and dirty pages being mapped?
Feb 27 2026
Jan 7 2026
Jan 6 2026
Jan 5 2026
Jan 1 2026
Dec 29 2025
Specifically, for now, I would commit the version in Diff 168641.
At this point, I would go back to the simpler, O(n) version, and commit that.
Dec 27 2025
Dec 26 2025
The changes here have led the compiler to unroll the first and final loops, making the machine code larger.
Curiously, the blogger's previous post contains a link to this page
Dec 25 2025
Dec 24 2025
Dec 23 2025
Dec 22 2025
Dec 21 2025
I guess that this review didn't get automatically closed?
This change is now similar to D43263. Abandon this one?
Dec 18 2025
P.S. The semester is winding down, so I have more spare time for reviews now.
Dec 17 2025
Since we are starting to expand the usage of vmem, I want to point out something that I only noticed around the time we added support for nextfit allocation. What we call bestfit is really an implementation of firstfit allocation. (A comment pointing this out was actually deleted from the Netbsd original when vmem was imported.) And, what we call firstfit is what, I believe, Solaris calls instantfit. We have no actual implementation of bestfit allocation. That said, mav's long ago change to "create own free list for each of the first 32 possible allocation sizes" has the effect of bestfit allocation for small sizes.
Dec 16 2025
Dec 9 2025
Dec 8 2025
Dec 3 2025
Dec 2 2025
Nov 28 2025
Nov 27 2025
Nov 26 2025
Nov 25 2025
Nov 24 2025
Nov 23 2025
Can you elaborate on what you saw when debugging this problem? In particular, whether the map entries had OBJ_ONEMAPPING set? In principle, the ref_count and size shouldn't be a concern if the object has OBJ_ONEMAPPING set. For example, suppose there is an anonymous mapping (with OBJ_ONEMAPPING set) for the range [A, D). Further, suppose we punch a hole in the middle of that mapping, by calling munmap() on the range [B, C) where A < B < C < D. Now, we have two mappings, [A, B) and [C, D), that both reference the original object, and that object should still have OBJ_ONEMAPPING set. Because OBJ_ONEMAPPING is set, the munmap() should have freed any physical pages and swap space from the object that fell within the range [B, C). So, if a new anonymous mapping is created starting at either B or D, we should be able to safely coalesce it.
