Page MenuHomeFreeBSD

mjg (Mateusz Guzik)
nice guy

Projects

User Details

User Since
Jun 4 2014, 10:38 AM (548 w, 2 h)

Recent Activity

Sep 14 2024

mjg added a comment to D46619: RLIMIT_PIPE.

keeping some % of reserve for root would be good,, equivalent to _falloc_noinstall

Sep 14 2024, 2:42 PM
mjg added a comment to D46649: pf: merge pf_test() and pf_test6().

this can __assert_unreachable which will in production kernels will tell the compiler the 2 options are the only valid ones

Sep 14 2024, 4:54 AM

Sep 10 2024

mjg added a comment to D46619: RLIMIT_PIPE.

This would not expose any detail apart from the fact that pipes have to allocate space to hold data, which is an integral part of the mechanism.

Sep 10 2024, 10:42 PM
mjg added a comment to D46619: RLIMIT_PIPE.

should not this instead limit how much memory is used to back pipe buffers?

Sep 10 2024, 11:58 AM

Jul 17 2024

mjg committed rGa4469a0d19b6: pipe: convert pipelock flag argument to bool (authored by mjg).
pipe: convert pipelock flag argument to bool
Jul 17 2024, 9:46 PM

Jul 14 2024

mjg added a comment to D45863: vm: Introduce reservation-aware NOFREE page allocation routine.

Sorry, I forgot to link the benchmark results from a previous iteration of this patch.
The metrics I've gathered show that this approach does reduce NOFREE fragmentation.

Jul 14 2024, 1:55 PM

Jul 13 2024

mjg added a comment to D45954: Set hw.usb.no_boot_wait=1 by default.

one could add a flag to mountroot indicating the system knows some stuff may be missing and to fail the mount if that's the case, should be very easy to handle. then a wait round and another mount call but without the flag

Jul 13 2024, 9:23 AM
mjg added a comment to D45954: Set hw.usb.no_boot_wait=1 by default.

can this only wait for usb if no root device is found? then whack the tunable

Jul 13 2024, 6:34 AM

Jul 11 2024

mjg committed rG87ee63bac69d: locks: add a runtime check for missing turnstile (authored by mjg).
locks: add a runtime check for missing turnstile
Jul 11 2024, 11:08 AM

Jul 10 2024

mjg committed rG8b5eb0cf6c4f: vfs cache: add sysctl vfs.cache.param.hitpct (authored by mjg).
vfs cache: add sysctl vfs.cache.param.hitpct
Jul 10 2024, 10:07 PM
mjg committed rG1f0f120183db: vfs: make skipping LRU requeue optional (authored by mjg).
vfs: make skipping LRU requeue optional
Jul 10 2024, 10:07 PM
mjg committed rG72f8b18b8d93: vfs cache: add sysctl vfs.cache.param.hitpct (authored by mjg).
vfs cache: add sysctl vfs.cache.param.hitpct
Jul 10 2024, 10:06 PM
mjg committed rGb7f6841e00d5: vfs: make skipping LRU requeue optional (authored by mjg).
vfs: make skipping LRU requeue optional
Jul 10 2024, 10:06 PM
mjg added a comment to D45913: netinet6: fix parent lle locking.

I'm taking this over from Kristof as a "favor".

Jul 10 2024, 8:37 PM

Jul 9 2024

mjg added a comment to D45913: netinet6: fix parent lle locking.

refs need to be converted to atomics, then you can grab one without taking the lock

Jul 9 2024, 10:19 AM

Jul 8 2024

mjg committed rG0a487207227b: vfs cache: add sysctl vfs.cache.param.hitpct (authored by mjg).
vfs cache: add sysctl vfs.cache.param.hitpct
Jul 8 2024, 6:19 PM
mjg added a comment to D45913: netinet6: fix parent lle locking.

how does this look like in terms of valid lock ordering?

Jul 8 2024, 2:54 PM
mjg committed rG0a9aa6fdf584: vfs: make skipping LRU requeue optional (authored by mjg).
vfs: make skipping LRU requeue optional
Jul 8 2024, 12:41 PM

Jul 3 2024

mjg added a comment to D45863: vm: Introduce reservation-aware NOFREE page allocation routine.

did fragmentation drop though?

Jul 3 2024, 8:58 PM

Jun 20 2024

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

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:58 PM
mjg committed rGb6196537b012: pf: fix the "keepcounters" to stop truncating to 32-bit (authored by mjg).
pf: fix the "keepcounters" to stop truncating to 32-bit
Jun 20 2024, 5:56 PM

May 16 2024

mjg added a comment to D45214: kernel: Add defination of .init_array and .fini_array for all other platforms.

This needs to retain proper authorship, so the Author field still needs to be hps. Add the end of the commit message you should mention this was extracted by you from a bigger patch of his. So add that, drop "in memoriam".

May 16 2024, 8:35 AM

May 12 2024

mjg added a comment to D45163: vm: Allow kstack pages to come from different domains.

why even support something like this?

May 12 2024, 7:10 AM

Mar 18 2024

mjg committed rGb0aaf8beb126: Rename VM_LAST to more appropriate VM_GUEST_LAST (authored by mjg).
Rename VM_LAST to more appropriate VM_GUEST_LAST
Mar 18 2024, 10:49 AM

Mar 12 2024

mjg abandoned D40884: vfs: add KPI versioning.
Mar 12 2024, 10:35 PM
mjg abandoned D40045: ule: queue partial slice users on tdq_realtime and enable more preemption.

Further testing by other people confirmed my worry this is too trivial to fix the problem without running into other side effects, thus I'm dropping the thing.

Mar 12 2024, 10:35 PM
mjg abandoned D39000: vm: require page to be xbusied to invalidate the content.
Mar 12 2024, 10:34 PM
mjg abandoned D38829: [RFC] add cpuset_getmyaffinity_count.
Mar 12 2024, 10:33 PM
mjg abandoned D37306: Stop sync restarts on vget failure due to doomed vnode.
Mar 12 2024, 10:33 PM
mjg abandoned D36775: ipsec: retire sadb_msg_reserved in order to facilitate per-cpu refcounting.
Mar 12 2024, 10:33 PM
mjg abandoned D36510: ipsec: plug use-after-free of SAH.
Mar 12 2024, 10:33 PM
mjg abandoned D36352: fix callout lock contention during thread creation/destruction.
Mar 12 2024, 10:33 PM
mjg abandoned D36318: Add new EVENTHANDLER types: PREEMPTIBLE and SLEEPABLE.
Mar 12 2024, 10:33 PM
mjg abandoned D36083: umtx: convert hand-rolled busy lock to sx lock.
Mar 12 2024, 10:33 PM
mjg abandoned D30552: tmpfs: avoid the vm object lock in tmpfs_pager_getvp in the common case.
Mar 12 2024, 10:33 PM
mjg abandoned D26119: vfs: add cheaper vn_isdisk by indicating the state with the VIRF_ISDISK flag.
Mar 12 2024, 10:33 PM
mjg abandoned D27217: Add options COMPACT to produce smaller kernel.
Mar 12 2024, 10:33 PM
mjg abandoned D27600: __predict_true/false profiling.
Mar 12 2024, 10:33 PM
mjg abandoned D26011: off cpu tracking.
Mar 12 2024, 10:32 PM
mjg abandoned D25983: vfs: add VOP_GETATTR_LITE.
Mar 12 2024, 10:32 PM
mjg abandoned D23779: Indicate issetugid in AT_BSDFLAGS.
Mar 12 2024, 10:32 PM
mjg abandoned D23774: Add KPASS macros.
Mar 12 2024, 10:32 PM
mjg abandoned D23481: vfs: use refcnt int API.
Mar 12 2024, 10:32 PM
mjg abandoned D23661: Implement a translation from FreeBSD atomic API to gcc intrinsics.
Mar 12 2024, 10:32 PM
mjg abandoned D23480: Add new refcount API.
Mar 12 2024, 10:32 PM
mjg abandoned D23469: fd: convert f_count to long.
Mar 12 2024, 10:32 PM
mjg abandoned D23684: 2/2 lockmgr: provide routines usable as direct vfs calls.
Mar 12 2024, 10:32 PM
mjg abandoned D15736: Implement fast path for malloc and free.
Mar 12 2024, 10:31 PM
mjg abandoned D12889: Remove entropy harvesting from tmpfs atime.
Mar 12 2024, 10:31 PM
mjg abandoned D23291: vfs: add mandatory inactive processing to vget.
Mar 12 2024, 10:31 PM
mjg abandoned D36640: remove support for LK_INTERLOCK from VOP_LOCK.
Mar 12 2024, 10:29 PM
mjg abandoned D21206: libc: add fdwalk.
Mar 12 2024, 10:29 PM
mjg abandoned D34457: Add hw.machine_real_arch.
Mar 12 2024, 10:28 PM

Mar 11 2024

mjg abandoned D38702: i386: exclude MINIMAL kernel from universe.

i386 kernel is being retired

Mar 11 2024, 12:47 AM

Mar 5 2024

mjg resigned from D40850: VFS lookup: New vn_cross_single_mount() and vn_cross_mounts().

First and foremost my apologies this fell through the cracks.

Mar 5 2024, 4:47 PM

Jan 20 2024

mjg added inline comments to D43488: kern: Implement lockless method for obtaining new PID..
Jan 20 2024, 5:28 AM
mjg added a comment to D43488: kern: Implement lockless method for obtaining new PID..
In D43488#991564, @pjd wrote:
In D43488#991394, @mjg wrote:

What's the motivation here? If you are running into scalability problems, it has to be allproc and proctree locks (amongst others).

Yes, scalability is the main motivation. We have a machine that slows down considerably when we reach >10,000 process (64 core system). allproc and proctree are the main problems. This change is just a low hanging fruit where we can easily eliminate a global lock.

Jan 20 2024, 5:28 AM

Jan 18 2024

mjg added a comment to D43476: sys/jail.h: expose JAIL_MAX constant to applications.

this macro should be eliminated, not exposed

Jan 18 2024, 10:42 AM
mjg added a comment to D43488: kern: Implement lockless method for obtaining new PID..

What's the motivation here? If you are running into scalability problems, it has to be allproc and proctree locks (amongst others).

Jan 18 2024, 7:06 AM

Jan 5 2024

mjg added a comment to D43313: Add O_RESOLVE_NO_SYMLINKS open flag.

Linux folk explicitly designed openat2 to be extensible, so I expect it is going to pick up explicit "official" usage down the road.

Jan 5 2024, 10:34 PM

Jan 4 2024

mjg added a comment to D43313: Add O_RESOLVE_NO_SYMLINKS open flag.

sounds like the thing to do is to add openat2 so that this automagically works, instead of a freebsd-specific flag

Jan 4 2024, 11:01 PM

Dec 29 2023

mjg committed rG3358108a38f0: llvm: Support: don't block signals around close if it can be avoided (authored by mjg).
llvm: Support: don't block signals around close if it can be avoided
Dec 29 2023, 7:14 PM
mjg closed D42984: llvm: Support: don't block signals around close if it can be avoided.
Dec 29 2023, 7:14 PM

Dec 9 2023

mjg added a comment to D42981: shells/44bsd-csh: remove sbrk use.

why is this port still a thing

Dec 9 2023, 12:16 PM
mjg updated the summary of D42984: llvm: Support: don't block signals around close if it can be avoided.
Dec 9 2023, 7:52 AM
mjg updated the summary of D42984: llvm: Support: don't block signals around close if it can be avoided.
Dec 9 2023, 7:52 AM
mjg requested review of D42984: llvm: Support: don't block signals around close if it can be avoided.
Dec 9 2023, 7:50 AM

Dec 6 2023

mjg added a comment to D40772: Tentative physical memory compaction.

@markj ping?

Dec 6 2023, 7:19 PM
mjg accepted D42927: vnet: (read) lock the vnet list while iterating it.
Dec 6 2023, 3:04 PM
mjg added inline comments to D42927: vnet: (read) lock the vnet list while iterating it.
Dec 6 2023, 3:04 PM
mjg added inline comments to D42927: vnet: (read) lock the vnet list while iterating it.
Dec 6 2023, 2:50 PM

Nov 29 2023

mjg committed rG746b0f70a229: vfs: dodge locking for lseek(fd, 0, SEEK_CUR) (authored by mjg).
vfs: dodge locking for lseek(fd, 0, SEEK_CUR)
Nov 29 2023, 10:59 AM

Nov 28 2023

mjg closed D40946: Add DEBUG_POISON_POINTER.
Nov 28 2023, 4:36 PM
mjg committed rGe1e847374bcc: Add DEBUG_POISON_POINTER (authored by mjg).
Add DEBUG_POISON_POINTER
Nov 28 2023, 4:36 PM
mjg updated the summary of D40946: Add DEBUG_POISON_POINTER.
Nov 28 2023, 3:34 PM
mjg added a comment to D40946: Add DEBUG_POISON_POINTER.

First of all my apologies, this somehow fell through the cracks after i pinged.

Nov 28 2023, 3:33 PM
mjg updated the diff for D40946: Add DEBUG_POISON_POINTER.
  • correct diff
Nov 28 2023, 3:32 PM

Nov 27 2023

mjg added a comment to D42603: nullfs: provide special bypass for null_copy_file_range().

So again what's the benefit of bubbling up ENOSYS? I assumed it would at least get handled in a post-vop hook instead of going all the way up to the caller.

Nov 27 2023, 5:52 PM

Nov 24 2023

mjg committed rGe6d025c5c57d: pseudofs: fix off by one in hash iteration in pfs_purge (authored by weike.chen_dell.com).
pseudofs: fix off by one in hash iteration in pfs_purge
Nov 24 2023, 7:48 PM
mjg committed rG94bddd2ab75f: pseudofs: fix off by one in hash iteration in pfs_purge (authored by weike.chen_dell.com).
pseudofs: fix off by one in hash iteration in pfs_purge
Nov 24 2023, 5:23 PM

Nov 23 2023

mjg added a comment to D42671: re(4): Add support for 8168FP HW rev.

if it does work with the patch, you should paste how dmesg looks like with it

Nov 23 2023, 7:18 PM
mjg added a comment to D42671: re(4): Add support for 8168FP HW rev.

according to your own copy from dmesg this failed to attach, so it does not work?

Nov 23 2023, 7:10 PM

Nov 20 2023

mjg committed rGe0d0f0930ee2: pseudofs: fix off by one in hash iteration in pfs_purge (authored by weike.chen_dell.com).
pseudofs: fix off by one in hash iteration in pfs_purge
Nov 20 2023, 5:59 AM
mjg closed D42628: pseudofs: fix off by one in hash iteration in pfs_purge.
Nov 20 2023, 5:58 AM

Nov 19 2023

mjg committed rG305a2676ae93: vfs: dodge locking for lseek(fd, 0, SEEK_CUR) (authored by mjg).
vfs: dodge locking for lseek(fd, 0, SEEK_CUR)
Nov 19 2023, 10:26 PM

Nov 17 2023

mjg added a comment to D42628: pseudofs: fix off by one in hash iteration in pfs_purge.

The patch looks correct, but commit message needs some work.

Nov 17 2023, 9:54 PM

Nov 16 2023

mjg added a comment to D42603: nullfs: provide special bypass for null_copy_file_range().

I massaged what I mean into a patch, with your nullfs change as basis:

Nov 16 2023, 5:52 PM
mjg added a comment to D42603: nullfs: provide special bypass for null_copy_file_range().
In D42603#972555, @kib wrote:

I plan to do something different after this patch goes in.
Most complications for fs come from the need to call vn_generic_copy_file_range() as fallback. I intend to make a special return code (or just repurpose ENOSYS) to ask VFS to do that after VOP call. It seems that this even eliminates the need of the flag to allow cross-mount copies, not sure completely. That would fit the idea that VOPs should implement just fs-specific code.

Nov 16 2023, 5:40 PM

Nov 15 2023

mjg added a comment to D42603: nullfs: provide special bypass for null_copy_file_range().

The VFS layer trying to babysit all filesystems is a long standing design flaw, which adds overhead to everyone and only makes optimisations clunky. For example for almost all filesystems VOP_CLOSE has next to nothing to do and most definitely does not need write suspension nor the vnode lock (and for zfs the routine is a nop) -- if there was no attempt to decide for the filesystem what it needs, there would be no problem.

Nov 15 2023, 2:01 PM

Nov 14 2023

mjg added a comment to D42603: nullfs: provide special bypass for null_copy_file_range().

vn_copy_file_range passes down vnodes from different mount points and all filesystems implementing the vop (apart from zfs) have an explicit check that mount points patch. iow the check that this is an instance of the same filesystem type is redundant for their case.

Nov 14 2023, 10:29 PM

Nov 6 2023

mjg added a comment to D40772: Tentative physical memory compaction.

If you can rebase both changes and show me how to collect fragmentation stats I can test this against a full ports tree build.

Nov 6 2023, 5:09 PM
mjg added a comment to D40772: Tentative physical memory compaction.

I don't know if the kernel is in shape where this can be properly evaluated.

Nov 6 2023, 4:40 PM
mjg committed rG733a66841d70: Fix up the vm_guest_sysctl_names size assert. (authored by mjg).
Fix up the vm_guest_sysctl_names size assert.
Nov 6 2023, 3:40 PM

Nov 1 2023

mjg committed rG0c5cd045bfb8: vfs: remove majority of stale commentary about free list (authored by mjg).
vfs: remove majority of stale commentary about free list
Nov 1 2023, 8:41 AM
mjg committed rG8b916c35c288: vfs: fix a typo introdued in previous (authored by mjg).
vfs: fix a typo introdued in previous
Nov 1 2023, 8:30 AM
mjg committed rG1692e50f2573: vfs: bring getnewvnode manpage closer to reality (authored by mjg).
vfs: bring getnewvnode manpage closer to reality
Nov 1 2023, 8:22 AM

Oct 23 2023

mjg committed rG8bd794531118: sx: fixup copy pasto in previous (authored by mjg).
sx: fixup copy pasto in previous
Oct 23 2023, 5:31 PM
mjg committed rGc35f527ed115: sx: unset td_wantedlock around going to sleep (authored by mjg).
sx: unset td_wantedlock around going to sleep
Oct 23 2023, 5:23 PM

Oct 22 2023

mjg committed rG7530de77f539: thread: add td_wantedlock (authored by mjg).
thread: add td_wantedlock
Oct 22 2023, 5:10 PM
mjg committed rG5d29ead2e2de: thread: reorder td_no_sleeping to plug two 4-byte holes on LP64 (authored by mjg).
thread: reorder td_no_sleeping to plug two 4-byte holes on LP64
Oct 22 2023, 5:10 PM