Page MenuHomeFreeBSD

mjg (Mateusz Guzik)
nice guy

Projects

User Details

User Since
Jun 4 2014, 10:38 AM (235 w, 5 d)

Recent Activity

Sat, Dec 8

mjg committed rS341727: umtx: avoid umtxshm locking on object termination if possible.
umtx: avoid umtxshm locking on object termination if possible
Sat, Dec 8, 2:05 PM
mjg committed rS341724: Remove proctree acquire from note_procstat_proc.
Remove proctree acquire from note_procstat_proc
Sat, Dec 8, 11:39 AM
mjg committed rS341723: Fix a corner case in ID bitmap management..
Fix a corner case in ID bitmap management.
Sat, Dec 8, 10:22 AM
mjg committed rS341722: proc: postpone proc unlock until after reporting with kqueue.
proc: postpone proc unlock until after reporting with kqueue
Sat, Dec 8, 6:34 AM
mjg committed rS341721: proc: handle sdt exit probe before taking the proc lock.
proc: handle sdt exit probe before taking the proc lock
Sat, Dec 8, 6:32 AM
mjg committed rS341720: Provide SDT_PROBES_ENABLED macro..
Provide SDT_PROBES_ENABLED macro.
Sat, Dec 8, 6:31 AM
mjg committed rS341719: amd64: stop re-reading curpc on subyte/suword.
amd64: stop re-reading curpc on subyte/suword
Sat, Dec 8, 4:53 AM

Fri, Dec 7

mjg committed rS341702: fd: use racct_set_unlocked.
fd: use racct_set_unlocked
Fri, Dec 7, 4:51 PM
mjg committed rS341701: racct: add RACCT_ENABLED macro and racct_set_unlocked.
racct: add RACCT_ENABLED macro and racct_set_unlocked
Fri, Dec 7, 4:48 PM
mjg committed rS341700: fd: try do less work with the lock in dup.
fd: try do less work with the lock in dup
Fri, Dec 7, 4:45 PM
mjg committed rS341699: vm: use fcmpset for vmspace reference counting.
vm: use fcmpset for vmspace reference counting
Fri, Dec 7, 4:25 PM
mjg committed rS341698: Replace hand-rolled unrefs if > 1 with refcount_release_if_not_last.
Replace hand-rolled unrefs if > 1 with refcount_release_if_not_last
Fri, Dec 7, 4:11 PM
mjg committed rS341697: refcount: remove a stale comment about conditional ref/unref routines.
refcount: remove a stale comment about conditional ref/unref routines
Fri, Dec 7, 4:11 PM
mjg committed rS341685: proc: when exiting move to zombproc before taking proctree.
proc: when exiting move to zombproc before taking proctree
Fri, Dec 7, 12:33 PM
mjg committed rS341684: Manage process-related IDs with bitmaps.
Manage process-related IDs with bitmaps
Fri, Dec 7, 12:22 PM
mjg committed rS341683: Annotate Giant drop/pickup macros with __predict_false.
Annotate Giant drop/pickup macros with __predict_false
Fri, Dec 7, 12:08 PM
mjg committed rS341682: unr64: use locked variant if not __LP64__.
unr64: use locked variant if not __LP64__
Fri, Dec 7, 12:08 PM

Wed, Dec 5

mjg committed rS341593: sx: retire SX_NOADAPTIVE.
sx: retire SX_NOADAPTIVE
Wed, Dec 5, 4:44 PM
mjg created D18435: Manage process-related IDs with bitmaps.
Wed, Dec 5, 3:31 PM
mjg added a comment to D18373: pfsync: Performance improvement.

can you grab a flamegraph from such a test? also, can you compare this against https://reviews.freebsd.org/D17992 ?

Wed, Dec 5, 10:49 AM

Sat, Dec 1

mjg added a comment to D18401: amd64: align memmove buffers to 16 bytes before using rep movs.

I did basic tests with changing the alignment of src and slowdowns were very small compared to similarly misaligned dst, at least on EPYC. I may take a closer look later.

Sat, Dec 1, 2:22 PM
mjg committed rS341364: amd64: align target memmove buffer to 16 bytes before using rep movs.
amd64: align target memmove buffer to 16 bytes before using rep movs
Sat, Dec 1, 2:20 PM
mjg closed D18401: amd64: align memmove buffers to 16 bytes before using rep movs.
Sat, Dec 1, 2:20 PM
mjg created D18401: amd64: align memmove buffers to 16 bytes before using rep movs.
Sat, Dec 1, 1:10 PM

Fri, Nov 30

mjg committed rS341351: amd64: handle small memmove buffers with overlapping stores.
amd64: handle small memmove buffers with overlapping stores
Fri, Nov 30, 8:59 PM
mjg closed D18387: amd64: handle small memmove buffers with overlapping stores.
Fri, Nov 30, 8:59 PM
mjg created D18387: amd64: handle small memmove buffers with overlapping stores.
Fri, Nov 30, 9:03 AM
mjg committed rS341273: amd64: remove stale attribution for memmove work.
amd64: remove stale attribution for memmove work
Fri, Nov 30, 12:48 AM
mjg committed rS341272: amd64: tidy up copying backwards in memmove.
amd64: tidy up copying backwards in memmove
Fri, Nov 30, 12:48 AM

Thu, Nov 29

mjg committed rS341223: vfs: fix i386 build after r341220.
vfs: fix i386 build after r341220
Thu, Nov 29, 9:54 AM
mjg committed rS341222: cache: retire cache_enter compat schim.
cache: retire cache_enter compat schim
Thu, Nov 29, 9:33 AM
mjg committed rS341221: audit: predict AUDITING_TD as false.
audit: predict AUDITING_TD as false
Thu, Nov 29, 9:22 AM
mjg committed rS341220: vfs: drop spurious memcpy in stat.
vfs: drop spurious memcpy in stat
Thu, Nov 29, 9:04 AM
mjg committed rS341219: fd: unify fd range check across the routines.
fd: unify fd range check across the routines
Thu, Nov 29, 8:54 AM
mjg committed rS341218: audit: change audit_syscalls_enabled type to bool.
audit: change audit_syscalls_enabled type to bool
Thu, Nov 29, 8:40 AM
mjg committed rS341182: Convert racct_enable to bool and annotate as __read_frequently.
Convert racct_enable to bool and annotate as __read_frequently
Thu, Nov 29, 5:18 AM
mjg committed rS341181: Deinline racct throttling out of syscall exit path..
Deinline racct throttling out of syscall exit path.
Thu, Nov 29, 5:10 AM
mjg committed rS341180: Annotate td_cowgen check as unlikely..
Annotate td_cowgen check as unlikely.
Thu, Nov 29, 4:48 AM
mjg committed rS341178: Tidy up hardclock..
Tidy up hardclock.
Thu, Nov 29, 3:46 AM
mjg committed rS341176: proc: create a dedicated lock for zombproc to ligthen the load on allproc_lock.
proc: create a dedicated lock for zombproc to ligthen the load on allproc_lock
Thu, Nov 29, 2:52 AM
mjg abandoned D17774: Create a dedicated lock for zombproc to ligthen the load on allproc_lock.

https://svnweb.freebsd.org/changeset/base/341176

Thu, Nov 29, 2:52 AM

Wed, Nov 28

mjg added a comment to D18373: pfsync: Performance improvement.

once more i don't have a full picture so can't give a proper review.

Wed, Nov 28, 11:01 PM

Fri, Nov 23

mjg committed rS340793: Revert "fork: fix use-after-free with vfork".
Revert "fork: fix use-after-free with vfork"
Fri, Nov 23, 4:39 AM

Thu, Nov 22

mjg committed rS340786: Annotate TDP_RFPPWAIT as unlikely..
Annotate TDP_RFPPWAIT as unlikely.
Thu, Nov 22, 9:38 PM
mjg committed rS340785: fork: remove avoidable proc lock/unlock pair.
fork: remove avoidable proc lock/unlock pair
Thu, Nov 22, 9:29 PM
mjg committed rS340784: fork: fix use-after-free with vfork.
fork: fix use-after-free with vfork
Thu, Nov 22, 9:08 PM
mjg closed D18295: fork: fix use-after-free with vfork.
Thu, Nov 22, 9:08 PM
mjg updated the diff for D18295: fork: fix use-after-free with vfork.
Thu, Nov 22, 8:42 PM
mjg updated the diff for D18295: fork: fix use-after-free with vfork.
  • remove now spurious cv_broadcast(&p->p_pwait);
Thu, Nov 22, 8:12 PM
mjg added inline comments to D18295: fork: fix use-after-free with vfork.
Thu, Nov 22, 6:24 PM
mjg added a comment to D17992: pfsync: Reduce contention on PFSYNC_LOCK().

Adding more rings won't really help any more than making this one ring larger. That merely increases the queue length between the multiple pf threads, and the pfsync processing code (which is still single-threaded) in pfsync_msg_intr() and pfsyncintr().

Thu, Nov 22, 5:00 AM
mjg updated the summary of D18295: fork: fix use-after-free with vfork.
Thu, Nov 22, 1:03 AM
mjg created D18295: fork: fix use-after-free with vfork.
Thu, Nov 22, 1:02 AM

Wed, Nov 21

mjg updated the diff for D17774: Create a dedicated lock for zombproc to ligthen the load on allproc_lock.
  • rebase
  • fix fork
Wed, Nov 21, 11:54 PM
mjg committed rS340750: strings: unbreak the build after r340746.
strings: unbreak the build after r340746
Wed, Nov 21, 10:37 PM
mjg committed rS340749: uipc_usrreq: fix inode number assignment.
uipc_usrreq: fix inode number assignment
Wed, Nov 21, 10:25 PM
mjg committed rS340748: proc: update list manipulation comment on process exit.
proc: update list manipulation comment on process exit
Wed, Nov 21, 10:16 PM
mjg committed rS340747: uipc_shm: use unr64 for inode numbers.
uipc_shm: use unr64 for inode numbers
Wed, Nov 21, 10:01 PM
mjg committed rS340744: proc: convert pfind & friends to use pidhash locks and other cleanup.
proc: convert pfind & friends to use pidhash locks and other cleanup
Wed, Nov 21, 8:16 PM
mjg committed rS340742: proc: implement pid hash locks and an iterator.
proc: implement pid hash locks and an iterator
Wed, Nov 21, 6:56 PM
mjg closed D17817: proc: implement pid hash locks and an iterator.
Wed, Nov 21, 6:56 PM
mjg committed rS340719: MFC r340108 and r340149.
MFC r340108 and r340149
Wed, Nov 21, 3:22 AM

Tue, Nov 20

mjg added a comment to D17992: pfsync: Reduce contention on PFSYNC_LOCK().

So both ring and swi kicking code are significant players. I think a simple and probably good enough solution would just add more rings, perhaps based on the number of hardware threads. Assuming the traffic is hashed to distribute among them, the rings could mostly remain unshared with unrelated threads. Sending out of the traffic would just combine data from all rings. Kicking can also be avoided in a simple manner. You can add a var signifying the frequency of wakeups. The increase the frequency based on the traffic and past certain threshold you stop kicking swi. It has to decay so that if there is no traffic, the code goes back to wakeups once a second (or whatever).

Tue, Nov 20, 10:39 PM
mjg committed rS340688: MFC r339531,r339579,r340252,r340463,r340464,340472,r340587.
MFC r339531,r339579,r340252,r340463,r340464,340472,r340587
Tue, Nov 20, 6:14 PM
mjg committed rS340684: MFC r339531,r339579,r340252,r340463,r340464,340472,r340587.
MFC r339531,r339579,r340252,r340463,r340464,340472,r340587
Tue, Nov 20, 5:11 PM
mjg committed rS340682: MFC r339449:.
MFC r339449:
Tue, Nov 20, 5:02 PM
mjg committed rS340679: tmpfs: use unr64 for inode numbers.
tmpfs: use unr64 for inode numbers
Tue, Nov 20, 3:14 PM
mjg committed rS340677: pipe: use unr64.
pipe: use unr64
Tue, Nov 20, 2:59 PM
mjg committed rS340676: Implement unr64.
Implement unr64
Tue, Nov 20, 2:58 PM
mjg closed D18054: Implement unr64.
Tue, Nov 20, 2:58 PM
mjg updated the summary of D18054: Implement unr64.
Tue, Nov 20, 3:26 AM
mjg updated the summary of D18054: Implement unr64.
Tue, Nov 20, 3:24 AM
mjg created D18054: Implement unr64.
Tue, Nov 20, 3:24 AM

Sun, Nov 18

mjg accepted D18031: Fix -DNO_CLEAN amd64 build after r340463.

So I retested with your change. a failing build indeed is fixed. Perhaps my original change had a typo or compatible. Thanks.

Sun, Nov 18, 2:21 PM
mjg added a comment to D18031: Fix -DNO_CLEAN amd64 build after r340463.

Are you sure that on your box a *failing* -DNO_CLEAN starts building again with this change? Are you using meta-mode? I had a similar change locally and the build kept failing anyway, no meta-mode though.

Sun, Nov 18, 12:20 PM

Fri, Nov 16

mjg updated the diff for D17817: proc: implement pid hash locks and an iterator.
  • address feedback
  • drop killpg changes
Fri, Nov 16, 8:15 PM
mjg committed rS340482: proc: always store parent pid in p_oppid.
proc: always store parent pid in p_oppid
Fri, Nov 16, 5:08 PM
mjg closed D17825: proc: always store parent pid in p_oppid.
Fri, Nov 16, 5:08 PM
mjg committed rS340472: amd64: handle small memset buffers with overlapping stores.
amd64: handle small memset buffers with overlapping stores
Fri, Nov 16, 12:44 AM
mjg closed D17660: amd64: handle small memset buffers with overlapping stores.
Fri, Nov 16, 12:44 AM

Thu, Nov 15

mjg added a comment to D969: Implement lockless vfs_busy/unbusy..

yes. these patches are stale and kind of crap. I have a WIP replacement which I'llprobalby post in a new review, we will see.

Thu, Nov 15, 9:18 PM
mjg committed rS340464: amd64: sync up libc memset with the kernel version.
amd64: sync up libc memset with the kernel version
Thu, Nov 15, 8:28 PM
mjg committed rS340463: amd64: convert libc bzero to a C func to avoid future bloat.
amd64: convert libc bzero to a C func to avoid future bloat
Thu, Nov 15, 8:20 PM
mjg closed D17549: amd64: convert libc bzero to a C func to avoid future bloat .
Thu, Nov 15, 8:20 PM
mjg added a comment to D17992: pfsync: Reduce contention on PFSYNC_LOCK().

I have no doubt there is an improvement, just saying it is still slower than it can be and unless this uncovered a new major bottleneck, the ring manipulation is the new hotspot.

Thu, Nov 15, 5:37 PM

Wed, Nov 14

mjg added a comment to D17992: pfsync: Reduce contention on PFSYNC_LOCK().

I think the approach taken here is iffy. Basic problem with this is that even if there is no lock contention anymore, you are still suffering from bouncing cache lines. Also swi_sched probably does not appreciate being called very often.

Wed, Nov 14, 10:23 PM

Tue, Nov 13

mjg committed rS340410: locks: plug warnings about unitialized variables.
locks: plug warnings about unitialized variables
Tue, Nov 13, 9:30 PM
mjg added inline comments to D17825: proc: always store parent pid in p_oppid.
Tue, Nov 13, 7:23 PM

Nov 8 2018

mjg committed rS340252: amd64: align memset buffers to 16 bytes before using rep stos.
amd64: align memset buffers to 16 bytes before using rep stos
Nov 8 2018, 3:12 PM
mjg closed D17661: amd64: align memset buffers to 16 bytes before using rep stos.
Nov 8 2018, 3:12 PM

Nov 6 2018

mjg accepted D17631: libc: Use musl's optimized memchr.
Nov 6 2018, 1:18 PM
mjg accepted D17630: libc: Use musl's optimized strchr, strchrnul, strcspn.
Nov 6 2018, 1:18 PM
mjg updated the diff for D17825: proc: always store parent pid in p_oppid.
  • address feedback
  • regen against head
  • i did not change the condition in proc_realparent as it goes way over the 80 char limit
Nov 6 2018, 12:58 PM

Nov 4 2018

mjg added a comment to D17817: proc: implement pid hash locks and an iterator.

I don't think the same problem is a concern for ps/top, so it can be discussed further in a different review. I can simply drop killpg conversion from the patchset (and remove the spurious curly braces).

Nov 4 2018, 8:19 PM
mjg added a comment to D17817: proc: implement pid hash locks and an iterator.

killpg is already unreliable. if the child is spotted as PRS_NEW it will be explicitly omitted, so I don't think this constitutes a regression in functionality

Nov 4 2018, 5:14 PM

Nov 3 2018

mjg created D17825: proc: always store parent pid in p_oppid.
Nov 3 2018, 5:00 PM

Nov 2 2018

mjg updated the summary of D17817: proc: implement pid hash locks and an iterator.
Nov 2 2018, 2:13 PM
mjg updated the summary of D17817: proc: implement pid hash locks and an iterator.
Nov 2 2018, 2:09 PM
mjg updated the summary of D17817: proc: implement pid hash locks and an iterator.
Nov 2 2018, 2:05 PM
mjg created D17817: proc: implement pid hash locks and an iterator.
Nov 2 2018, 2:03 PM