Page MenuHomeFreeBSD
Feed Advanced Search

Dec 31 2021

dougm closed D33685: Define and use standard functions for alignment checking.
Dec 31 2021, 4:14 AM
dougm updated the diff for D33701: BITSET_FFS, FLS corrections and extensions.

Fix comments and manpage for 0-based start values. Generalize to BIT_FLS_AT and to FLC versions of everything to find clear bits.

Dec 31 2021, 3:52 AM

Dec 30 2021

dougm added a comment to D33701: BITSET_FFS, FLS corrections and extensions.

Another note of interest:
I find two uses of BIT_FFS_AT in the code:

Dec 30 2021, 10:50 PM
dougm updated the diff for D33701: BITSET_FFS, FLS corrections and extensions.

Tweak the mask-last-bits test.

Dec 30 2021, 10:05 PM
dougm updated the test plan for D33701: BITSET_FFS, FLS corrections and extensions.
Dec 30 2021, 9:50 PM
dougm added a comment to D33701: BITSET_FFS, FLS corrections and extensions.

A point of confusion: if 'start' is a one-based index, as the comment claims, then how is
#define BIT_FFS(_s, p) BIT_FFS_AT((_s), (p), 0)
correct? Wouldn't it be:
#define BIT_FFS(_s, p) BIT_FFS_AT((_s), (p), 1)
Really, I suspect the comment is wrong.

Dec 30 2021, 9:03 PM
dougm requested review of D33701: BITSET_FFS, FLS corrections and extensions.
Dec 30 2021, 8:00 PM

Dec 29 2021

dougm updated subscribers of D33685: Define and use standard functions for alignment checking.
Dec 29 2021, 6:17 PM
dougm updated the diff for D33685: Define and use standard functions for alignment checking.

Move the functions from vm_page.h to vm_extern.h. Rename them, and add a couple of comments.

Dec 29 2021, 6:17 PM
dougm committed rG53dd5ccce2ac: vm_reserv: fix zero-boundary error (authored by dougm).
vm_reserv: fix zero-boundary error
Dec 29 2021, 5:29 PM
dougm committed rGdd8ea1c755b3: vm_reserv: fix zero-boundary error (authored by dougm).
vm_reserv: fix zero-boundary error
Dec 29 2021, 5:25 PM
dougm committed rG8119cdd38b4f: vm_phys: hide vm_phys_set_pool (authored by dougm).
vm_phys: hide vm_phys_set_pool
Dec 29 2021, 5:18 PM
dougm closed D33688: hide vm_phys_set_pool.
Dec 29 2021, 5:18 PM
dougm added a comment to D33685: Define and use standard functions for alignment checking.

IMO vm_phys.h makes more sense than vm_page.h for these routines. The vm_page_ prefix is usually for functions that operate on a vm_page_t. Is there some reason these can't live in vm_param.h as kib suggested?

Dec 29 2021, 3:10 PM
dougm updated the diff for D33685: Define and use standard functions for alignment checking.

Drop a redundant zero-check.

Dec 29 2021, 7:00 AM
dougm retitled D33685: Define and use standard functions for alignment checking from Cleanups to Define and use standard functions for alignment checking.
Dec 29 2021, 6:52 AM
dougm updated the diff for D33685: Define and use standard functions for alignment checking.

common.boundary -> boundary, on some architectures.

Dec 29 2021, 6:50 AM
dougm updated the diff for D33685: Define and use standard functions for alignment checking.

Find more places to use align_ok and bound_ok.

Dec 29 2021, 4:57 AM
dougm updated the diff for D33685: Define and use standard functions for alignment checking.

Drop set_pool. Move alignment checks to vm_page.h. Use them in sys/dev/iommu.

Dec 29 2021, 3:45 AM
dougm requested review of D33688: hide vm_phys_set_pool.
Dec 29 2021, 3:03 AM
dougm updated the diff for D33685: Define and use standard functions for alignment checking.
Dec 29 2021, 12:29 AM
dougm added a comment to D33685: Define and use standard functions for alignment checking.
In D33685#761212, @kib wrote:

You may also convert sys/dev/iommu/iommu.h iommu_test_boundary()

Dec 29 2021, 12:27 AM

Dec 28 2021

dougm requested review of D33685: Define and use standard functions for alignment checking.
Dec 28 2021, 10:09 PM

Dec 27 2021

dougm added inline comments to D33312: Use bitstrings for reservation popmaps.
Dec 27 2021, 6:25 AM
dougm updated the diff for D33312: Use bitstrings for reservation popmaps.

Undo last change.

Dec 27 2021, 1:11 AM
dougm added inline comments to D33312: Use bitstrings for reservation popmaps.
Dec 27 2021, 1:09 AM
dougm updated the diff for D33312: Use bitstrings for reservation popmaps.

Correct a bound error. Update for changes in surrounding code.

Dec 27 2021, 12:56 AM
dougm added inline comments to D33312: Use bitstrings for reservation popmaps.
Dec 27 2021, 12:54 AM

Dec 26 2021

dougm closed D33656: Change page alignment behavior of boundary==0 in vm_reserv_reclaim_contig.
Dec 26 2021, 6:06 PM
dougm committed rG49fd2d51f07f: vm_reserv: fix zero-boundary error (authored by dougm).
vm_reserv: fix zero-boundary error
Dec 26 2021, 5:48 PM
dougm updated the diff for D33656: Change page alignment behavior of boundary==0 in vm_reserv_reclaim_contig.

Remove the alignment change. I think boundary is the only problem.

Dec 26 2021, 12:40 AM

Dec 25 2021

dougm updated the diff for D33656: Change page alignment behavior of boundary==0 in vm_reserv_reclaim_contig.

Catch another boundary == 0 problem.

Dec 25 2021, 10:18 PM
dougm updated the diff for D33656: Change page alignment behavior of boundary==0 in vm_reserv_reclaim_contig.

Assume that if I'm wrong about boundary, I'm similarly wrong about alignment.

Dec 25 2021, 10:15 PM
dougm requested review of D33656: Change page alignment behavior of boundary==0 in vm_reserv_reclaim_contig.
Dec 25 2021, 10:06 PM
dougm closed D33653: Move a comment.
Dec 25 2021, 4:58 AM

Dec 24 2021

dougm committed rG4bae154fe8c7: vm_page: Move a comment (authored by dougm).
vm_page: Move a comment
Dec 24 2021, 10:14 PM
dougm requested review of D33653: Move a comment.
Dec 24 2021, 7:29 PM
dougm updated the diff for D33312: Use bitstrings for reservation popmaps.

Update after commit 0d5fac287294490ac488d74e598e019334610bdb

Dec 24 2021, 7:23 PM
dougm committed rG0d5fac287294: vm: alloc pages from reserv before breaking it (authored by dougm).
vm: alloc pages from reserv before breaking it
Dec 24 2021, 7:05 PM
dougm closed D33644: alloc memory from reservation before breaking it.
Dec 24 2021, 7:05 PM
dougm updated the diff for D33644: alloc memory from reservation before breaking it.

Fix indentation. Move some code out of the scope of locks, as suggested.

Dec 24 2021, 6:37 PM
dougm updated the diff for D33644: alloc memory from reservation before breaking it.

Correct page accounting problem.

Dec 24 2021, 9:03 AM
dougm committed rG184c63db3c94: Fix clerical error in page alloc (authored by dougm).
Fix clerical error in page alloc
Dec 24 2021, 8:52 AM
dougm closed D33645: Fix an accounting error from 9b0c0769b2b2e1d6c917c0799f2a0.
Dec 24 2021, 8:52 AM
dougm added inline comments to D33551: factor common code out of vm_page_alloc*contig_domain.
Dec 24 2021, 6:31 AM
dougm requested review of D33645: Fix an accounting error from 9b0c0769b2b2e1d6c917c0799f2a0.
Dec 24 2021, 6:05 AM
dougm requested review of D33644: alloc memory from reservation before breaking it.
Dec 24 2021, 5:34 AM
dougm committed rGfb38b29b5609: vm_page: Remove extra test, dup code from page alloc (authored by dougm).
vm_page: Remove extra test, dup code from page alloc
Dec 24 2021, 4:55 AM
dougm closed D33551: factor common code out of vm_page_alloc*contig_domain.
Dec 24 2021, 4:54 AM
dougm updated the diff for D33551: factor common code out of vm_page_alloc*contig_domain.

Improve comments.

Dec 24 2021, 1:12 AM

Dec 23 2021

dougm added reviewers for D33551: factor common code out of vm_page_alloc*contig_domain: markj, kib.
Dec 23 2021, 10:34 PM
dougm committed rG39816676b6c6: Correct type size format error in KASSERT. (authored by dougm).
Correct type size format error in KASSERT.
Dec 23 2021, 8:06 AM
dougm committed rG46549e319c52: vm: Don't break vm reserv that can't meet align reqs (authored by dougm).
vm: Don't break vm reserv that can't meet align reqs
Dec 23 2021, 8:05 AM
dougm committed rG42f18ad1126b: Correct type size format error in KASSERT. (authored by dougm).
Correct type size format error in KASSERT.
Dec 23 2021, 8:03 AM
dougm committed rG3b8062cdd5a8: vm: Don't break vm reserv that can't meet align reqs (authored by dougm).
vm: Don't break vm reserv that can't meet align reqs
Dec 23 2021, 8:03 AM

Dec 22 2021

dougm requested review of D33619: Update page psind fields for two-level reservations.
Dec 22 2021, 11:16 PM
dougm updated the diff for D33312: Use bitstrings for reservation popmaps.

Make changes in bitstring.h, and in vm_reserv_break, to shrink the object code size a bit. Some allow the compiler to optimize out code when compile-time constants are multiples of 64. Some allow the same code to find 1-bits as 0-bits, so that two nearly-identical copies of the code are not generated.

Dec 22 2021, 9:31 AM
dougm added a comment to D33551: factor common code out of vm_page_alloc*contig_domain.

This change does slightly reduce the code size:
dougm@108-254-203-204:GENERIC $ size orig.vm_page.o

 text    data     bss     dec       hex   filename
50782   25808   13424   90014   0x15f9e   orig.vm_page.o

dougm@108-254-203-204:GENERIC $ size vm_page.o

 text    data     bss     dec       hex   filename
50670   25808   13424   89902   0x15f2e   vm_page.o
Dec 22 2021, 3:14 AM

Dec 20 2021

dougm updated the diff for D33312: Use bitstrings for reservation popmaps.

Use roundup2 instead of rounddown2, since it is used elsewhere here, and because it is easier to spell.

Dec 20 2021, 4:46 AM
dougm updated the diff for D33312: Use bitstrings for reservation popmaps.

Rewrite the alignment/boundary rounding a bit more carefully.

Dec 20 2021, 4:30 AM
dougm updated the diff for D33312: Use bitstrings for reservation popmaps.

Slightly reduce the object code size by dropping over-optimization in vm_reserv_find_contig.

Dec 20 2021, 12:28 AM

Dec 18 2021

dougm requested review of D33551: factor common code out of vm_page_alloc*contig_domain.
Dec 18 2021, 9:54 AM

Dec 17 2021

dougm updated the diff for D33312: Use bitstrings for reservation popmaps.

Use '__diagused' to avoid creating a function just to call it from KASSERT.

Dec 17 2021, 7:07 AM
dougm abandoned D20625: clarify reserv_test_config.

The code this modifies has been substantially changed now, and the benefits of this change no longer apply.

Dec 17 2021, 6:20 AM

Dec 16 2021

dougm committed rGf7aa44763d20: Correct type size format error in KASSERT. (authored by dougm).
Correct type size format error in KASSERT.
Dec 16 2021, 7:55 PM
dougm added inline comments to D33312: Use bitstrings for reservation popmaps.
Dec 16 2021, 7:12 PM
dougm updated the diff for D33312: Use bitstrings for reservation popmaps.

Update after commit 6f1c8908272f3c0a6631e001bd2eb50a5b69261d.

Dec 16 2021, 7:07 PM
dougm closed D33344: Fix alignment issues in vm_reserv_reclaim_contig.
Dec 16 2021, 6:49 PM
dougm committed rG6f1c8908272f: vm: Don't break vm reserv that can't meet align reqs (authored by dougm).
vm: Don't break vm reserv that can't meet align reqs
Dec 16 2021, 6:49 PM
dougm updated the diff for D33344: Fix alignment issues in vm_reserv_reclaim_contig.

Change stray tab to space.
Avoid ulmin, ulmax for vm_paddr_t boundary.

Dec 16 2021, 5:12 PM
dougm added inline comments to D33344: Fix alignment issues in vm_reserv_reclaim_contig.
Dec 16 2021, 5:07 PM

Dec 15 2021

dougm added inline comments to D33344: Fix alignment issues in vm_reserv_reclaim_contig.
Dec 15 2021, 7:00 PM
dougm updated the diff for D33344: Fix alignment issues in vm_reserv_reclaim_contig.

Drop debug code. Push ppn_align and ppn_bound into [1,VM_LEVEL_0_NPAGES] to avoid overflow problems.

Dec 15 2021, 7:00 PM

Dec 14 2021

dougm committed rG434b8658dc8d: Set uninitialized popmap bits in vm_reserv_init (authored by dougm).
Set uninitialized popmap bits in vm_reserv_init
Dec 14 2021, 5:15 AM
dougm committed rG0848451a2ee5: Set uninitialized popmap bits in vm_reserv_init (authored by dougm).
Set uninitialized popmap bits in vm_reserv_init
Dec 14 2021, 5:14 AM

Dec 13 2021

dougm added a reviewer for D33344: Fix alignment issues in vm_reserv_reclaim_contig: markj.
Dec 13 2021, 11:12 PM
dougm updated the diff for D33344: Fix alignment issues in vm_reserv_reclaim_contig.

Compute the shifted alignment and boundary values once, not with every find function call, and make sure they aren't zero-valued.

Dec 13 2021, 11:11 PM

Dec 12 2021

dougm updated the diff for D33344: Fix alignment issues in vm_reserv_reclaim_contig.

Correct identifier name. Verify compilation.

Dec 12 2021, 10:43 PM
dougm updated the diff for D33344: Fix alignment issues in vm_reserv_reclaim_contig.

Apply reviewer suggestion. Remove some upper bound checks on alignment and boundary. Add some zero and power-of-two kasserts on alignment and boundary.

Dec 12 2021, 7:54 PM
dougm updated the diff for D33344: Fix alignment issues in vm_reserv_reclaim_contig.

Accept 3 reviewer suggestions.

Dec 12 2021, 6:42 PM
dougm updated the diff for D33344: Fix alignment issues in vm_reserv_reclaim_contig.

Rename a couple of parameters to vm_reserv_find_contig. Add assertions and comments to ensure/explain that arithmetic with bound and alignment cannot compute values beyond the number of pages in a reservation.

Dec 12 2021, 4:54 AM

Dec 11 2021

dougm added inline comments to D33344: Fix alignment issues in vm_reserv_reclaim_contig.
Dec 11 2021, 11:52 PM
dougm updated the diff for D33344: Fix alignment issues in vm_reserv_reclaim_contig.

Shrink whitespace. Fix pages vs bytes error. Stop using FUNCTION.

Dec 11 2021, 11:52 PM

Dec 10 2021

dougm updated the diff for D33344: Fix alignment issues in vm_reserv_reclaim_contig.

Make all the arithmetic in the helper function use ints, and let the caller handle conversion to int. Let the caller manage bounds calculation. Return the found page and let the caller check assertions to verify alignment.

Dec 10 2021, 4:42 AM

Dec 9 2021

dougm updated the diff for D33344: Fix alignment issues in vm_reserv_reclaim_contig.

Use roundup2() to hide the bit-twiddling in alignment and boundary adjustment. Work with the page number directly instead of going back to the address for calculation.

Dec 9 2021, 11:11 PM
dougm updated the diff for D33344: Fix alignment issues in vm_reserv_reclaim_contig.

Don't allow boundary to exceed reservation size, so that boundary arithmetic cannot be a problem.

Dec 9 2021, 9:55 AM
dougm updated the diff for D33344: Fix alignment issues in vm_reserv_reclaim_contig.

Don't bother checking a reservation if every address within it violates alignment.

Dec 9 2021, 9:30 AM

Dec 8 2021

dougm requested review of D33344: Fix alignment issues in vm_reserv_reclaim_contig.
Dec 8 2021, 9:49 PM

Dec 7 2021

dougm added a comment to D33312: Use bitstrings for reservation popmaps.

Which revision did you create the diff from?

Dec 7 2021, 8:29 AM

Dec 6 2021

dougm requested review of D33312: Use bitstrings for reservation popmaps.
Dec 6 2021, 11:20 PM

Dec 5 2021

dougm committed rG9f32cb5b1c81: Set uninitialized popmap bits in vm_reserv_init (authored by dougm).
Set uninitialized popmap bits in vm_reserv_init
Dec 5 2021, 11:20 PM
dougm closed D33258: fully populate reservation markers.
Dec 5 2021, 11:20 PM
dougm updated the diff for D33258: fully populate reservation markers.

On further review, I think I changed the wrong value to a different wrong value the first time.

Dec 5 2021, 6:23 AM

Dec 4 2021

dougm requested review of D33258: fully populate reservation markers.
Dec 4 2021, 7:52 PM

Sep 7 2021

dougm accepted D31875: swap_pager: Handle large swap_pager_reserve() requests.
Sep 7 2021, 5:33 PM

Aug 11 2021

dougm accepted D31469: bitstring(3): Add bitstring traversal macros..
Aug 11 2021, 11:28 PM

Aug 9 2021

dougm accepted D31469: bitstring(3): Add bitstring traversal macros..

Seems harmless.

Aug 9 2021, 9:10 AM

Jul 13 2021

dougm accepted D31158: blist: Correct the node count used for allocation..

Looks okay to me.

Jul 13 2021, 6:22 PM
dougm added inline comments to D31158: blist: Correct the node count used for allocation..
Jul 13 2021, 7:15 AM

Dec 14 2020

dougm updated the diff for D26290: maintain a treap for vm_phys_segs, and use it for lookup.

Update to match underlying file changes.

Dec 14 2020, 4:37 AM