Page MenuHomeFreeBSD
Feed Advanced Search

Sep 24 2019

mjg added inline comments to D21740: lockprof: fix hangs under load when changing the state or dumping stats.
Sep 24 2019, 11:54 AM
mjg updated the summary of D21774: [wip] vfs: switch vnode count management away from refcounts to atomics.
Sep 24 2019, 3:29 AM
mjg created D21774: [wip] vfs: switch vnode count management away from refcounts to atomics.
Sep 24 2019, 3:28 AM
mjg updated the diff for D21740: lockprof: fix hangs under load when changing the state or dumping stats.
  • stop re-reading the pcpu pointer
  • make use of cpus_fence_seq_cst_issue in !SMP case
  • force re-read of the curthread pointer
Sep 24 2019, 2:47 AM

Sep 23 2019

mjg committed rS352631: cache: tidy up handling of negative entries.
cache: tidy up handling of negative entries
Sep 23 2019, 8:50 PM
mjg added inline comments to D21740: lockprof: fix hangs under load when changing the state or dumping stats.
Sep 23 2019, 8:31 PM
mjg added inline comments to D21694: Add 8 and 16 bit versions of atomic_cmpset and atomic_fcmpset for arm..
Sep 23 2019, 3:59 PM
mjg committed rS352617: cache: count evictions of negatve entries.
cache: count evictions of negatve entries
Sep 23 2019, 8:53 AM

Sep 22 2019

mjg committed rS352613: cache: try to avoid vhold if locks held.
cache: try to avoid vhold if locks held
Sep 22 2019, 8:50 PM
mjg committed rS352612: cache: jump in negative success instead of positive.
cache: jump in negative success instead of positive
Sep 22 2019, 8:49 PM
mjg committed rS352611: lockprof: move per-cpu data to dpcpu.
lockprof: move per-cpu data to dpcpu
Sep 22 2019, 8:44 PM
mjg closed D21747: lockprof: move per-cpu data to dpcpu.
Sep 22 2019, 8:44 PM
mjg added a comment to D21646: vfs: add root vnode caching for mount points.
In D21646#473051, @kib wrote:

Several filesystems cache its root vnode, which becomes redundant with the caching done in mnt. I believe it is worth to make simultaneous cleanup, in the separate patch.

Sep 22 2019, 7:23 PM
mjg updated the diff for D21646: vfs: add root vnode caching for mount points.
  • panic if the found vnode does not match ours and is not doomed
Sep 22 2019, 7:22 PM
mjg added a comment to D21740: lockprof: fix hangs under load when changing the state or dumping stats.

That would be avoidably wasteful for this code. Part of the motivation is to be able to get periodic snapshots of lockprof stats without disturbing the actual workload on top of the existing overhead.

Sep 22 2019, 1:44 PM

Sep 21 2019

mjg created D21747: lockprof: move per-cpu data to dpcpu.
Sep 21 2019, 11:24 PM
mjg updated the summary of D21740: lockprof: fix hangs under load when changing the state or dumping stats.
Sep 21 2019, 7:18 PM
mjg created D21740: lockprof: fix hangs under load when changing the state or dumping stats.
Sep 21 2019, 7:17 PM
mjg committed rS352583: lockprof: use CPUFOREACH and drop always false lp_cpu NULL checks.
lockprof: use CPUFOREACH and drop always false lp_cpu NULL checks
Sep 21 2019, 7:05 PM

Sep 19 2019

mjg committed rS352543: vfs: group fields used for per-cpu ops in one cacheline.
vfs: group fields used for per-cpu ops in one cacheline
Sep 19 2019, 9:23 PM
mjg accepted D21715: libntp: build with closefrom.
Sep 19 2019, 2:15 PM
mjg added inline comments to D21694: Add 8 and 16 bit versions of atomic_cmpset and atomic_fcmpset for arm..
Sep 19 2019, 7:44 AM

Sep 17 2019

mjg added a comment to D21681: mips: incredibly naive attempt at 8/16-bit atomics (set/clear/add/sub/cmpset/fcmpset).

I would wonder if it makes sense to implement these in terms of cmpset operations on register-sized quantities in C with the appropriate arithmetic shifts, rather than doing the assembly sort of half by-hand. That's maybe less optimal, but do we have performance-critical 8- and 16-bit atomics in performance-critical areas? I've always been skeptical of smaller-than-register atomics and tend to resist them, so that may just be a personal bias. I can't speak to correctness beyond that.

Sep 17 2019, 11:45 PM
mjg created D21692: vfs: do lockless vnode checks in vlrureclaim.
Sep 17 2019, 10:07 PM
mjg committed rS352450: vfs: apply r352437 to the fast path as well.
vfs: apply r352437 to the fast path as well
Sep 17 2019, 3:53 PM
mjg updated the diff for D21667: vfs: fix incorrect hold in vtryrecycle.
  • make vn_start_write_nb static
  • add a comment explaining error handling
  • assert LK_NOWAIT passed if LK_IGNORE_INTERLOCK is used
Sep 17 2019, 3:24 PM
mjg added inline comments to D21206: libc: add fdwalk.
Sep 17 2019, 12:40 PM
mjg added a comment to D21667: vfs: fix incorrect hold in vtryrecycle.

I think it's cleaner to handle this separately mostly because this function cannot do any clean up so it behaves quite differently compared to vn_start_write. If you insist I can fold it in.

Sep 17 2019, 9:20 AM
mjg updated the diff for D21667: vfs: fix incorrect hold in vtryrecycle.
  • plug a blatant mp ref leak
Sep 17 2019, 9:19 AM
mjg updated the diff for D21667: vfs: fix incorrect hold in vtryrecycle.
  • rebase
Sep 17 2019, 9:12 AM
mjg updated the diff for D21206: libc: add fdwalk.
  • add an async-signal-safe implementation
  • fix return value to always be 0
Sep 17 2019, 9:02 AM
mjg committed rS352437: vfs: fix braino resulting in NULL pointer deref in r352424.
vfs: fix braino resulting in NULL pointer deref in r352424
Sep 17 2019, 8:09 AM

Sep 16 2019

mjg added inline comments to D21646: vfs: add root vnode caching for mount points.
Sep 16 2019, 9:51 PM
mjg committed rS352427: vfs: convert struct mount counters to per-cpu.
vfs: convert struct mount counters to per-cpu
Sep 16 2019, 9:38 PM
mjg closed D21637: vfs: convert struct mount counters to per-cpu.
Sep 16 2019, 9:38 PM
mjg committed rS352426: vfs: manage mnt_writeopcount with atomics.
vfs: manage mnt_writeopcount with atomics
Sep 16 2019, 9:33 PM
mjg closed D21575: vfs: manage mnt_writeopcount with atomics.
Sep 16 2019, 9:33 PM
mjg committed rS352425: vfs: manage mnt_lockref with atomics.
vfs: manage mnt_lockref with atomics
Sep 16 2019, 9:32 PM
mjg closed D21574: vfs: manage mnt_lockref with atomics.
Sep 16 2019, 9:32 PM
mjg committed rS352424: vfs: manage mnt_ref with atomics.
vfs: manage mnt_ref with atomics
Sep 16 2019, 9:31 PM
mjg closed D21425: vfs: manage mnt_ref with atomics.
Sep 16 2019, 9:31 PM
mjg added a comment to D21678: Use AMD CLZERO instruction for pagezero..

So I just checked and packet.net has 24-way EPYC boxes. I can get one no problem (paid by FF). Then I can get some data points - at least buildkernel on tmpfs and will-it-scale.

Sep 16 2019, 7:03 PM
mjg updated the diff for D21646: vfs: add root vnode caching for mount points.
  • rebase
  • drop unnecesary wait in vfs_cache_root_clear
  • add a comment about fence pairing in vfs_cache_root_fallback
Sep 16 2019, 6:39 PM
mjg added inline comments to D21637: vfs: convert struct mount counters to per-cpu.
Sep 16 2019, 6:29 PM
mjg added a comment to D21678: Use AMD CLZERO instruction for pagezero..

Most of the slowness was stemming from lack of support for NUMA meaning for the "wrong" pages the stores were sent across the interconnect. I redid the tests some time ago on the same hardware and there is next to no difference real time (but just more cache misses).

Sep 16 2019, 6:23 PM
mjg commandeered D21206: libc: add fdwalk.

Take over this revision after a talk with @jhibbits.

Sep 16 2019, 2:26 PM
mjg updated the diff for D21637: vfs: convert struct mount counters to per-cpu.
  • assorted fixes
  • add vfs_mp_count_add/sub_pcpu in place of hand-rolled manipulation. I don't care for this name, but I think the approach is fine
Sep 16 2019, 10:23 AM
mjg updated the summary of D21637: vfs: convert struct mount counters to per-cpu.
Sep 16 2019, 9:13 AM
mjg added inline comments to D21637: vfs: convert struct mount counters to per-cpu.
Sep 16 2019, 9:09 AM
mjg added inline comments to D21637: vfs: convert struct mount counters to per-cpu.
Sep 16 2019, 9:05 AM
mjg added inline comments to D21637: vfs: convert struct mount counters to per-cpu.
Sep 16 2019, 9:04 AM
mjg added a comment to D21206: libc: add fdwalk.
  1. If fdwalk lands in the tree, it will be an async-signal safe implementation.
  2. It will always work for the current process (i.e. when it requests the data for itself), in fact my suggested kernel interface only allows this mode.
Sep 16 2019, 7:27 AM

Sep 15 2019

mjg added a comment to D21658: pmcstat: implement showing offsets into symbols in top mode.

I already noted pmcstat needs serious help. I think adding this with (the optional key swap) is solves the immediate problem of not having the feature while not having to spend a significant amount of time writing a new tool from scratch.

Sep 15 2019, 8:26 PM
mjg updated the diff for D21658: pmcstat: implement showing offsets into symbols in top mode.
  • fix manpage
  • drop redundant sym assignment from the original
Sep 15 2019, 8:25 PM
mjg updated the diff for D21667: vfs: fix incorrect hold in vtryrecycle.
  • vdropl before vn_finished_write
Sep 15 2019, 8:11 PM
mjg updated the summary of D21667: vfs: fix incorrect hold in vtryrecycle.
Sep 15 2019, 8:05 PM
mjg updated the summary of D21667: vfs: fix incorrect hold in vtryrecycle.
Sep 15 2019, 8:04 PM
mjg updated the summary of D21667: vfs: fix incorrect hold in vtryrecycle.
Sep 15 2019, 8:03 PM
mjg created D21667: vfs: fix incorrect hold in vtryrecycle.
Sep 15 2019, 8:02 PM
mjg updated the diff for D21575: vfs: manage mnt_writeopcount with atomics.
  • fix parens placement
Sep 15 2019, 7:55 PM
mjg added a comment to D21658: pmcstat: implement showing offsets into symbols in top mode.

I think pmcstat needs serious help and the compatibility change (which I highly doubt hurts anyone) is a step towards that goal. I want a usable tool without the need to rewrite current one, if it can be helped. Should someone want to write something new from scratch I'm happy to see it, but I don't want to the work myself.

Sep 15 2019, 6:11 PM
mjg added a comment to D21658: pmcstat: implement showing offsets into symbols in top mode.

The option was added at my request and highly doubt anyone else is using it (including the big user). I highly doubt any user will get upset over this change, but worst case I can drop the swap.

Sep 15 2019, 5:32 PM
mjg added a comment to D21658: pmcstat: implement showing offsets into symbols in top mode.

I think it fits better. 'A' for address, 'I' for instruction. If there is a time to change it, it is now. I would not do it if pmcstat was actually in widespread use and people had the opt ingrained in their fingers.

Sep 15 2019, 5:02 PM

Sep 14 2019

mjg updated the diff for D21575: vfs: manage mnt_writeopcount with atomics.
  • remove the slowpath label
Sep 14 2019, 10:28 PM
mjg updated the summary of D21637: vfs: convert struct mount counters to per-cpu.
Sep 14 2019, 9:57 PM
mjg updated the diff for D21637: vfs: convert struct mount counters to per-cpu.
Sep 14 2019, 9:14 PM
mjg updated the diff for D21575: vfs: manage mnt_writeopcount with atomics.
  • rebase on top of the custom barrier
Sep 14 2019, 9:09 PM
mjg updated the diff for D21574: vfs: manage mnt_lockref with atomics.
  • rebase on top of the custom barrier
  • release the mountlist lock after leaving the section
Sep 14 2019, 9:07 PM
mjg added inline comments to D21574: vfs: manage mnt_lockref with atomics.
Sep 14 2019, 9:05 PM
mjg added a comment to D21574: vfs: manage mnt_lockref with atomics.

No, I wanted to have the approach sorted out before I post rebased patch.

Sep 14 2019, 9:04 PM
mjg updated the diff for D21425: vfs: manage mnt_ref with atomics.
  • remove spurious 'to' from vfs_op_thread_enter comment and change the ending a little
Sep 14 2019, 8:39 PM
mjg updated the diff for D21425: vfs: manage mnt_ref with atomics.
  • change comment in vfs_op_enter
  • rename _FASTPATH to _UNLOCKED
Sep 14 2019, 8:36 PM
mjg added inline comments to D21425: vfs: manage mnt_ref with atomics.
Sep 14 2019, 8:06 PM
mjg updated the diff for D21425: vfs: manage mnt_ref with atomics.
Sep 14 2019, 8:06 PM
mjg updated the summary of D21658: pmcstat: implement showing offsets into symbols in top mode.
Sep 14 2019, 11:59 AM
mjg updated the summary of D21658: pmcstat: implement showing offsets into symbols in top mode.
Sep 14 2019, 11:59 AM
mjg updated the summary of D21658: pmcstat: implement showing offsets into symbols in top mode.
Sep 14 2019, 11:58 AM
mjg created D21658: pmcstat: implement showing offsets into symbols in top mode.
Sep 14 2019, 11:57 AM

Sep 13 2019

mjg added inline comments to D17011: hwpmc: Refactor sample ring buffer handling.
Sep 13 2019, 7:35 PM
mjg updated the summary of D21646: vfs: add root vnode caching for mount points.
Sep 13 2019, 7:33 PM
mjg created D21646: vfs: add root vnode caching for mount points.
Sep 13 2019, 7:32 PM
mjg added a comment to D21360: pmc: revert r339188.

ping?

Sep 13 2019, 5:38 PM
mjg created D21637: vfs: convert struct mount counters to per-cpu.
Sep 13 2019, 4:28 PM
mjg added a comment to D21617: Improve support for refcount waiting.

I don't care for the name for the most part, but perhaps something not sounding so refcounty will make it easier to not accidentally use the wrong API. Alternatively, perhaps it's time we de-u_int all consumers and have something of this sort:

Sep 13 2019, 4:02 PM
mjg added inline comments to D21626: vfs: scale foffset_lock.
Sep 13 2019, 3:56 PM
mjg updated the diff for D21626: vfs: scale foffset_lock.
  • address feedback
Sep 13 2019, 3:55 PM
mjg committed rS352300: vfs: release usecount using fetchadd.
vfs: release usecount using fetchadd
Sep 13 2019, 3:49 PM
mjg closed D21528: vfs: release usecount using fetchadd.
Sep 13 2019, 3:49 PM
mjg added a comment to D21617: Improve support for refcount waiting.

So I had a closer look and think that the introduction of support for waiting was an abuse of this API and should either be moved to another one or get dedicated routines in this one. Most consumers (including very frequently used ones like struct file) don't care for it and avoidably pay the price for its existence.

Sep 13 2019, 3:37 PM
mjg updated the test plan for D21425: vfs: manage mnt_ref with atomics.
Sep 13 2019, 12:39 AM

Sep 12 2019

mjg created D21626: vfs: scale foffset_lock.
Sep 12 2019, 10:25 PM
mjg added inline comments to D21617: Improve support for refcount waiting.
Sep 12 2019, 6:43 PM
mjg requested changes to D21617: Improve support for refcount waiting.
Sep 12 2019, 6:42 PM

Sep 11 2019

mjg updated the summary of D21425: vfs: manage mnt_ref with atomics.
Sep 11 2019, 8:55 PM
mjg updated the summary of D21425: vfs: manage mnt_ref with atomics.
Sep 11 2019, 8:53 PM
mjg updated the diff for D21425: vfs: manage mnt_ref with atomics.
  • see the rewritten summary
Sep 11 2019, 8:52 PM

Sep 10 2019

mjg committed rS352183: cache: avoid excessive relocking on entry removal during lookup.
cache: avoid excessive relocking on entry removal during lookup
Sep 10 2019, 8:19 PM
mjg committed rS352178: cache: change the formula for calculating lock array sizes.
cache: change the formula for calculating lock array sizes
Sep 10 2019, 8:11 PM
mjg committed rS352177: cache: assorted cleanups.
cache: assorted cleanups
Sep 10 2019, 8:08 PM
mjg updated the diff for D21528: vfs: release usecount using fetchadd.
  • rework on top of stock head to remove the dependency on devfs patch
  • .. the type var should probably move and will be in a separate review
Sep 10 2019, 7:37 PM