Page MenuHomeFreeBSD
Feed Advanced Search

Jun 27 2024

rlibby accepted D45588: vm_object: use reclaim callback to free pages.
Jun 27 2024, 3:36 AM
rlibby updated the diff for D45750: nvme: avoid gcc -Werror=int-to-pointer-cast on 32-bit arch.

imp: s/vm_offset_t/uintptr_t/

Jun 27 2024, 3:32 AM

Jun 26 2024

rlibby added a comment to D45750: nvme: avoid gcc -Werror=int-to-pointer-cast on 32-bit arch.
In D45750#1043538, @imp wrote:

why the crazy vm_offset_t instead of uintptr_t??

Jun 26 2024, 9:31 PM
rlibby added a comment to D45751: tcp_bbr: avoid gcc -Werror=pointer-to-int-cast on 32-bit arch.

Why is an uint64_t not good enough to hold a pointer? Aren't pointers 32-bit or 64-bit on all architectures FreeBSD supports?

Jun 26 2024, 8:46 PM
rlibby updated the test plan for D45752: tcp_rack: avoid gcc -Werror=pointer-to-int-cast on 32-bit arch.
Jun 26 2024, 7:55 PM
rlibby updated the test plan for D45751: tcp_bbr: avoid gcc -Werror=pointer-to-int-cast on 32-bit arch.
Jun 26 2024, 7:55 PM
rlibby updated the summary of D45750: nvme: avoid gcc -Werror=int-to-pointer-cast on 32-bit arch.
Jun 26 2024, 7:53 PM
rlibby requested review of D45752: tcp_rack: avoid gcc -Werror=pointer-to-int-cast on 32-bit arch.
Jun 26 2024, 7:51 PM
rlibby requested review of D45751: tcp_bbr: avoid gcc -Werror=pointer-to-int-cast on 32-bit arch.
Jun 26 2024, 7:50 PM
rlibby requested review of D45750: nvme: avoid gcc -Werror=int-to-pointer-cast on 32-bit arch.
Jun 26 2024, 7:50 PM

Jun 25 2024

rlibby committed rGf29bdea04776: ext4_ext_tree_init: correct memset initialization (authored by rlibby).
ext4_ext_tree_init: correct memset initialization
Jun 25 2024, 5:43 PM
rlibby committed rGd25f0bdceb3a: cdefs.h: add __inline to __always_inline (authored by rlibby).
cdefs.h: add __inline to __always_inline
Jun 25 2024, 5:43 PM
rlibby committed rG07cc7ea7386c: libmsun: remove duplicates after cdefs.h added inline to __always_inline (authored by rlibby).
libmsun: remove duplicates after cdefs.h added inline to __always_inline
Jun 25 2024, 5:43 PM
rlibby closed D45701: ext4_ext_tree_init: correct memset initialization.
Jun 25 2024, 5:43 PM
rlibby closed D45712: libmsun: remove duplicates after cdefs.h added inline to __always_inline.
Jun 25 2024, 5:43 PM
rlibby closed D45711: cdefs.h: add __inline to __always_inline.
Jun 25 2024, 5:43 PM

Jun 24 2024

rlibby added a comment to D45707: bluetooth socket sysinit: correct memset initialization.

Given that the next 70 lines are mostly manually setting bits in the mask, I'd err on the side of entirely removing this initialization.

Jun 24 2024, 5:36 PM
rlibby committed rG012e32c66529: libthr: move __always_inline to canonical position (authored by rlibby).
libthr: move __always_inline to canonical position
Jun 24 2024, 5:09 PM
rlibby closed D45710: libthr: move __always_inline to canonical position.
Jun 24 2024, 5:08 PM
rlibby committed rGeae1767d8fa4: vfs: move __always_inline to canonical position (authored by rlibby).
vfs: move __always_inline to canonical position
Jun 24 2024, 5:08 PM
rlibby closed D45709: vfs: move __always_inline to canonical position.
Jun 24 2024, 5:08 PM
rlibby closed D45708: kern: move __always_inline to canonical position.
Jun 24 2024, 5:08 PM
rlibby committed rG3c84b4b35f28: kern: move __always_inline to canonical position (authored by rlibby).
kern: move __always_inline to canonical position
Jun 24 2024, 5:08 PM
rlibby added inline comments to D45711: cdefs.h: add __inline to __always_inline.
Jun 24 2024, 4:17 AM
rlibby committed rG88478cc02a20: i386 kernel __storeload_barrier: quiet gcc -Warray-bounds (authored by rlibby).
i386 kernel __storeload_barrier: quiet gcc -Warray-bounds
Jun 24 2024, 1:31 AM
rlibby closed D45695: i386 kernel __storeload_barrier: quiet gcc -Warray-bounds.
Jun 24 2024, 1:31 AM

Jun 23 2024

rlibby closed D45694: amd64 kernel __storeload_barrier: quiet gcc -Warray-bounds.
Jun 23 2024, 11:25 PM
rlibby committed rG6095f4b04cf9: amd64 kernel __storeload_barrier: quiet gcc -Warray-bounds (authored by rlibby).
amd64 kernel __storeload_barrier: quiet gcc -Warray-bounds
Jun 23 2024, 11:25 PM
rlibby committed rGfda32d586035: lock.9: describe lockmgr_{disowned,lock_flags,slock,unlock,xlock} (authored by rlibby).
lock.9: describe lockmgr_{disowned,lock_flags,slock,unlock,xlock}
Jun 23 2024, 9:49 PM
rlibby closed D45689: lock.9: describe lockmgr_{disowned,lock_flags,slock,unlock,xlock}.
Jun 23 2024, 9:48 PM
rlibby updated the diff for D45711: cdefs.h: add __inline to __always_inline.

kib: s/inline/__inline/

Jun 23 2024, 6:47 PM
rlibby retitled D45711: cdefs.h: add __inline to __always_inline from cdefs.h: add inline to __always_inline to cdefs.h: add __inline to __always_inline.
Jun 23 2024, 6:47 PM
rlibby added a comment to D45711: cdefs.h: add __inline to __always_inline.
In D45711#1042461, @imp wrote:

Is this used in .h file or .c files?

Jun 23 2024, 6:45 PM
rlibby updated the summary of D45711: cdefs.h: add __inline to __always_inline.
Jun 23 2024, 4:57 PM
rlibby requested review of D45711: cdefs.h: add __inline to __always_inline.
Jun 23 2024, 4:53 PM
rlibby requested review of D45712: libmsun: remove duplicates after cdefs.h added inline to __always_inline.
Jun 23 2024, 4:53 PM
rlibby requested review of D45710: libthr: move __always_inline to canonical position.
Jun 23 2024, 4:53 PM
rlibby requested review of D45709: vfs: move __always_inline to canonical position.
Jun 23 2024, 4:53 PM
rlibby requested review of D45708: kern: move __always_inline to canonical position.
Jun 23 2024, 4:53 PM
rlibby updated the summary of D45707: bluetooth socket sysinit: correct memset initialization.
Jun 23 2024, 4:39 PM
rlibby requested review of D45707: bluetooth socket sysinit: correct memset initialization.
Jun 23 2024, 4:38 PM
rlibby requested review of D45701: ext4_ext_tree_init: correct memset initialization.
Jun 23 2024, 3:59 PM
rlibby added a comment to D45694: amd64 kernel __storeload_barrier: quiet gcc -Warray-bounds.
In D45694#1042256, @kib wrote:

Would you please show the gcc warning, to satisfy my curiosity?

Jun 23 2024, 4:11 AM

Jun 22 2024

rlibby updated the test plan for D45695: i386 kernel __storeload_barrier: quiet gcc -Warray-bounds.
Jun 22 2024, 5:58 PM
rlibby updated the summary of D45694: amd64 kernel __storeload_barrier: quiet gcc -Warray-bounds.
Jun 22 2024, 5:56 PM
rlibby requested review of D45695: i386 kernel __storeload_barrier: quiet gcc -Warray-bounds.
Jun 22 2024, 5:52 PM
rlibby requested review of D45694: amd64 kernel __storeload_barrier: quiet gcc -Warray-bounds.
Jun 22 2024, 5:52 PM

Jun 21 2024

rlibby requested review of D45689: lock.9: describe lockmgr_{disowned,lock_flags,slock,unlock,xlock}.
Jun 21 2024, 8:46 PM

Jun 20 2024

rlibby added a comment to D45627: pctrie: create iterator.

Doug, fyi, I'm interested to look, but probably won't have time until the weekend.

Jun 20 2024, 6:24 PM
rlibby added a comment to D45624: lockmgr: introduce lock_sleepgen.

[I don't have a lot of stake in this code and my thoughts here aren't very nuanced.]

I have also though of a significantly less complex approach that also avoids the bufobj interlock.

Given that we're unlikely to see new consumers of lockmgr going forward, I wonder whether sleepgen would might someday be useful for avoiding the vnode interlock in some cases? If not, then this seems like a lot of machinery to deal with one lock, though the diff isn't too big.

Jun 20 2024, 5:54 PM

Jun 18 2024

rlibby added a comment to D45624: lockmgr: introduce lock_sleepgen.

A variant idea with a smaller API, but instead with a callback from under the sleepq lock. No more sleepgen, and the caller passes a pointer to the holder count to avoid defining a new lock type.
https://github.com/rlibby/freebsd/commits/lockmgr-condwait/

Jun 18 2024, 5:36 PM

Jun 17 2024

rlibby updated the summary of D45625: getblk: avoid bufobj interlock when waiting on buf lock.
Jun 17 2024, 9:31 PM
rlibby added reviewers for D45624: lockmgr: introduce lock_sleepgen: kib, markj, mckusick, mjg.
Jun 17 2024, 9:28 PM
rlibby updated the summary of D45624: lockmgr: introduce lock_sleepgen.
Jun 17 2024, 9:18 PM
rlibby requested review of D45625: getblk: avoid bufobj interlock when waiting on buf lock.
Jun 17 2024, 9:16 PM
rlibby requested review of D45624: lockmgr: introduce lock_sleepgen.
Jun 17 2024, 9:15 PM

Jun 16 2024

rlibby closed D45571: getblk: track "non-sterile" bufobj to avoid bo lock on miss if sterile.
Jun 16 2024, 9:19 PM
rlibby committed rG0dc98b57f321: getblk: track "non-sterile" bufobj to avoid bo lock on miss if sterile (authored by rlibby).
getblk: track "non-sterile" bufobj to avoid bo lock on miss if sterile
Jun 16 2024, 9:19 PM
rlibby accepted D45588: vm_object: use reclaim callback to free pages.

So the point here is to move us away from needing memq at all, correct? Taking this patch by itself, I am not seeing a performance benefit (different from your other recent uses of PCTRIE_RECLAIM_CALLBACK).

Jun 16 2024, 2:10 AM

Jun 14 2024

rlibby added a comment to D45586: pctrie: avoid typecast.

I checked for warnings, nothing new in subr_pctrie.c, subr_rangeset.c, or swap_pager.c. Good to go.

Jun 14 2024, 4:57 AM
rlibby accepted D45586: pctrie: avoid typecast.

LGTM. Did you check that clang and gcc don't produce warnings? I don't think they should. I can try applying and checking this evening if you haven't already.

Jun 14 2024, 1:41 AM

Jun 13 2024

rlibby accepted D45583: swap_pager: use pctrie_reclaim_callback in meta_free_all.

So, the previous pindex tracking was totally unnecessary, we always tear down the whole tree, correct? From what I can tell, it looks like swp_pager_meta_build maintains a SWAP_META_PAGES alignment invariant for the keys, so we should never have been hopping over another entry anyway.

Jun 13 2024, 6:00 PM
rlibby accepted D45584: subr_rangeset: use pctrie_reclaim_callback in remove_all.

Logic looks good.

Jun 13 2024, 5:39 PM
rlibby updated the diff for D45571: getblk: track "non-sterile" bufobj to avoid bo lock on miss if sterile.

kib (IIUC):

  • reassignbuf, given fence and bo lock, don't need atomic_set_acq_int
  • getblkx, given fence, don't need atomic_load_int
Jun 13 2024, 7:55 AM
rlibby added a comment to D45571: getblk: track "non-sterile" bufobj to avoid bo lock on miss if sterile.
In D45571#1039766, @kib wrote:

IMO this is somewhat strange change in isolation. What is the action of your caller if GB_NOCREAT does not return a buffer?

I am asking this because if you consider the buffer cache autonomously, there is a big race there, since another thread might create the buffer right after we did not found it, and the answer we get is already outdated.

Jun 13 2024, 7:22 AM

Jun 12 2024

rlibby added inline comments to D45565: subr_pctrie: add leaf callbacks to pctrie_reclaim.
Jun 12 2024, 7:41 PM
rlibby added a comment to D45571: getblk: track "non-sterile" bufobj to avoid bo lock on miss if sterile.

Taking advice on style and proper atomic conventions.

Jun 12 2024, 7:37 PM
rlibby updated the summary of D45571: getblk: track "non-sterile" bufobj to avoid bo lock on miss if sterile.
Jun 12 2024, 7:30 PM
rlibby requested review of D45571: getblk: track "non-sterile" bufobj to avoid bo lock on miss if sterile.
Jun 12 2024, 7:28 PM
rlibby accepted D45565: subr_pctrie: add leaf callbacks to pctrie_reclaim.

Style nits, otherwise LGTM.

Jun 12 2024, 7:00 PM
rlibby added inline comments to D45565: subr_pctrie: add leaf callbacks to pctrie_reclaim.
Jun 12 2024, 6:53 PM
rlibby accepted D45565: subr_pctrie: add leaf callbacks to pctrie_reclaim.

I have some nitpicks, but the actual logic looks good to me.

Jun 12 2024, 4:19 PM

Jun 11 2024

rlibby committed rGe754909cb0ae: virstor: remove relation between chunk size and MAXPHYS (authored by rlibby).
virstor: remove relation between chunk size and MAXPHYS
Jun 11 2024, 12:42 AM
rlibby committed rGa2fda816eb05: virstor: write large maps in chunks during label (authored by rlibby).
virstor: write large maps in chunks during label
Jun 11 2024, 12:42 AM
rlibby closed D45518: virstor: remove relation between chunk size and MAXPHYS.
Jun 11 2024, 12:42 AM
rlibby closed D45517: virstor: write large maps in chunks during label.
Jun 11 2024, 12:42 AM

Jun 10 2024

rlibby committed rG0f409d2673f2: BSD.tests.dist: add entry for virstor test (authored by rlibby).
BSD.tests.dist: add entry for virstor test
Jun 10 2024, 6:58 PM
rlibby closed D45551: BSD.tests.dist: add entry for virstor test.
Jun 10 2024, 6:58 PM
rlibby added reviewers for D45551: BSD.tests.dist: add entry for virstor test: asomers, markj.
Jun 10 2024, 6:50 PM
rlibby requested review of D45551: BSD.tests.dist: add entry for virstor test.
Jun 10 2024, 6:49 PM
rlibby committed rG7affbeeab1c9: virstor: basic functional test (authored by rlibby).
virstor: basic functional test
Jun 10 2024, 5:35 PM
rlibby closed D45535: virstor: basic functional test.
Jun 10 2024, 5:35 PM
rlibby updated the test plan for D45517: virstor: write large maps in chunks during label.
Jun 10 2024, 4:23 PM
rlibby updated the test plan for D45518: virstor: remove relation between chunk size and MAXPHYS.
Jun 10 2024, 4:23 PM

Jun 9 2024

rlibby updated the diff for D45535: virstor: basic functional test.

asomers feedback:

  • cleanup was broken since it runs in a different context
  • prefer swap to malloc type md
  • rename $md0
Jun 9 2024, 11:01 PM
rlibby updated the test plan for D45535: virstor: basic functional test.
Jun 9 2024, 10:51 PM
rlibby added inline comments to D45535: virstor: basic functional test.
Jun 9 2024, 9:03 PM

Jun 8 2024

rlibby updated the diff for D45535: virstor: basic functional test.

realized we may need to wait after the re-taste

Jun 8 2024, 1:09 AM
rlibby updated the diff for D45518: virstor: remove relation between chunk size and MAXPHYS.

markj feedback: fix style while here

Jun 8 2024, 12:36 AM
rlibby updated the diff for D45517: virstor: write large maps in chunks during label.

markj feedback: clean up error paths

Jun 8 2024, 12:35 AM

Jun 7 2024

rlibby updated the diff for D45535: virstor: basic functional test.

asomers: tap was a bad example, use atf

Jun 7 2024, 10:30 PM
rlibby requested review of D45535: virstor: basic functional test.
Jun 7 2024, 8:26 PM
rlibby added a comment to D45518: virstor: remove relation between chunk size and MAXPHYS.

They are not hooked up to the sys/Kyuafile. I wonder why.

Jun 7 2024, 2:57 PM
rlibby added a comment to D45518: virstor: remove relation between chunk size and MAXPHYS.

I don't know this GEOM well enough to say whether this is right, but I can't see any reason it's wrong. It's unfortunate that there are no regression tests for this code.

I see there are tests for other geoms in tests/sys/geom, but I haven't figured out how to run them yet. Do you know? I might be able to cobble together something basic at least.

Jun 7 2024, 2:50 PM
rlibby added a comment to D45518: virstor: remove relation between chunk size and MAXPHYS.

I don't know this GEOM well enough to say whether this is right, but I can't see any reason it's wrong. It's unfortunate that there are no regression tests for this code.

Jun 7 2024, 2:46 PM
rlibby added inline comments to D45517: virstor: write large maps in chunks during label.
Jun 7 2024, 2:44 PM

Jun 6 2024

rlibby added a comment to D45510: vm_radix: offer insert with le lookup and fast replacement.

I would expect an iterator to consist of an array of maxdepth pointers and a parent index and a leaf index. Initialization means setting the first array element to root and the counter to 1. Searching updates the path, and insert/remove operations can happen in constant time at the bottom of the path, given the leaf index, and iteration happens by incrementing the leaf index to the next non-null child or, if there is none, backing up the path as far as necessary to take a step further right.

Yes I think that would work, and probably has simpler logic. IIUC the maxdepth is about 16 or 21 levels (depending on arch, and I may be off by 1), so 128 or 84 bytes for the array. I guess that's not so bad.

Jun 6 2024, 7:07 PM
rlibby added a comment to D45510: vm_radix: offer insert with le lookup and fast replacement.

struct pctrie_iter {
struct pctrie_node *cur;/* current inner */
struct pctrie_node *prev;/* last inner, or ancestor, for peek_prev */
struct pctrie_node *parent;/* current parent, for remove and next */
uint64_t key; /* current position */
/* May need some state bits? */
};

It's not clear to me how the iterator could take two steps up the tree. You can use parent to get one step up, but how do you find the parent's parent? Only if every node stores it parent, I think, which would be a big change.

Jun 6 2024, 6:16 PM
rlibby updated the summary of D45517: virstor: write large maps in chunks during label.
Jun 6 2024, 5:56 PM
rlibby requested review of D45518: virstor: remove relation between chunk size and MAXPHYS.
Jun 6 2024, 5:45 PM