Page MenuHomeFreeBSD

mjg (Mateusz Guzik)
User

Projects (2)

User Details

User Since
Jun 4 2014, 10:38 AM (647 w, 2 d)

Recent Activity

Yesterday

mjg added inline comments to D60894: pf: optimize state key comparison on amd4.
Fri, Oct 30, 6:53 PM
mjg requested changes to D60983: vn_fullpath.9: document the name cache fallback's locking.

It is not legal to hold any vnode locks across a call to vn_fullpath. In particular having the vp locked threatens a deadlock against normal path lookup, as the reconstruction grabs one lock at a time the opposite way. So you can have the child locked and stall waiting for the parent, while the forward lookup just locked the parent and now wants the child.

Fri, Oct 30, 3:39 AM

Thu, Oct 22

mjg added inline comments to D60894: pf: optimize state key comparison on amd4.
Thu, Oct 22, 5:51 AM
mjg added inline comments to D60894: pf: optimize state key comparison on amd4.
Thu, Oct 22, 5:18 AM
mjg added a comment to D60894: pf: optimize state key comparison on amd4.
In D60894#1397813, @mjg wrote:

I did not see any point in benchmarking this, it is strictly less work in the fast path.

This is definitely not the right attitude when submitting patches that add more code and are declared as a performance improvement.

Thu, Oct 22, 5:14 AM
mjg updated the diff for D60894: pf: optimize state key comparison on amd4.

sigh, use correct diff

Thu, Oct 22, 2:32 AM
mjg added a comment to D60894: pf: optimize state key comparison on amd4.

I did not see any point in benchmarking this, it is strictly less work in the fast path.

Thu, Oct 22, 2:31 AM
mjg updated the diff for D60894: pf: optimize state key comparison on amd4.
  • guard CTASSERT with _KERNEL. verified it fixes buildworld
Thu, Oct 22, 2:30 AM

Tue, Oct 20

mjg updated the summary of D60894: pf: optimize state key comparison on amd4.
Tue, Oct 20, 12:37 PM
mjg requested review of D60894: pf: optimize state key comparison on amd4.
Tue, Oct 20, 12:37 PM
mjg committed rGe6fb3b518ac4: vfs: unbreak builds when MAC is not defined.
Tue, Oct 20, 5:50 AM
mjg committed rGdbbff47e274c: Retire bogus predicts on case statements..
Tue, Oct 20, 5:36 AM

Mon, Oct 12

mjg accepted D60658: rms: Order a writer's stores before its readers see it leave.
Mon, Oct 12, 8:13 PM
mjg added a comment to D60658: rms: Order a writer's stores before its readers see it leave.

While I agree the fence is missing, I completely disagree with the fix.

Mon, Oct 12, 7:10 PM

Fri, Oct 9

mjg added inline comments to D60535: pf: Free unreferenced interfaces after dropping pfi_unlnkdkifs_mtx.
Fri, Oct 9, 5:51 PM
mjg added inline comments to D60535: pf: Free unreferenced interfaces after dropping pfi_unlnkdkifs_mtx.
Fri, Oct 9, 5:40 PM
mjg added inline comments to D60535: pf: Free unreferenced interfaces after dropping pfi_unlnkdkifs_mtx.
Fri, Oct 9, 5:38 PM

Jul 8 2026

mjg committed rG750d429a228f: vfs cache: further massage some commentary.
Jul 8 2026, 9:16 PM

May 28 2026

mjg added a comment to D57305: vfs: work around the race between vget() and vnlru.

This greatly reduces the race window, but it does not fix the problem.

May 28 2026, 8:44 PM

Apr 18 2026

mjg committed rG8c94a1ea1555: pipe: retire the unused PIPE_LWANT macro.
Apr 18 2026, 8:23 AM

Apr 17 2026

mjg abandoned D45913: netinet6: fix parent lle locking.

fixed in https://cgit.freebsd.org/src/commit/?id=d6138a65405f697715189363b2b18581e7abd982

Apr 17 2026, 5:28 AM
mjg commandeered D45913: netinet6: fix parent lle locking.
Apr 17 2026, 5:27 AM

Apr 7 2026

mjg added a comment to D21206: libc: add fdwalk.

I'm fine either way.

Apr 7 2026, 8:46 PM
mjg added a comment to D21206: libc: add fdwalk.

So the ranged bitmap proposal works, but it also has funny corner cases if fds are very sparse which perhaps are not worth it.

Apr 7 2026, 8:32 PM

Mar 9 2026

mjg removed a member for network: mjg.
Mar 9 2026, 10:10 PM
mjg updated mjg.
Mar 9 2026, 9:41 PM

Feb 27 2026

mjg added a comment to D55560: vnet: Ensure space allocated by vnet_data_alloc() is properly aligned.

I did not co-autor the change, so please drop that tag.

Feb 27 2026, 4:47 PM

Feb 25 2026

mjg accepted D55512: ffs snapshots: pass valid args to vn_start_write.
Feb 25 2026, 6:30 PM

Nov 10 2025

mjg added a comment to D53674: iflib: remove transmit prefetching.

these also need to go:

Nov 10 2025, 7:22 PM
mjg accepted D53674: iflib: remove transmit prefetching.
Nov 10 2025, 7:19 PM
mjg added a comment to D53674: iflib: remove transmit prefetching.

This looks legitimate.

Nov 10 2025, 6:28 PM

Nov 4 2025

mjg added a comment to D53582: mutex: add missing checks for SCHEDULER_STOPPED().

I checked sx and rw locks and I only see the check in the slowpath.

Nov 4 2025, 7:20 PM

Oct 20 2025

mjg accepted D53176: audit: convert audit event class lookup to lockless.
Oct 20 2025, 6:59 PM

Oct 18 2025

mjg added a comment to D53176: audit: convert audit event class lookup to lockless.

Do you have stats how many classes can be realistically present? maybe this would be way faster single-threaded by iterating an array?

Oct 18 2025, 2:50 AM

Oct 16 2025

mjg added a comment to D52628: vfs: fix races between vdrop and VOP_UNLOCK.

I'll be posting a different variant later today.

Oct 16 2025, 11:11 AM
mjg added a comment to D53026: realpath: Avoid doing unnecessary work.

I think some work can be saved if the errno is ENOENT or EACCESS, but someone(tm) has to make sure errors of the sort are not returned from the stage where the syscall does the reverse lookup.

Oct 16 2025, 11:08 AM

Oct 15 2025

mjg committed rG57bf745be964: vfs offset: fix assertion failure in face of racing ffofset and setfl locking.
Oct 15 2025, 2:13 AM
mjg committed rGf43e19db6cea: vfs offset: fix assertion failure in face of racing ffofset and setfl locking.
Oct 15 2025, 2:12 AM

Oct 14 2025

mjg added a comment to D53070: pf: remove unused variable allrulelist.
In D53070#1212661, @mjg wrote:

This *is* used by pf_rule_counter_u64_periodic. The goal is to sum up the 32 bit values frequently enough(tm) that they don't overflow.

Then probably better to rename the field from allrulelist to markerlist.

Oct 14 2025, 11:53 PM
mjg added a comment to D53070: pf: remove unused variable allrulelist.

This *is* used by pf_rule_counter_u64_periodic. The goal is to sum up the 32 bit values frequently enough(tm) that they don't overflow.

Oct 14 2025, 7:31 AM

Oct 6 2025

mjg committed rG0ecbc335daa8: nullfs: fix up build with INVARIANTS after previous.
Oct 6 2025, 7:23 PM
mjg committed rG84f981ba57e7: nullfs: shrink null_node to 32 bytes.
Oct 6 2025, 6:23 PM
mjg committed rGe0b571d77364: mtx: rename MTX_CONTESTED to MTX_WAITERS.
Oct 6 2025, 2:22 AM

Oct 5 2025

mjg committed rGb1de02c415de: vfs offset: fix assertion failure in face of racing ffofset and setfl locking.
Oct 5 2025, 9:22 PM
mjg committed rGf16178e0bba8: vfs foffset: drop weird commentary about offset protection.
Oct 5 2025, 9:22 PM
mjg closed D52915: fix file_v_unlock.
Oct 5 2025, 9:22 PM
mjg updated the summary of D52915: fix file_v_unlock.
Oct 5 2025, 5:25 PM
mjg requested review of D52915: fix file_v_unlock.
Oct 5 2025, 5:23 PM
mjg committed rGccb600906f15: mtx: retire _mtx_release_lock_quick.
Oct 5 2025, 3:54 PM
mjg committed rGd0a35ec01c31: pipe: consistently use PIPE_LOCK_ASSERT.
Oct 5 2025, 3:54 PM

Oct 4 2025

mjg committed rG6cc493c79d9b: mtx: remove stale commentary about inlined spinlock ops.
Oct 4 2025, 2:23 AM

Oct 3 2025

mjg closed D52819: nullfs: smr-protected hash lookup and locking.

landed

Oct 3 2025, 9:14 PM
mjg committed rG249ec85352b5: nullfs: smr-protected hash lookup.
Oct 3 2025, 7:23 PM
mjg committed rG641a58239520: nullfs: avoid the interlock in null_lock with smr.
Oct 3 2025, 7:23 PM
mjg committed rG72347d73464c: nullfs: assert the vnode is not doomed in null_hashget_locked.
Oct 3 2025, 7:22 PM
mjg committed rG94aae0513896: nullfs: remove the vhold/vdrop cycle around unlock.
Oct 3 2025, 7:22 PM
mjg updated the diff for D52819: nullfs: smr-protected hash lookup and locking.
  • remove goto labels
Oct 3 2025, 6:52 PM
mjg added inline comments to D52819: nullfs: smr-protected hash lookup and locking.
Oct 3 2025, 4:27 PM
mjg updated the test plan for D52819: nullfs: smr-protected hash lookup and locking.
Oct 3 2025, 2:09 PM
mjg updated the diff for D52819: nullfs: smr-protected hash lookup and locking.
  • sort includes
  • fix a bug found by pho@ in the lock smr patch: after the lock is acquired, doomed handling has to be the same as with the interlock-protected routine
Oct 3 2025, 2:08 PM

Oct 1 2025

mjg updated the diff for D52819: nullfs: smr-protected hash lookup and locking.
  • patch up commentary
  • remove a debug tunable
Oct 1 2025, 2:18 PM
mjg added inline comments to D52819: nullfs: smr-protected hash lookup and locking.
Oct 1 2025, 1:55 PM
mjg added a comment to D52819: nullfs: smr-protected hash lookup and locking.
In D52819#1207028, @kib wrote:

This is not a complete patch, I think? The other bits except smr lock are missing.

Oct 1 2025, 1:51 PM
mjg updated the diff for D52819: nullfs: smr-protected hash lookup and locking.
  • upload the entire thing
Oct 1 2025, 1:51 PM
mjg added inline comments to D52819: nullfs: smr-protected hash lookup and locking.
Oct 1 2025, 11:15 AM
mjg updated the diff for D52819: nullfs: smr-protected hash lookup and locking.
  • also drop ref drip around unlock
Oct 1 2025, 11:15 AM
mjg added inline comments to D52819: nullfs: smr-protected hash lookup and locking.
Oct 1 2025, 10:49 AM
mjg retitled D52819: nullfs: smr-protected hash lookup and locking from nullfs: smr-protected hash lookup
Oct 1 2025, 10:45 AM
mjg updated the diff for D52819: nullfs: smr-protected hash lookup and locking.
Oct 1 2025, 10:45 AM
mjg updated the diff for D52819: nullfs: smr-protected hash lookup and locking.
Oct 1 2025, 10:43 AM
mjg updated the diff for D52819: nullfs: smr-protected hash lookup and locking.
  • doomed asserts
  • cosmetic fixups to null_hashget_locked
  • null_lock using smr
Oct 1 2025, 10:41 AM
mjg committed rG1bbc898dbf72: zfs: annotate arc_buf_is_shared with __maybe_unused.
Oct 1 2025, 10:19 AM
mjg updated the summary of D52819: nullfs: smr-protected hash lookup and locking.
Oct 1 2025, 9:28 AM
mjg requested review of D52819: nullfs: smr-protected hash lookup and locking.
Oct 1 2025, 9:28 AM
mjg committed rG5b63afc09a86: watchdog: ifdef wd_ioctl_patpat on COMPAT_FREEBSD14.
Oct 1 2025, 7:42 AM
mjg committed rG4e0997d1d492: zfs: retire zfs_zstd_compress_wrap.
Oct 1 2025, 7:12 AM

Sep 30 2025

mjg added a comment to D52795: ddb show lockedvnods: avoid trap for ufs vnode under construction.

I think this is turning into a bikeshed, so just do what you feel.

Sep 30 2025, 5:25 PM
mjg added a comment to D52795: ddb show lockedvnods: avoid trap for ufs vnode under construction.

The above may be true and the pointer may be populated depending on when you got the the inode. I would just add something like "->i_din2 is NULL, some information omitted" or compatible.

Sep 30 2025, 4:36 PM
mjg committed rG2bdc89535a88: amd64: bump sleepq hash size to 2048.
Sep 30 2025, 4:15 PM
mjg added a comment to D52795: ddb show lockedvnods: avoid trap for ufs vnode under construction.

maybe print that the pointer is NULL?

Sep 30 2025, 11:03 AM

Sep 29 2025

mjg committed rG6cb542e31bef: iflib: ifdef iflib_simple_transmit and iflib_simple_select_queue on ALTQ.
Sep 29 2025, 3:14 PM

Sep 28 2025

mjg added a comment to D52757: vfs cache: Add vn_fullpath_jail(), factor out common code.

I don't have an opinion on the functionality, but the implementation looks avoidably slow.

Sep 28 2025, 6:43 PM

Sep 27 2025

mjg committed rG5e395c34402d: vfs: stop using SDT_PROBES_ENABLED in inlined ops.
Sep 27 2025, 4:02 AM
mjg committed rG7e4c451c12ae: vfs: retire the VREF macro.
Sep 27 2025, 4:02 AM
mjg committed rG01c8e2e33df8: vfs: retire the NULLVP macro.
Sep 27 2025, 4:02 AM
mjg committed rG08f06aa1b4fb: vfs: retire the VCALL macro.
Sep 27 2025, 4:02 AM
mjg committed rG5c0e5f418d9f: BUF_ISLOCKED.9: drop a reference to lockstatus(9).
Sep 27 2025, 4:02 AM

Sep 25 2025

mjg committed rGa15f2c5cc58f: proc: perform P_CONTROLT check on fork without SESS_LOCK.
Sep 25 2025, 11:51 AM

Sep 24 2025

mjg planned changes to D52628: vfs: fix races between vdrop and VOP_UNLOCK.
Sep 24 2025, 9:49 AM
mjg added inline comments to D52628: vfs: fix races between vdrop and VOP_UNLOCK.
Sep 24 2025, 9:14 AM
mjg committed rG21d42c8d9022: vfs: let the compiler catch unhandled vgetstate values in vget_abort.
Sep 24 2025, 9:02 AM
mjg committed rG185c2c3dab36: vfs: reduce indentation in vput_final.
Sep 24 2025, 8:24 AM
mjg added inline comments to D52628: vfs: fix races between vdrop and VOP_UNLOCK.
Sep 24 2025, 8:11 AM

Sep 23 2025

mjg updated the diff for D52628: vfs: fix races between vdrop and VOP_UNLOCK.
  • patch up some comments
  • add the missing acq fence
Sep 23 2025, 8:41 PM

Sep 22 2025

mjg added inline comments to D52628: vfs: fix races between vdrop and VOP_UNLOCK.
Sep 22 2025, 6:51 PM
mjg added inline comments to D52628: vfs: fix races between vdrop and VOP_UNLOCK.
Sep 22 2025, 5:24 PM
mjg added inline comments to D52628: vfs: fix races between vdrop and VOP_UNLOCK.
Sep 22 2025, 5:23 PM
mjg added inline comments to D52628: vfs: fix races between vdrop and VOP_UNLOCK.
Sep 22 2025, 5:08 PM
mjg added a comment to D52628: vfs: fix races between vdrop and VOP_UNLOCK.

vput et al are the primary consumers of vdrop.

Sep 22 2025, 5:06 PM
mjg added a comment to D52628: vfs: fix races between vdrop and VOP_UNLOCK.

Huh, so happens vtryrecycle unlocks and then vdrops, so it happens to not run into the problem after all. General remark stands though.

Sep 22 2025, 4:19 PM