Page MenuHomeFreeBSD

dougm (Doug Moore)
User

Projects

User does not belong to any projects.

User Details

User Since
Jun 30 2017, 3:18 PM (254 w, 2 d)

Tauist. Bit twiddler. Advocate for continued logarithms.

Recent Activity

Tue, May 10

dougm closed D35157: bitstring: fix match-at-start bug.
Tue, May 10, 5:00 PM
dougm committed R10:6e7a585348d5: bitstring: fix ff_area() when start!=0 (authored by dougm).
bitstring: fix ff_area() when start!=0
Tue, May 10, 5:00 PM
dougm added a reviewer for D35157: bitstring: fix match-at-start bug: markj.
Tue, May 10, 3:29 AM
dougm requested review of D35157: bitstring: fix match-at-start bug.
Tue, May 10, 3:29 AM

Tue, Apr 26

dougm committed R10:fa8a6585c752: vm_phys: avoid waste in multipage allocation (authored by dougm).
vm_phys: avoid waste in multipage allocation
Tue, Apr 26, 8:14 AM
dougm closed D34815: For multipage allocation, start block scan at start of free range.
Tue, Apr 26, 8:14 AM

Mon, Apr 25

dougm added inline comments to D34815: For multipage allocation, start block scan at start of free range.
Mon, Apr 25, 8:31 PM
dougm updated the diff for D34815: For multipage allocation, start block scan at start of free range.

Change the type of a shifted bit to vm_paddr_t.

Mon, Apr 25, 8:31 PM

Wed, Apr 20

dougm committed R10:11fced21ccea: dev/iommu: Include offset in maxaddr check. (authored by dougm).
dev/iommu: Include offset in maxaddr check.
Wed, Apr 20, 10:28 PM
dougm closed D34978: Respect maxaddr limit with nonzero offset in iommu_gas_match_one.
Wed, Apr 20, 10:28 PM
dougm requested review of D34978: Respect maxaddr limit with nonzero offset in iommu_gas_match_one.
Wed, Apr 20, 4:38 AM

Apr 14 2022

dougm updated the diff for D34815: For multipage allocation, start block scan at start of free range.

Address reviewer comments. Shift 1UL (instead of 1) and 2UL (instead of 2) in the code being modified here. This isn't making changes to code elsewhere to which the same concerns may apply. Add a zero-check before backing up from one address to its precesessor.

Apr 14 2022, 7:56 AM

Apr 13 2022

dougm added a comment to D34815: For multipage allocation, start block scan at start of free range.

Alc comments, and objects, verbally. I recap:

Apr 13 2022, 9:08 PM

Apr 11 2022

dougm updated the summary of D34815: For multipage allocation, start block scan at start of free range.
Apr 11 2022, 10:01 PM
dougm abandoned D34729: For multipage allocation, try assembling smaller blocks when big-enough free lists are empty.

Abandoning this. Too much overlap with another outstanding patch may create confusion, and I need to rearrange some of the stuff here anyway.

Apr 11 2022, 9:56 PM
dougm updated the diff for D34815: For multipage allocation, start block scan at start of free range.

Restore the commented out code for capturing small initial blocks in the allocation. Change the code that frees small leftover blocks at the end so that it does not assume that the allocation must have started at the start of a big aligned block.

Apr 11 2022, 7:18 AM

Apr 10 2022

dougm updated the diff for D34815: For multipage allocation, start block scan at start of free range.

Perhaps there is something unhealthy about backing up over small blocks at the beginning. Blank that out and see if tests still fail.

Apr 10 2022, 9:44 AM
dougm updated the diff for D34815: For multipage allocation, start block scan at start of free range.

Take those parts of D34729 that seem unobjectionable and leave them here, discarding the rest, so that testing and review of this change can proceed independently.

Apr 10 2022, 6:12 AM

Apr 8 2022

dougm added inline comments to D34729: For multipage allocation, try assembling smaller blocks when big-enough free lists are empty.
Apr 8 2022, 6:51 AM
dougm updated the diff for D34729: For multipage allocation, try assembling smaller blocks when big-enough free lists are empty.

Rename some functions from 'alloc' to 'find', since they no longer alloc. Add a check to stop some searches doomed by alignment.

Apr 8 2022, 6:50 AM

Apr 7 2022

dougm requested review of D34815: For multipage allocation, start block scan at start of free range.
Apr 7 2022, 8:30 AM

Mar 31 2022

dougm requested review of D34729: For multipage allocation, try assembling smaller blocks when big-enough free lists are empty.
Mar 31 2022, 10:26 PM
dougm committed R10:557dc337e6cb: vm_phys: check small blocks to finish allocation (authored by dougm).
vm_phys: check small blocks to finish allocation
Mar 31 2022, 9:23 PM
dougm closed D34724: Allow allocation of pages from beyond the last max order block of a range.
Mar 31 2022, 9:23 PM
dougm updated the diff for D34724: Allow allocation of pages from beyond the last max order block of a range.

Fix comment typo.

Mar 31 2022, 4:48 PM
dougm updated the diff for D34724: Allow allocation of pages from beyond the last max order block of a range.

Add/edit comments only.

Mar 31 2022, 4:29 PM
dougm requested review of D34724: Allow allocation of pages from beyond the last max order block of a range.
Mar 31 2022, 7:13 AM
dougm committed R10:342056fa1c7a: vm_phys: alloc pages without duplicating searches. (authored by dougm).
vm_phys: alloc pages without duplicating searches.
Mar 31 2022, 6:52 AM
dougm closed D33947: Change free space search to avoid duplicate search.
Mar 31 2022, 6:52 AM

Mar 30 2022

dougm added a comment to D33947: Change free space search to avoid duplicate search.

I'll commit this tomorrow, if no one has more to say about it.

Mar 30 2022, 9:35 PM

Mar 28 2022

dougm updated the diff for D33947: Change free space search to avoid duplicate search.

Go back to allocating from queues, not segments.

Mar 28 2022, 6:34 PM
dougm added a comment to D33947: Change free space search to avoid duplicate search.

vm_phys_alloc_seg_contig() will ignore runs of pages that aren't contained in the range [seg->start, seg->end], so doesn't this change potentially cause us to skip over eligible runs?

Mar 28 2022, 6:28 PM

Mar 27 2022

dougm updated the diff for D33947: Change free space search to avoid duplicate search.

Throw out almost everything.

Mar 27 2022, 7:08 AM

Mar 23 2022

dougm added a reviewer for D33947: Change free space search to avoid duplicate search: markj.
Mar 23 2022, 8:03 PM

Mar 11 2022

dougm retitled D33947: Change free space search to avoid duplicate search from Change free space search to avoid duplcate search, find tighter fits to Change free space search to avoid duplicate search, find tighter fits.
Mar 11 2022, 9:51 AM

Mar 10 2022

dougm updated the diff for D33947: Change free space search to avoid duplicate search.

Whitespace cleanups.

Mar 10 2022, 11:02 PM

Feb 1 2022

dougm accepted D34122: <sys/bitstring.h>: Cast _BITSTR_BITS to int in a ternary operator..
Feb 1 2022, 6:00 AM

Jan 27 2022

dougm accepted D34070: Make <vm/vm_extern.h> more self-contained..

I have no objections, but it was kib, I think, who asked for the invariants in the first place, so get his ok too.

Jan 27 2022, 10:26 PM
dougm added reviewers for D34070: Make <vm/vm_extern.h> more self-contained.: kib, alc.
Jan 27 2022, 10:24 PM

Jan 26 2022

dougm updated the diff for D33947: Change free space search to avoid duplicate search.

Eliminate typedef. Eliminate gotos.

Jan 26 2022, 7:14 AM

Jan 23 2022

dougm updated the diff for D33947: Change free space search to avoid duplicate search.

Update stale comment.

Jan 23 2022, 9:11 AM
dougm updated the diff for D33947: Change free space search to avoid duplicate search.

Change the process of stringing together free blocks to satisfy a request to allow smaller blocks at the beginning and end of the sequence. When a free block is not part of a large enough range to satisfy the request, move the largest free blocks in the sequence in their free list so that they aren't encountered more than once in the search. When a request for a number of pages less then the maximum block size cannot be satisfied with a single free block, try to piece a sequence of smaller free blocks together before giving up.

Jan 23 2022, 9:08 AM

Jan 22 2022

dougm updated the diff for D33947: Change free space search to avoid duplicate search.

Allow a less-than-max-sized free block to complete the allocation.

Jan 22 2022, 4:58 AM

Jan 19 2022

dougm requested review of D33947: Change free space search to avoid duplicate search.
Jan 19 2022, 8:23 AM
dougm committed R10:0ce7909cd0ba: vm_phys: add essential segment bounds check (authored by dougm).
vm_phys: add essential segment bounds check
Jan 19 2022, 6:47 AM
dougm closed D33945: add seg->start check before block-walking in vm_phys_alloc_seg_contig.
Jan 19 2022, 6:47 AM
dougm requested review of D33945: add seg->start check before block-walking in vm_phys_alloc_seg_contig.
Jan 19 2022, 6:26 AM

Jan 18 2022

dougm committed R10:da92ecbc0d8f: vm_phys: fix seg->end test in alloc_seg_contig (authored by dougm).
vm_phys: fix seg->end test in alloc_seg_contig
Jan 18 2022, 6:49 PM
dougm closed D33870: phys_alloc_seg_contig: don't allocate past seg->end.
Jan 18 2022, 6:49 PM
dougm updated the diff for D33870: phys_alloc_seg_contig: don't allocate past seg->end.

Accept all proffered advice.

Jan 18 2022, 10:08 AM
dougm updated the diff for D33870: phys_alloc_seg_contig: don't allocate past seg->end.

Update, rearrange comments.

Jan 18 2022, 3:32 AM

Jan 17 2022

dougm updated the diff for D33906: Drop duplicate ascending range enqueing.

Reverse the order in which diminishing-sized free blocks are enlisted.

Jan 17 2022, 1:15 AM

Jan 16 2022

dougm updated the diff for D33906: Drop duplicate ascending range enqueing.

Correct error in KASSERT print output.

Jan 16 2022, 9:15 PM
dougm updated the diff for D33906: Drop duplicate ascending range enqueing.

Avoid passing pointer differences to ffs, fls.

Jan 16 2022, 10:25 AM
dougm requested review of D33906: Drop duplicate ascending range enqueing.
Jan 16 2022, 7:27 AM

Jan 14 2022

dougm requested review of D33899: Remove an unused function.
Jan 14 2022, 11:06 AM

Jan 12 2022

dougm updated the diff for D33870: phys_alloc_seg_contig: don't allocate past seg->end.

Remove some offensive parts.

Jan 12 2022, 7:53 PM
dougm updated the diff for D33870: phys_alloc_seg_contig: don't allocate past seg->end.

Undo change involving fictitious seg.

Jan 12 2022, 5:55 PM
dougm requested review of D33870: phys_alloc_seg_contig: don't allocate past seg->end.
Jan 12 2022, 5:47 PM
dougm closed D33312: Use bitstrings for reservation popmaps.
Jan 12 2022, 5:16 PM
dougm committed R10:84e2ae64c597: vm_reserv: use enhanced bitstring for popmaps (authored by dougm).
vm_reserv: use enhanced bitstring for popmaps
Jan 12 2022, 5:16 PM

Jan 11 2022

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

Fix initial mask on area_at. Fix off-by-one in end test on area_at. Add some test cases.

Jan 11 2022, 5:51 PM

Jan 10 2022

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

Define a bit_ntest function, document it, and use it in place of bit_ffs in a couple of places.

Jan 10 2022, 9:56 AM
dougm committed R10:ae13829ddce0: vm_addr_ok: add power2 invariant check (authored by dougm).
vm_addr_ok: add power2 invariant check
Jan 10 2022, 7:23 AM
dougm closed D33725: Add invariants that check validity of alignment, boundary parameters.
Jan 10 2022, 7:22 AM

Jan 9 2022

dougm added a comment to D33725: Add invariants that check validity of alignment, boundary parameters.

Make tinderbox completed with just these errors:
powerpc.powerpc64: make[6]: "/freebsd/dougm/base/src/stand/kboot/Makefile" line 27: Cannot open /fr
eebsd/dougm/base/src/stand/kboot/arch/powerpc/Makefile.inc

Jan 9 2022, 6:32 PM

Jan 5 2022

dougm edited reviewers for D33725: Add invariants that check validity of alignment, boundary parameters, added: alc; removed: se.
Jan 5 2022, 7:21 PM
dougm abandoned D33701: BITSET_FFS, FLS corrections and extensions.

Abandoning. I'll limit myself to bitstring.h. There are too many weird decisions baked into bitset.h for me to use it.

Jan 5 2022, 7:01 PM
dougm abandoned D33753: Fix docs, comment about FFS_AT start parameter.

Oh, I see. Your 'greater than a start bit' makes your decision to call this 1-based correct. Confusing to me, but correct. Sorry to bother you.

Jan 5 2022, 6:52 PM
dougm requested review of D33753: Fix docs, comment about FFS_AT start parameter.
Jan 5 2022, 6:40 PM

Jan 4 2022

dougm updated the diff for D33701: BITSET_FFS, FLS corrections and extensions.

Clean up an inadvertent whitespace change in the test code.

Jan 4 2022, 7:43 AM
dougm retitled D33701: BITSET_FFS, FLS corrections and extensions from Avoid ffs > size in bitset.h, generalize to ffc, fls_at, and fix info in *_at(start) parameter to BITSET_FFS, FLS corrections and extensions.
Jan 4 2022, 7:41 AM

Jan 3 2022

dougm added a comment to D33725: Add invariants that check validity of alignment, boundary parameters.

Nevermind. The boundary rewrite would break the boundary == 0 case.

Jan 3 2022, 5:45 PM
dougm updated the diff for D33725: Add invariants that check validity of alignment, boundary parameters.

Add semicolons.

Jan 3 2022, 5:40 PM
dougm updated the diff for D33725: Add invariants that check validity of alignment, boundary parameters.

Fix a bunch of mistakes I should not have made, and use "%#" for the first time.

Jan 3 2022, 3:49 AM
dougm updated the diff for D33725: Add invariants that check validity of alignment, boundary parameters.

Use powerof2.

Jan 3 2022, 3:19 AM
dougm added a comment to D33725: Add invariants that check validity of alignment, boundary parameters.
In D33725#762451, @kib wrote:

Why not use powerof2() macro from sys/param.h?

Jan 3 2022, 1:37 AM

Jan 2 2022

dougm requested review of D33725: Add invariants that check validity of alignment, boundary parameters.
Jan 2 2022, 11:56 PM
dougm updated the diff for D33701: BITSET_FFS, FLS corrections and extensions.

Fix an error in the test code, checking for ffs legal return values.

Jan 2 2022, 11:41 PM
dougm closed D33715: budsma: fix boundary alignment test.
Jan 2 2022, 6:43 PM
dougm committed R10:f1e7a532d1ee: busdma: _bus_dmamap_addseg repaired (authored by dougm).
busdma: _bus_dmamap_addseg repaired
Jan 2 2022, 6:43 PM
dougm updated the diff for D33701: BITSET_FFS, FLS corrections and extensions.

Add ffs and fls tests to the bitset test set.

Jan 2 2022, 11:35 AM
dougm added a comment to D33701: BITSET_FFS, FLS corrections and extensions.
In D33701#762111, @se wrote:

This is especially problematic since the CPU_SET macros are based on BIT_SET macros, and they are critical for the correctness and security of kernel functions.

Jan 2 2022, 4:34 AM

Jan 1 2022

dougm requested review of D33715: budsma: fix boundary alignment test.
Jan 1 2022, 11:48 PM
dougm updated the diff for D33701: BITSET_FFS, FLS corrections and extensions.
Jan 1 2022, 8:06 PM

Dec 31 2021

dougm committed R10:b7810e05ff1d: x86-busdma - Add missing paren (authored by dougm).
x86-busdma - Add missing paren
Dec 31 2021, 8:35 AM
dougm committed R10:b49612688608: riscv-busdma: Balance parens. (authored by dougm).
riscv-busdma: Balance parens.
Dec 31 2021, 8:02 AM
dougm committed R10:cfb2aa3f530f: iommu_gas: Rename a function missed earlier (authored by dougm).
iommu_gas: Rename a function missed earlier
Dec 31 2021, 7:51 AM
dougm committed R10:f76916c0956d: vm_reserv: #include vm_extern.h explicitly, for arm. (authored by dougm).
vm_reserv: #include vm_extern.h explicitly, for arm.
Dec 31 2021, 6:42 AM
dougm committed R10:e6930b1c5f8f: vm_phys: convert error back to warning (authored by dougm).
vm_phys: convert error back to warning
Dec 31 2021, 6:27 AM
dougm committed R10:01e115ab83a4: vm_phys: #include vm_extern (authored by dougm).
vm_phys: #include vm_extern
Dec 31 2021, 5:35 AM
dougm committed R10:c606ab59e7f9: vm_extern: use standard address checkers everywhere (authored by dougm).
vm_extern: use standard address checkers everywhere
Dec 31 2021, 4:14 AM
dougm committed R10:029abd3b2987: Remove discarded mips source. (authored by dougm).
Remove discarded mips source.
Dec 31 2021, 4:14 AM
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