mjg (Mateusz Guzik)
nice guy

Projects

User Details

User Since
Jun 4 2014, 10:38 AM (207 w, 1 d)

Recent Activity

Wed, May 23

mjg added a comment to D15531: Inline critical_enter/exit for amd64.

I tried that. Some mutex users can't affort to pull in proc.h either. The motivation here is to provide mutex unlock without atomics, which requires partial access to thread layout.

Wed, May 23, 12:42 PM
mjg added a comment to D15531: Inline critical_enter/exit for amd64.

I noted I have a use for this in mutex code, but mutexes are included by proc.h which creates a lot of dependency fun. An attempt to create _thread.h failed as there is just too much work.

Wed, May 23, 12:32 PM
mjg committed rS334087: Remove incorrect owepreempt assertion added in r334062.
Remove incorrect owepreempt assertion added in r334062
Wed, May 23, 10:13 AM
mjg created D15531: Inline critical_enter/exit for amd64.
Wed, May 23, 5:16 AM

Tue, May 22

mjg committed rS334062: Move preemption handling out of critical_exit..
Move preemption handling out of critical_exit.
Tue, May 22, 7:25 PM
mjg committed rS334048: sx: fixup a braino in r334024.
sx: fixup a braino in r334024
Tue, May 22, 3:13 PM
mjg committed rS334026: Reduce sdt-related branch-fest in mi_switch..
Reduce sdt-related branch-fest in mi_switch.
Tue, May 22, 8:27 AM
mjg committed rS334024: sx: port over writer starvation prevention measures from rwlock.
sx: port over writer starvation prevention measures from rwlock
Tue, May 22, 7:20 AM
mjg committed rS334023: rw: decrease writer starvation.
rw: decrease writer starvation
Tue, May 22, 7:16 AM

Mon, May 21

mjg committed rS333966: amd64: annotate pti with __read_frequently.
amd64: annotate pti with __read_frequently
Mon, May 21, 5:20 AM

Sun, May 20

mjg committed rS333916: vfs: simplify vop_stdlock/unlock.
vfs: simplify vop_stdlock/unlock
Sun, May 20, 4:45 AM

Fri, May 18

mjg committed rS333816: lockmgr: avoid atomic on unlock in the slow path.
lockmgr: avoid atomic on unlock in the slow path
Fri, May 18, 10:58 PM
mjg added a comment to D15483: More bcmp "optimization".

First a minor note is that I took the liberty of s/bzero/bcmp, which I presume was intended.

Fri, May 18, 7:52 PM
mjg retitled D15483: More bcmp "optimization" from More bzero "optimization" to More bcmp "optimization".
Fri, May 18, 7:31 PM
mjg committed rS333784: amd64: tweak the read_frequently section.
amd64: tweak the read_frequently section
Fri, May 18, 7:31 AM

Fri, May 11

mjg committed rS333486: amd64: align the .data.exclusive_cache_line section to 128.
amd64: align the .data.exclusive_cache_line section to 128
Fri, May 11, 8:57 AM
mjg committed rS333484: uma: increase alignment to 128 bytes on amd64.
uma: increase alignment to 128 bytes on amd64
Fri, May 11, 7:05 AM
mjg closed D15346: Reduce false sharing in UMA on amd64 by increasing padding to 128 bytes.
Fri, May 11, 7:05 AM
mjg committed rS333483: rmlock: partially depessimize lock/unlock fastpath.
rmlock: partially depessimize lock/unlock fastpath
Fri, May 11, 7:00 AM

Wed, May 9

mjg committed rS333413: amd64: depessimize bcmp for small buffers.
amd64: depessimize bcmp for small buffers
Wed, May 9, 3:16 PM
mjg accepted D15367: Avoid bzero() before ireloc..

This makes the kernel boot fine with mem* routines flipped to erms.

Wed, May 9, 2:20 PM

Tue, May 8

mjg set the repository for D15346: Reduce false sharing in UMA on amd64 by increasing padding to 128 bytes to rS FreeBSD src repository.
Tue, May 8, 12:52 AM
mjg created D15346: Reduce false sharing in UMA on amd64 by increasing padding to 128 bytes.
Tue, May 8, 12:52 AM

Mon, May 7

mjg committed rS333344: Inlined sched_userret..
Inlined sched_userret.
Mon, May 7, 11:36 PM
mjg committed rS333342: Change trap_enotcap to bool and annotate with __read_frequently.
Change trap_enotcap to bool and annotate with __read_frequently
Mon, May 7, 11:10 PM
mjg committed rS333339: Avoid calls to syscall_thread_enter/exit for statically defined syscalls.
Avoid calls to syscall_thread_enter/exit for statically defined syscalls
Mon, May 7, 10:29 PM
mjg committed rS333337: amd64: stop asserting params != NULL in the syscall path.
amd64: stop asserting params != NULL in the syscall path
Mon, May 7, 9:32 PM
mjg committed rS333332: amd64: fix up memset added in r333324.
amd64: fix up memset added in r333324
Mon, May 7, 8:54 PM
mjg committed rS333328: amd64: tweak the memmove comment regarding authorship.
amd64: tweak the memmove comment regarding authorship
Mon, May 7, 5:37 PM
mjg committed rS333324: amd64: replace libkern's memset and memmove with assembly variants.
amd64: replace libkern's memset and memmove with assembly variants
Mon, May 7, 3:07 PM

Fri, May 4

mjg committed rS333267: tc: bcopy -> memcpy.
tc: bcopy -> memcpy
Fri, May 4, 10:48 PM
mjg committed rS333266: amd64: syscall path bcopy -> memcpy.
amd64: syscall path bcopy -> memcpy
Fri, May 4, 10:41 PM
mjg committed rS333265: Allow the compiler to use __builtin_memcpy.
Allow the compiler to use __builtin_memcpy
Fri, May 4, 10:34 PM
mjg committed rS333241: amd64: get rid of the pessimized bcopy in syscall arg copy.
amd64: get rid of the pessimized bcopy in syscall arg copy
Fri, May 4, 4:05 AM
mjg committed rS333240: Allow __builtin_memmove instead of bcopy for small buffers of known size.
Allow __builtin_memmove instead of bcopy for small buffers of known size
Fri, May 4, 4:01 AM

Mon, Apr 30

mjg added a comment to D15233: make ucred thread private.

I meant per-uid accounting specifically. I have no issue with counting swap usage in general, which also happens to not induce the problem.

Mon, Apr 30, 10:10 PM
mjg added a comment to D15233: make ucred thread private.
In D15233#321179, @jeff wrote:
In D15233#321171, @mjg wrote:

The way to go is with per-cpu based reference counting which reverts back to single-word atomics as needed. This paired with a separate count of "legitimate" refs would take care of the problem altogether without duplicating everything.

I agree that would be better although we need to look at how this would be implemented and see if we have a reasonable solution. I assume it would likely need to be some variant of counter(9). Presumably when the per-cpu var transitioned from 0 to 1 you would grab an atomic on the global? And then release on 1->0?

Mon, Apr 30, 9:39 PM
mjg added a comment to D15233: make ucred thread private.

I completely disagree with this.

Mon, Apr 30, 9:18 AM

Fri, Apr 27

mjg added a comment to D15122: Eliminate vm object relocks in vm fault..
In D15122#320743, @kib wrote:

mjg@, does this still provides an improvement in your benchmarks ? Can you provide the numbers ?

Fri, Apr 27, 4:27 PM
mjg committed rS333066: Unbreak world build after r333064.
Unbreak world build after r333064
Fri, Apr 27, 3:50 PM
mjg committed rS333064: systrace: track it like sdt probes.
systrace: track it like sdt probes
Fri, Apr 27, 3:16 PM
mjg committed rS333052: uma: whack main zone counter update in the slow path.
uma: whack main zone counter update in the slow path
Fri, Apr 27, 5:37 AM
mjg committed rS333051: vm: move vm_cnt to __read_mostly now that it is not written to.
vm: move vm_cnt to __read_mostly now that it is not written to
Fri, Apr 27, 5:36 AM

Apr 24 2018

mjg committed rS332911: lockf: change the owner hash from pid to vnode-based.
lockf: change the owner hash from pid to vnode-based
Apr 24 2018, 6:10 AM
mjg committed rS332901: dtrace: depessimize dtmalloc when dtrace is active.
dtrace: depessimize dtmalloc when dtrace is active
Apr 24 2018, 1:06 AM
mjg committed rS332900: lockstat: track lockstat just like sdt probes.
lockstat: track lockstat just like sdt probes
Apr 24 2018, 1:04 AM

Apr 23 2018

mjg committed rS332896: malloc: stop reading the subzone if MALLOC_DEBUG_MAXZONES == 1 (the default).
malloc: stop reading the subzone if MALLOC_DEBUG_MAXZONES == 1 (the default)
Apr 23 2018, 10:29 PM
mjg committed rS332882: lockf: add per-chain locks to the owner hash.
lockf: add per-chain locks to the owner hash
Apr 23 2018, 8:23 AM
mjg committed rS332881: lockf: skip locking the graph if not necessary (common case).
lockf: skip locking the graph if not necessary (common case)
Apr 23 2018, 7:54 AM
mjg committed rS332880: lockf: perform wakeup onlly when there is anybody waiting.
lockf: perform wakeup onlly when there is anybody waiting
Apr 23 2018, 7:53 AM
mjg committed rS332879: lockf: skip the hard work in lf_purgelocks if possible.
lockf: skip the hard work in lf_purgelocks if possible
Apr 23 2018, 7:52 AM
mjg committed rS332878: lockf: free state only when recycling the vnode.
lockf: free state only when recycling the vnode
Apr 23 2018, 7:51 AM

Apr 22 2018

mjg committed rS332870: lockf: slightly depessimize.
lockf: slightly depessimize
Apr 22 2018, 9:30 AM

Apr 18 2018

mjg added a comment to D15122: Eliminate vm object relocks in vm fault..

I made the change flippable with a sysctl. It nicely speeds up the initital page faults when postgres warms up:

Apr 18 2018, 6:03 PM

Apr 17 2018

mjg accepted D15106: Add PROC_PDEATHSIG_SET to procctl interface..
Apr 17 2018, 2:43 PM

Apr 16 2018

mjg accepted D15106: Add PROC_PDEATHSIG_SET to procctl interface..

I only have cosmetic remarks. Definitely looks good enough to be shipped.

Apr 16 2018, 10:34 PM

Apr 13 2018

mjg added inline comments to D15047: Properly do a deep copy of the ioctls capability array for fget_cap()..
Apr 13 2018, 4:21 AM

Apr 12 2018

mjg committed rS332422: iflib: fix up a mismerge in r332419.
iflib: fix up a mismerge in r332419
Apr 12 2018, 4:11 AM
mjg requested changes to D15047: Properly do a deep copy of the ioctls capability array for fget_cap()..
Apr 12 2018, 1:55 AM

Apr 11 2018

mjg accepted D14898: Implement DDB show vpath.
Apr 11 2018, 6:18 PM
mjg committed rS332398: locks: extend speculative spin waiting for readers to drain.
locks: extend speculative spin waiting for readers to drain
Apr 11 2018, 1:43 AM

Apr 10 2018

mjg committed rS332394: rw: whack avoidable re-reads in try_upgrade.
rw: whack avoidable re-reads in try_upgrade
Apr 10 2018, 10:32 PM

Apr 8 2018

mjg committed rS332285: locks: tweak backoff a little bit.
locks: tweak backoff a little bit
Apr 8 2018, 4:34 PM

Apr 6 2018

mjg accepted D14955: powerpc/ofw: Fix malloc inside lock.
Apr 6 2018, 5:55 PM

Apr 5 2018

mjg requested changes to D14955: powerpc/ofw: Fix malloc inside lock.
Apr 5 2018, 10:33 PM

Apr 4 2018

mjg added inline comments to D14898: Implement DDB show vpath.
Apr 4 2018, 11:32 PM

Mar 29 2018

mjg requested changes to D14898: Implement DDB show vpath.

I would add a message that there were not enough entries to reconstruct the full path.

Mar 29 2018, 10:03 PM

Mar 28 2018

mjg committed rS331660: seq: provide a comment explaining what seq is for and note 2 caveats.
seq: provide a comment explaining what seq is for and note 2 caveats
Mar 28 2018, 4:39 AM
mjg committed rS331659: seq: disable preemption around seq_write_*.
seq: disable preemption around seq_write_*
Mar 28 2018, 3:15 AM
mjg committed rS331657: fd: tighten seq protected areas to not contain malloc/free.
fd: tighten seq protected areas to not contain malloc/free
Mar 28 2018, 3:07 AM

Mar 27 2018

mjg added inline comments to D14869: ZFS vn_rele_async: ctach up with the use of atomics for the vnode use count.
Mar 27 2018, 9:18 PM
mjg accepted D14869: ZFS vn_rele_async: ctach up with the use of atomics for the vnode use count.
Mar 27 2018, 4:40 PM

Mar 20 2018

mjg accepted D14771: Drop KTR_CONTENTION..

the less ktr the better

Mar 20 2018, 3:26 PM

Mar 19 2018

mjg committed rS331153: Update my calendar entry to be more specific now that UTF8 turns out to be fine.
Update my calendar entry to be more specific now that UTF8 turns out to be fine
Mar 19 2018, 12:25 AM

Mar 17 2018

mjg committed rS331109: locks: slightly depessimize lockstat.
locks: slightly depessimize lockstat
Mar 17 2018, 7:26 PM

Mar 5 2018

mjg committed rS330432: lockmgr: save on sleepq when cmpset fails.
lockmgr: save on sleepq when cmpset fails
Mar 5 2018, 12:30 AM

Mar 4 2018

mjg committed rS330419: lockmgr: whack unused lockmgr_note_exclusive_upgrade.
lockmgr: whack unused lockmgr_note_exclusive_upgrade
Mar 4 2018, 10:14 PM
mjg committed rS330418: mtx: tidy up recursion handling in thread lock.
mtx: tidy up recursion handling in thread lock
Mar 4 2018, 10:01 PM
mjg committed rS330415: sx: don't do an atomic op in upgrade if it cananot succeed.
sx: don't do an atomic op in upgrade if it cananot succeed
Mar 4 2018, 9:41 PM
mjg committed rS330414: locks: fix a corner case in r327399.
locks: fix a corner case in r327399
Mar 4 2018, 9:38 PM
mjg committed rS330400: lockmgr: start decomposing the main routine.
lockmgr: start decomposing the main routine
Mar 4 2018, 7:13 PM

Mar 2 2018

mjg committed rS330294: sx: fix adaptive spinning broken in r327397.
sx: fix adaptive spinning broken in r327397
Mar 2 2018, 9:26 PM

Feb 25 2018

mjg committed rS329985: Don't generate data in sysctl_out_proc unless we intend to copy out..
Don't generate data in sysctl_out_proc unless we intend to copy out.
Feb 25 2018, 3:17 PM

Feb 22 2018

mjg committed rS329837: Fix up sysctl vfs.buffercache broken in r329612.
Fix up sysctl vfs.buffercache broken in r329612
Feb 22 2018, 8:39 PM

Feb 20 2018

mjg committed rS329666: mtx: add debug assertions to mtx_spin_wait_unlocked.
mtx: add debug assertions to mtx_spin_wait_unlocked
Feb 20 2018, 8:39 PM
mjg committed rS329660: Fix reaping on process fd close broken after r329449.
Fix reaping on process fd close broken after r329449
Feb 20 2018, 8:20 PM
mjg committed rS329639: Make killpg1 perform process validity checks without proc lock held..
Make killpg1 perform process validity checks without proc lock held.
Feb 20 2018, 10:52 AM
mjg committed rS329615: Reduce contention on the proctree lock during heavy package build..
Reduce contention on the proctree lock during heavy package build.
Feb 20 2018, 2:18 AM

Feb 19 2018

mjg committed rS329542: Fix process exit vs reap race introduced in r329449.
Fix process exit vs reap race introduced in r329449
Feb 19 2018, 12:54 AM
mjg committed rS329540: mtx: add mtx_spin_wait_unlocked.
mtx: add mtx_spin_wait_unlocked
Feb 19 2018, 12:38 AM

Feb 18 2018

mjg committed rS329531: exit: get rid of PROC_SLOCK when checking a process to report, take #2.
exit: get rid of PROC_SLOCK when checking a process to report, take #2
Feb 18 2018, 9:07 PM

Feb 17 2018

mjg committed rS329461: Revert r329448..
Revert r329448.
Feb 17 2018, 5:24 PM
mjg committed rS329451: Undo LOCK_PROFILING pessimisation after r313454 and r313455.
Undo LOCK_PROFILING pessimisation after r313454 and r313455
Feb 17 2018, 12:07 PM
mjg committed rS329449: exit: stop doing PROC_SLOCK just to call proc_reap.
exit: stop doing PROC_SLOCK just to call proc_reap
Feb 17 2018, 9:03 AM
mjg committed rS329448: exit: get rid of PROC_SLOCK when checking a process to report.
exit: get rid of PROC_SLOCK when checking a process to report
Feb 17 2018, 8:49 AM
mjg committed rS329422: On process exit signal the parent after dropping the proctree lock..
On process exit signal the parent after dropping the proctree lock.
Feb 17 2018, 12:25 AM
mjg committed rS329421: Unref the prison after proctree is dropped..
Unref the prison after proctree is dropped.
Feb 17 2018, 12:24 AM
mjg committed rS329420: Postpone sx_sunlock(&proctree_lock) on fork until after allproc is dropped..
Postpone sx_sunlock(&proctree_lock) on fork until after allproc is dropped.
Feb 17 2018, 12:23 AM
mjg committed rS329419: Tidy up kern_wait6.
Tidy up kern_wait6
Feb 17 2018, 12:22 AM

Feb 16 2018

mjg committed rS329381: MFC r324610:.
MFC r324610:
Feb 16 2018, 4:16 PM