Page MenuHomeFreeBSD

markj (Mark Johnston)
User

Projects

User Details

User Since
Mar 12 2014, 1:00 AM (240 w, 1 d)

Recent Activity

Tue, Oct 16

markj committed rS339390: Reparent a child of pdfork(2) to its reaper when the procdesc is closed..
Reparent a child of pdfork(2) to its reaper when the procdesc is closed.
Tue, Oct 16, 8:07 PM
markj closed D17589: Reparent to the process' reaper when a procdesc is closed..
Tue, Oct 16, 8:07 PM
markj added reviewers for D17589: Reparent to the process' reaper when a procdesc is closed.: kib, jilles.
Tue, Oct 16, 5:20 PM
markj created D17589: Reparent to the process' reaper when a procdesc is closed..
Tue, Oct 16, 5:18 PM
markj updated the diff for D17572: Run most of rtsold(8) and rtsol(8) in capability mode..
  • Link cap_syslog into rtsol(8)
  • Use the right name for the syslog service
Tue, Oct 16, 5:15 PM
markj retitled D17418: Make malloc_domain(9) fall back to other domains. from Add malloc_domainset(9). to Make malloc_domain(9) fall back to other domains..
Tue, Oct 16, 4:30 PM
markj updated the diff for D17420: Use a vm_domainset iterator in keg_fetch_slab()..

Use a per-keg domainset_ref to maintain per-keg round-robin, as requested
by Jeff.

Tue, Oct 16, 4:11 PM
markj abandoned D17419: Use malloc_domainset(9) instead of malloc_domain(M_WAITOK)..

This is no longer needed given the changes in D17418.

Tue, Oct 16, 4:10 PM
markj added inline comments to D17418: Make malloc_domain(9) fall back to other domains..
Tue, Oct 16, 4:10 PM
markj updated the diff for D17418: Make malloc_domain(9) fall back to other domains..

Remove malloc_domainset() and change malloc_domain() to fall back to
other domains if an allocation from the requested domain is not possible.

Tue, Oct 16, 4:08 PM
markj updated the diff for D17417: Refactor domainset iterators in preparation for use by malloc() and UMA..

Add vm_domainset_iter_policy_ref_init(), needed for D17420.

Tue, Oct 16, 4:01 PM
markj accepted D17070: pmap_large_map() KPI.
Tue, Oct 16, 2:39 PM
markj updated the diff for D17416: Initialize global domainsets during boot..
  • Update man page as well
Tue, Oct 16, 2:06 PM
markj updated the diff for D17416: Initialize global domainsets during boot..
  • Rename to DOMAINSET_RR() and DOMAINSET_PREF()
Tue, Oct 16, 2:04 PM

Mon, Oct 15

markj updated the summary of D17572: Run most of rtsold(8) and rtsol(8) in capability mode..
Mon, Oct 15, 7:39 PM
markj updated the summary of D17572: Run most of rtsold(8) and rtsol(8) in capability mode..
Mon, Oct 15, 7:20 PM
markj created D17572: Run most of rtsold(8) and rtsol(8) in capability mode..
Mon, Oct 15, 7:19 PM
markj committed rS339365: Typo..
Typo.
Mon, Oct 15, 6:28 PM
markj updated the diff for D17483: Don't import 0 into the quantum cache..
  • Address Alan's comments.
Mon, Oct 15, 6:07 PM
markj accepted D17564: Get rid of unneccessary ioctls..
Mon, Oct 15, 2:35 PM
markj accepted D17557: Don't try to dlopen() built-in NSS types.

Thanks

Mon, Oct 15, 12:14 PM
markj updated the diff for D17483: Don't import 0 into the quantum cache..
  • Drop unnecessary M_NOWAIT check.
Mon, Oct 15, 12:30 AM
markj added a comment to D17483: Don't import 0 into the quantum cache..

Regarding the fallback solution, I believe it is okay to fall back on vmem_xalloc() regardless of whether vmem_alloc() is called with M_WAITOK or M_NOWAIT (i.e. the if statement on line 1299 is not necessary). If vmem_alloc() is called with M_NOWAIT, then the fallback vmem_xalloc() call will also have M_NOWAIT and could also allocate the range starting at 0.

Mon, Oct 15, 12:27 AM
markj accepted D17560: Add a MINIMAL config for i386, based on amd64.

I am curious about your motives. :)

Mon, Oct 15, 12:06 AM

Sun, Oct 14

markj added inline comments to D17557: Don't try to dlopen() built-in NSS types.
Sun, Oct 14, 10:46 PM
markj accepted D17557: Don't try to dlopen() built-in NSS types.

As it is now, I believe they could work in FreeBSD. In Linux, glibc already provides the built-in modules as shared libraries, so it would clash there. I've grepped the ports tree for '\<nss_.*so', and I don't see an example of anyone doing that.

Which is to say: I believe it would be rather silly thing to try install a third-party module with a name of a built-in source.

Sun, Oct 14, 10:38 PM
markj added a comment to D17557: Don't try to dlopen() built-in NSS types.

If someone actually created dynamic NSS modules with these names today, would they work? Or is there some reason that would fail? If it works, then this change would break such a configuration, though I'd be surprised if anyone actually does that. At the very least, we should document these names as being reserved by the implementation.

Sun, Oct 14, 7:54 PM

Sat, Oct 13

markj added a comment to D16698: First draft HID over I2C support (Mouse only).

I was able to use this on a Dell latitude 7480 to get a working trackpad. Thank you!

Sat, Oct 13, 10:17 PM · Contributor Reviews (base)
markj accepted D17363: Process irelocs for statically linked binaries from crt1..
Sat, Oct 13, 2:09 PM

Fri, Oct 12

markj accepted D17540: In udp_input() validate inp before use after epoch(9)..
Fri, Oct 12, 10:22 PM
markj updated the diff for D17483: Don't import 0 into the quantum cache..
  • Don't cache 0 in vmem_free().
  • Avoid blocking allocations in qc_import().
Fri, Oct 12, 2:54 PM
markj added a comment to D17483: Don't import 0 into the quantum cache..

As I understand it, there are now two qualitatively different vmem_xalloc() calls that could be made when a user calls vmem_alloc(). The first is the vmem_xalloc() call used in qc_import() to fill the quantum caches when needed, and the change to this call's parameters means that a quantum cache will never contain the range from 0 to QUANTUM_SIZE - 1. The second is called directly by vmem_alloc() if the allocation size exceeds those supported by the quantum caches, and this call could still allocate the range from 0 to QUANTUM_SIZE - 1.

With quantum caching enabled, this change means that in practice vmem_alloc() will almost never allocate the range from 0 to QUANTUM_SIZE - 1. (If the allocation request hits the second vmem_xalloc() call described above, it is necessarily asking for a range whose size is greater than the quantum size. Unless this is the very first allocation request, it's unlikely that the range from 0 to QUANTUM_SIZE - 1 would be used to satisfy it.) I'm not sure whether this behavior is a big deal, but vmem consumers may not expect it.

I think we could side-step the problem entirely by having vmem_alloc() perform an M_NOWAIT allocation from the quantum cache before falling back to vmem_xalloc(). We would still attempt to import resources into the cache upon a cache miss, but we would only block in vmem_xalloc(). Does that seem reasonable?

I think that because resources would still be imported into the cache by the first vmem_xalloc() call described above and used to satisfy the allocation request on a cache miss, the behavior of not allocating the range from 0 to QUANTUM_SIZE - 1 would still apply. Please let me know whether this makes sense.

Fri, Oct 12, 2:53 PM
markj accepted D17525: Move variable into proper block..
Fri, Oct 12, 3:46 AM

Thu, Oct 11

markj accepted D17414: Various fixes for TLB management on RISC-V..
Thu, Oct 11, 7:06 PM
markj added inline comments to D17414: Various fixes for TLB management on RISC-V..
Thu, Oct 11, 5:54 PM
markj added a comment to D17419: Use malloc_domainset(9) instead of malloc_domain(M_WAITOK)..

Stepping back for a second, are we going to get to a point where we can make malloc() and uma_zalloc() use the current thread's domainset policy, rather than one derived from the kernel object?

Thu, Oct 11, 3:38 PM
markj accepted D17519: elfcopy: delete filter_reloc, it is broken and unnecessary.
Thu, Oct 11, 3:07 PM
markj added a comment to D17419: Use malloc_domainset(9) instead of malloc_domain(M_WAITOK)..
In D17419#373675, @jeff wrote:

I would prefer to make this change by changing the semantics of malloc_domain() to mean prefer.

If people really want a single domain we can create another policy array that means 'only this domain'. I doubt it will see much if any use however.

Just to be clear: based on this comment and the one in D17418 you're suggesting keeping malloc_domainset() but having malloc_domain() be a wrapper that just selects DSET_PREF(domain)? I'm not opposed to that, but note that I did not convert malloc_domain(M_NOWAIT) callers (all of which are in busdma). I think it's probably fine to have them fall back to other domains though. That said, with your suggested change malloc_domain() would behave differently from kmem_malloc_domain(), uma_zalloc_domain() and vm_page_alloc_domain(), which is not ideal.

Yes, or we could just change malloc_domain() to take a set argument instead of a domain int. I think it was probably a mistake to make APIs that strictly require a specific domain. All of these things could take a policy instead. With your policy iterator changes this starts to look much nicer anyway.

Thu, Oct 11, 2:33 AM
markj added a comment to D17419: Use malloc_domainset(9) instead of malloc_domain(M_WAITOK)..

As I pointed out on IRC, this problem is not specific to hwpmc. Nonetheless it does fix the issue here.

Thu, Oct 11, 1:39 AM
markj added inline comments to D17416: Initialize global domainsets during boot..
Thu, Oct 11, 1:28 AM
markj updated the diff for D17420: Use a vm_domainset iterator in keg_fetch_slab()..
  • Add keg_fetch_free_slab().
Thu, Oct 11, 1:22 AM
markj added a comment to D17420: Use a vm_domainset iterator in keg_fetch_slab()..
In D17420#373676, @jeff wrote:

This is surprisingly simple. I am a little uneasy with the prospect of not doing round-robin on the keg's iterator. Can we not pass in an iterator somehow?

Thu, Oct 11, 1:21 AM
markj accepted D17490: Adjust libmemstat after r338899.

Looks ok to me otherwise.

Thu, Oct 11, 1:20 AM
markj added inline comments to D17490: Adjust libmemstat after r338899.
Thu, Oct 11, 1:09 AM

Wed, Oct 10

markj added inline comments to D17414: Various fixes for TLB management on RISC-V..
Wed, Oct 10, 6:16 PM
markj added inline comments to D17414: Various fixes for TLB management on RISC-V..
Wed, Oct 10, 4:31 PM
markj added a comment to D17490: Adjust libmemstat after r338899.
In D17490#373345, @kib wrote:

I do not remember that we ever supported non-current kernel in the core/live kernel tools.

Wed, Oct 10, 3:01 PM
markj added inline comments to D17414: Various fixes for TLB management on RISC-V..
Wed, Oct 10, 1:36 AM
markj added inline comments to D17414: Various fixes for TLB management on RISC-V..
Wed, Oct 10, 1:11 AM

Tue, Oct 9

markj added inline comments to D17424: Support for 2nd scheme of PTE A and D bits management.
Tue, Oct 9, 11:05 PM
markj added a comment to D17483: Don't import 0 into the quantum cache..

I believe this change means that the range from 0 to QUANTUM_SIZE - 1 cannot be allocated by vmem_alloc() when quantum caching is enabled (except as part of an allocation request that is too large to be satisfied by a quantum cache).

Tue, Oct 9, 6:38 PM
markj added a comment to D17485: Allow the ND6 default route and prefix lists to be read in capability mode..

Why don't use casper for that (e.g. cap_sysctlbyname) ?

Tue, Oct 9, 5:07 PM
markj retitled D17485: Allow the ND6 default route and prefix lists to be read in capability mode. from Allow the default route and prefix lists to be read in capability mode. to Allow the ND6 default route and prefix lists to be read in capability mode..
Tue, Oct 9, 4:43 PM
markj created D17485: Allow the ND6 default route and prefix lists to be read in capability mode..
Tue, Oct 9, 4:42 PM
markj added a comment to D17226: Implement M_NEXTFIT..

BTW, I plan to write some tests for this code to exercise corner cases, though we don't have much precedent for in-kernel tests.

Tue, Oct 9, 4:26 PM
markj updated the summary of D17483: Don't import 0 into the quantum cache..
Tue, Oct 9, 4:23 PM
markj created D17483: Don't import 0 into the quantum cache..
Tue, Oct 9, 4:21 PM
markj added inline comments to D17226: Implement M_NEXTFIT..
Tue, Oct 9, 4:20 PM
markj updated the diff for D17226: Implement M_NEXTFIT..

Don't fall back to vmem_xalloc(). Instead, factor out handling of
resource shortages into vmem_try_fetch() and use that if the nextfit
search fails. This way we ensure that the cursor is updated on all
M_NEXTFIT allocations, so the policy is applied strictly.

Tue, Oct 9, 4:14 PM
markj updated the diff for D17227: Use M_NEXTFIT in memguard..
  • Remove some stale comments referencing the use of a vm_map to manage memguard KVA.
  • Reimplement the mapused sysctl so that we can see how much KVA is consumed at a given point in time.
Tue, Oct 9, 4:14 PM
markj added a comment to D17227: Use M_NEXTFIT in memguard..

Don't fall back to vmem_xalloc(). Instead, factor out handling of
resource shortages into vmem_try_fetch() and use that if the nextfit
search fails. This way we ensure that the cursor is updated on all
M_NEXTFIT allocations, so the policy is applied strictly.

Tue, Oct 9, 4:13 PM
markj updated the diff for D17227: Use M_NEXTFIT in memguard..

Don't fall back to vmem_xalloc(). Instead, factor out handling of
resource shortages into vmem_try_fetch() and use that if the nextfit
search fails. This way we ensure that the cursor is updated on all
M_NEXTFIT allocations, so the policy is applied strictly.

Tue, Oct 9, 4:12 PM
markj added inline comments to D17424: Support for 2nd scheme of PTE A and D bits management.
Tue, Oct 9, 2:51 PM

Mon, Oct 8

markj updated the diff for D17416: Initialize global domainsets during boot..
  • Rename and document macros.
  • Annotate the global domainsets with __read_mostly.
Mon, Oct 8, 8:28 PM
markj added inline comments to D17439: Make it possible to disable NUMA support with a tunable..
Mon, Oct 8, 8:13 PM
markj updated the diff for D17439: Make it possible to disable NUMA support with a tunable..
  • Fix vm_ndomains=1 case on arm64.
  • Change the tunable to vm.numa.disabled.
Mon, Oct 8, 8:12 PM
markj added inline comments to D17363: Process irelocs for statically linked binaries from crt1..
Mon, Oct 8, 6:28 PM
markj added inline comments to D17416: Initialize global domainsets during boot..
Mon, Oct 8, 6:08 PM
markj added inline comments to D17439: Make it possible to disable NUMA support with a tunable..
Mon, Oct 8, 5:55 PM
markj added inline comments to D17417: Refactor domainset iterators in preparation for use by malloc() and UMA..
Mon, Oct 8, 5:17 PM
markj added inline comments to D17394: Fix lock order reversal when calling defrouter_remove() from nd6_na_input(). nd6_na_input() can take lle lock before nd6 lock in certain cases..
Mon, Oct 8, 5:14 PM
markj added a comment to D17416: Initialize global domainsets during boot..

You mention kstacks. I have not gone through the rest of your reviews, but I was wondering if you were working on affinitizing kstacks. Did you plan to break the cache out by domain, or drop it for affinitized kstack allocations? The default is so undersized these days, we're mostly not getting the benefit of the cache anyway (and the cache might be pessimal, since it is protected by a global lock).

Mon, Oct 8, 4:57 PM
markj added inline comments to D17414: Various fixes for TLB management on RISC-V..
Mon, Oct 8, 4:49 PM

Fri, Oct 5

markj updated the diff for D17439: Make it possible to disable NUMA support with a tunable..

Handle kib's notes.

Fri, Oct 5, 7:54 PM
markj updated the summary of D17439: Make it possible to disable NUMA support with a tunable..
Fri, Oct 5, 7:34 PM
markj added a child revision for D17416: Initialize global domainsets during boot.: D17439: Make it possible to disable NUMA support with a tunable..
Fri, Oct 5, 7:31 PM
markj created D17439: Make it possible to disable NUMA support with a tunable..
Fri, Oct 5, 7:31 PM
markj added a comment to D17418: Make malloc_domain(9) fall back to other domains..

Do we really need a new malloc variant? Couldn't this be done with a new malloc flag that was specific to malloc_domain(). Something like M_ALTOK or something? (or maybe M_EXACT if you want the default to be the other way around, and have malloc_domain() fall back by default)

Fri, Oct 5, 5:13 PM
markj added a comment to D17418: Make malloc_domain(9) fall back to other domains..

As an aside, this same pattern could be used to implement uma_zalloc_domainset() or vm_page_alloc_domainset(). For example: https://reviews.freebsd.org/D17425 , which I posted just as an example.

Fri, Oct 5, 4:49 PM

Thu, Oct 4

markj updated the diff for D17425: Add vm_page_alloc_domainset()..

Another trivial fix

Thu, Oct 4, 10:21 PM
markj updated the diff for D17425: Add vm_page_alloc_domainset()..

Fix obvious bugs

Thu, Oct 4, 10:13 PM
markj created D17425: Add vm_page_alloc_domainset()..
Thu, Oct 4, 10:10 PM
markj accepted D17011: hwpmc: Refactor sample ring buffer handling.
Thu, Oct 4, 9:40 PM
markj updated the diff for D17304: Swap in processes unless there's a global memory shortage..
  • Use the global domainset defined in D17416.
  • Don't start at domain 0 for each stack.
Thu, Oct 4, 8:20 PM
markj accepted D17421: Introduce WITH_RETPOLINE src.conf knob to build userland with retpoline.
Thu, Oct 4, 8:19 PM
markj added inline comments to D17418: Make malloc_domain(9) fall back to other domains..
Thu, Oct 4, 8:15 PM
markj updated the summary of D17419: Use malloc_domainset(9) instead of malloc_domain(M_WAITOK)..
Thu, Oct 4, 8:14 PM
markj added reviewers for D17420: Use a vm_domainset iterator in keg_fetch_slab().: alc, jeff, kib, gallatin.
Thu, Oct 4, 8:12 PM
markj added reviewers for D17419: Use malloc_domainset(9) instead of malloc_domain(M_WAITOK).: alc, jeff, kib, gallatin.
Thu, Oct 4, 8:12 PM
markj added reviewers for D17418: Make malloc_domain(9) fall back to other domains.: alc, jeff, kib, gallatin.
Thu, Oct 4, 8:12 PM
markj added reviewers for D17417: Refactor domainset iterators in preparation for use by malloc() and UMA.: alc, jeff, kib, gallatin.
Thu, Oct 4, 8:12 PM
markj updated the summary of D17416: Initialize global domainsets during boot..
Thu, Oct 4, 8:11 PM
markj created D17420: Use a vm_domainset iterator in keg_fetch_slab()..
Thu, Oct 4, 8:00 PM
markj created D17419: Use malloc_domainset(9) instead of malloc_domain(M_WAITOK)..
Thu, Oct 4, 8:00 PM
markj created D17418: Make malloc_domain(9) fall back to other domains..
Thu, Oct 4, 8:00 PM
markj updated the diff for D17416: Initialize global domainsets during boot..

Remove a useless comment.

Thu, Oct 4, 7:59 PM
markj created D17417: Refactor domainset iterators in preparation for use by malloc() and UMA..
Thu, Oct 4, 7:55 PM
markj created D17416: Initialize global domainsets during boot..
Thu, Oct 4, 7:54 PM
markj accepted D17415: Add support for relocations in RISC-V kernel modules to kldxref..
Thu, Oct 4, 7:36 PM
markj added inline comments to D17304: Swap in processes unless there's a global memory shortage..
Thu, Oct 4, 4:13 PM