Tauist. Bit twiddler. Advocate for continued logarithms.
User Details
- User Since
- Jun 30 2017, 3:18 PM (254 w, 2 d)
Tue, May 10
Tue, Apr 26
Mon, Apr 25
Change the type of a shifted bit to vm_paddr_t.
Wed, Apr 20
Apr 14 2022
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 13 2022
Alc comments, and objects, verbally. I recap:
Apr 11 2022
Abandoning this. Too much overlap with another outstanding patch may create confusion, and I need to rearrange some of the stuff here anyway.
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 10 2022
Perhaps there is something unhealthy about backing up over small blocks at the beginning. Blank that out and see if tests still fail.
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 8 2022
Rename some functions from 'alloc' to 'find', since they no longer alloc. Add a check to stop some searches doomed by alignment.
Apr 7 2022
Mar 31 2022
Fix comment typo.
Add/edit comments only.
Mar 30 2022
I'll commit this tomorrow, if no one has more to say about it.
Mar 28 2022
Go back to allocating from queues, not segments.
Mar 27 2022
Throw out almost everything.
Mar 23 2022
Mar 11 2022
Mar 10 2022
Whitespace cleanups.
Feb 1 2022
Jan 27 2022
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 26 2022
Eliminate typedef. Eliminate gotos.
Jan 23 2022
Update stale comment.
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 22 2022
Allow a less-than-max-sized free block to complete the allocation.
Jan 19 2022
Jan 18 2022
Accept all proffered advice.
Update, rearrange comments.
Jan 17 2022
Reverse the order in which diminishing-sized free blocks are enlisted.
Jan 16 2022
Correct error in KASSERT print output.
Avoid passing pointer differences to ffs, fls.
Jan 14 2022
Jan 12 2022
Remove some offensive parts.
Undo change involving fictitious seg.
Jan 11 2022
Fix initial mask on area_at. Fix off-by-one in end test on area_at. Add some test cases.
Jan 10 2022
Define a bit_ntest function, document it, and use it in place of bit_ffs in a couple of places.
Jan 9 2022
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 5 2022
Abandoning. I'll limit myself to bitstring.h. There are too many weird decisions baked into bitset.h for me to use it.
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 4 2022
Clean up an inadvertent whitespace change in the test code.
Jan 3 2022
Nevermind. The boundary rewrite would break the boundary == 0 case.
Add semicolons.
Fix a bunch of mistakes I should not have made, and use "%#" for the first time.
Use powerof2.
Jan 2 2022
Fix an error in the test code, checking for ffs legal return values.
Add ffs and fls tests to the bitset test set.
Jan 1 2022
Dec 31 2021
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 30 2021
Another note of interest:
I find two uses of BIT_FFS_AT in the code:
Tweak the mask-last-bits test.
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.