Page MenuHomeFreeBSD

markj (Mark Johnston)
User

Projects (8)

User Details

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

Recent Activity

Wed, Nov 30

markj accepted D37097: tmpfs: for used pages, account really allocated pages, instead of file sizes.
Wed, Nov 30, 11:58 PM
markj accepted D37097: tmpfs: for used pages, account really allocated pages, instead of file sizes.
Wed, Nov 30, 10:43 PM
markj accepted D37509: ktls_test: Add debug option to hexdump keys, nonces, and buffers..
Wed, Nov 30, 4:13 PM
markj accepted D37305: vm: reduce lock contention when processing vm batchqueues.

The patch seems ok to me, but:

  • In vm_pageout_reinsert_active(), we should change the call to read if (vm_batchqueue_insert(bq, m) != 0), even though it's just a stylistic change.
  • Did you observe any measurable change in CPU usage with the patch? The reduction in lock contention looks good, but lockstat doesn't really reflect the cost of failed trylocks. Even with no observed difference I think this patch is the right way to go, especially if we can also demonstrate that pagequeue lock hold times don't go up at all.
Wed, Nov 30, 3:48 PM
markj added a comment to D37210: Add test cases for ping with IP options in the response.

I'll try to figure out how to suppress them.

Wed, Nov 30, 3:35 PM
markj added a comment to D37210: Add test cases for ping with IP options in the response.

One problem I noticed is that the tests can spuriously fail with some error messages from scapy:

Wed, Nov 30, 2:44 PM

Tue, Nov 29

markj committed rG669ef76f855a: bhyve: Drop volatile qualifiers from xhci hw struct fields (authored by markj).
bhyve: Drop volatile qualifiers from xhci hw struct fields
Tue, Nov 29, 5:41 PM
markj committed rGa5fee360b4d5: bhyve: Cast away const when fetching a config nvlist (authored by markj).
bhyve: Cast away const when fetching a config nvlist
Tue, Nov 29, 5:41 PM
markj committed rG37b52f666115: bhyve: Drop volatile qualifiers from virtio rings (authored by markj).
bhyve: Drop volatile qualifiers from virtio rings
Tue, Nov 29, 5:41 PM
markj committed rG385e330c1c5d: bhyve: Drop volatile qualifiers from snapshot code (authored by markj).
bhyve: Drop volatile qualifiers from snapshot code
Tue, Nov 29, 5:40 PM

Mon, Nov 28

markj accepted D37486: bhyve: Don't leak uninitialized bits in NVMe completion statuses..

I'm surprised that clang didn't flag these. I've noticed it has trouble detecting uninitialized variable use in functions containing gotos, but that doesn't apply here.

Mon, Nov 28, 3:10 PM
markj accepted D37487: bhyve: Clear lid to 0 for internal device errors for NVMe AENs..
Mon, Nov 28, 3:03 PM
markj accepted D37490: bhyve: Appease warning about a potentially unaligned pointer..
Mon, Nov 28, 2:57 PM
markj accepted D37485: bhyve: Fix sign compare warnings in the e1000 device model..
Mon, Nov 28, 2:56 PM
markj accepted D37491: bhyve: Avoid passing a possible garbage pointer to free()..
Mon, Nov 28, 2:54 PM
markj accepted D37484: bhyve basl: Use GCC pragmas..
Mon, Nov 28, 2:53 PM

Wed, Nov 23

markj accepted D37470: makefs: Ignore some sign comparison warnings from GCC..

The one in zap.c is easy to fix directly, but this is ok for now.

Wed, Nov 23, 2:23 PM
markj accepted D37469: makefs zfs: Disable -Wunused-function for GCC as well..
Wed, Nov 23, 2:09 PM
markj accepted D37468: makefs zfs: Use signed values for both results of ?:..
Wed, Nov 23, 2:09 PM

Mon, Nov 21

markj added a comment to D37452: vmm: do not call mtx_lock in icr_low write handler.
In D37452#851606, @jhb wrote:

Alternatively, could just add a new spin mutex lock for startup_cpus. (That's what I had planned to do). This isn't a critical performance path such that atomic ops is a big win over just having a small lock for this.

Mon, Nov 21, 7:20 PM
markj added a comment to D37097: tmpfs: for used pages, account really allocated pages, instead of file sizes.

Is it a bug that tmpfs doesn't call swap_reserve_by_cred() when extending a file?

Mon, Nov 21, 6:03 PM
markj added a comment to D37296: bhyve: Use the default compiler warnings.

Thanks for doing this work, I really appreciate the clean ups and being able to turn off the compiler and static analysis overrides in the illumos downstream.

As part of porting this over, I found a few remaining warnings that I have addressed there, which should probably be fixed in FreeBSD too. I'm posting them here for information, and if anyone wants to pick them up please feel free. Otherwise I should have time over Christmas to look at upstreaming them:

Mon, Nov 21, 2:37 PM
markj added a comment to D37195: Remote stack corruption in ping (Embargoed).

@thj are we ready to commit?

Mon, Nov 21, 2:18 PM
markj added a comment to D37305: vm: reduce lock contention when processing vm batchqueues.

Only tangentially related, but I wonder if this constant shouldn't be defined for arm64 too?

Mon, Nov 21, 2:17 PM
markj committed rGe8c769b22d42: geom_part: Check number of GPT entries and size of GPT entry (authored by zlei).
geom_part: Check number of GPT entries and size of GPT entry
Mon, Nov 21, 1:54 PM
markj committed rG055648ccb721: bhyve: Simplify control flow in the xhci device model (authored by markj).
bhyve: Simplify control flow in the xhci device model
Mon, Nov 21, 1:54 PM
markj committed rG79e5fc020e0c: ksan: Build sanitizer runtimes without stack-smashing protection (authored by markj).
ksan: Build sanitizer runtimes without stack-smashing protection
Mon, Nov 21, 1:54 PM
markj committed rG51425bb84689: virtio: Silence a -Wunused warning (authored by markj).
virtio: Silence a -Wunused warning
Mon, Nov 21, 1:54 PM

Fri, Nov 18

markj committed rG71ebd117386c: bhyve: Enable the default compiler warnings (authored by markj).
bhyve: Enable the default compiler warnings
Fri, Nov 18, 7:14 PM
markj closed D37296: bhyve: Use the default compiler warnings.
Fri, Nov 18, 7:14 PM
markj closed D37408: bhyve: Avoid using a packed struct for xhci port registers.
Fri, Nov 18, 7:14 PM
markj committed rG0705b7f4e64f: bhyve: Avoid using a packed struct for xhci port registers (authored by markj).
bhyve: Avoid using a packed struct for xhci port registers
Fri, Nov 18, 7:14 PM
markj committed rGc127c61efa4d: bhyve: Let BASL compile with raised warnings (authored by markj).
bhyve: Let BASL compile with raised warnings
Fri, Nov 18, 7:14 PM
markj closed D37397: bhyve: Let BASL compile with raised warnings.
Fri, Nov 18, 7:14 PM
markj committed rGbd634fc733d4: bhyve: Address an unused parameter warning in the smbios code (authored by markj).
bhyve: Address an unused parameter warning in the smbios code
Fri, Nov 18, 7:14 PM
markj closed D37294: bhyve: Address an unused parameter warning in the smbios code.
Fri, Nov 18, 7:13 PM
markj closed D37295: bhyve: Disable thread safety analysis by the compiler.
Fri, Nov 18, 7:13 PM
markj closed D37443: vmm: Restore the correct vm_inject_*() prototypes.
Fri, Nov 18, 7:13 PM
markj committed rG1a8e52391be8: bhyve: Disable thread safety analysis (authored by markj).
bhyve: Disable thread safety analysis
Fri, Nov 18, 7:13 PM
markj committed rGca6b48f08034: vmm: Restore the correct vm_inject_*() prototypes (authored by markj).
vmm: Restore the correct vm_inject_*() prototypes
Fri, Nov 18, 7:13 PM
markj requested review of D37443: vmm: Restore the correct vm_inject_*() prototypes.
Fri, Nov 18, 6:58 PM
markj committed rGd3b97a1ea012: bhyve: Define an accessor for net backend private data (authored by markj).
bhyve: Define an accessor for net backend private data
Fri, Nov 18, 3:35 PM
markj added inline comments to D37408: bhyve: Avoid using a packed struct for xhci port registers.
Fri, Nov 18, 3:17 PM
markj updated the diff for D37408: bhyve: Avoid using a packed struct for xhci port registers.

Add a default case for port register I/O: return 0xffffffff
for unaligned reads. Also print debug messages for unaligned
reads and writes of port registers.

Fri, Nov 18, 3:17 PM

Thu, Nov 17

markj added inline comments to D37408: bhyve: Avoid using a packed struct for xhci port registers.
Thu, Nov 17, 6:22 PM
markj accepted D37416: man9: correct vm_page_wire.9 links.
Thu, Nov 17, 3:03 PM
markj added inline comments to D37416: man9: correct vm_page_wire.9 links.
Thu, Nov 17, 2:15 PM
markj accepted D37417: vmm: remove unneccessary rendezvous assertion.
Thu, Nov 17, 2:12 PM

Wed, Nov 16

markj added a comment to D37390: vmm: avoid spurios rendezvous.

So the problem is:

  1. vcpu1 initiates a rendezvous with some set of vcpus
  2. vcpu2 does not belong to the set, but observes vcpu_rendezvous_pending() (an unlocked read of vm->rendezvous_func) is true
  3. vcpu2 calls vm_exit_rendezvous() but now vm->rendezvous_func is NULL because the rendezvous is already over, and this triggers an assertion failure

?

Why not simply remove the incorrect in assertion in vm_exit_rendezvous()? vm_handle_rendezvous() will do nothing if no rendezvous is pending. That is, it is harmless for vcpu2 to try to handle VM_EXITCODE_RENDEZVOUS. I think this situation is rare enough that we do not care about the cost of calling vm_exit_rendezvous() unnecessarily.

Yes, that's the issue. It's caused by vm_handle_ipi. If the OS sends INIT to a single cpu (what most OS do), vm_handle_ipi will initiate a rendezvous for a single vcpu. Don't know if the costs for unneccessary vm_exit_rendezvous calls are noticable for vms with high vcpu counts.

Wed, Nov 16, 5:14 PM
markj added inline comments to D37360: bhyve: Enable thread safety warnings by default.
Wed, Nov 16, 3:17 PM
markj added a comment to D37390: vmm: avoid spurios rendezvous.

So the problem is:

  1. vcpu1 initiates a rendezvous with some set of vcpus
  2. vcpu2 does not belong to the set, but observes vcpu_rendezvous_pending() (an unlocked read of vm->rendezvous_func) is true
  3. vcpu2 calls vm_exit_rendezvous() but now vm->rendezvous_func is NULL because the rendezvous is already over, and this triggers an assertion failure

?

Wed, Nov 16, 3:11 PM
markj added a comment to D37407: bhyve: add helper to fill a ACPI_GENERIC_ADDRESS.

Why does it need to be inline?

Wed, Nov 16, 2:26 PM
markj accepted D37406: bhyve: add helper to append a basl table without a header.
Wed, Nov 16, 2:25 PM
markj accepted D37405: bhyve: make basl_table_add_* functions public.
Wed, Nov 16, 2:23 PM
markj requested review of D37408: bhyve: Avoid using a packed struct for xhci port registers.
Wed, Nov 16, 2:21 PM

Tue, Nov 15

markj accepted D37400: wg: Re-add basic if_wg(4) tests..
Tue, Nov 15, 11:55 PM
markj accepted D37373: ktls: Add tests for receiving corrupted or invalid records..
Tue, Nov 15, 2:26 PM
markj accepted D37371: ktls: Add tests for software AES-CBC decryption for TLS 1.1+..
Tue, Nov 15, 2:20 PM
markj requested review of D37397: bhyve: Let BASL compile with raised warnings.
Tue, Nov 15, 2:15 PM

Mon, Nov 14

markj added inline comments to D37360: bhyve: Enable thread safety warnings by default.
Mon, Nov 14, 11:55 PM
markj updated the diff for D37294: bhyve: Address an unused parameter warning in the smbios code.

Implement the maximum structure size.

Mon, Nov 14, 11:43 PM
markj accepted D37195: Remote stack corruption in ping (Embargoed).
Mon, Nov 14, 9:30 PM
markj accepted D37370: ktls: Add software support for AES-CBC decryption for TLS 1.1+..
Mon, Nov 14, 8:11 PM
markj closed D37287: bhyve: Simplify control flow in the xhci device model.
Mon, Nov 14, 8:11 PM
markj committed rGc4c368fb3ecc: bhyve: Simplify control flow in the xhci device model (authored by markj).
bhyve: Simplify control flow in the xhci device model
Mon, Nov 14, 8:10 PM
markj closed D37298: virtio: Silence a -Wunused warning.
Mon, Nov 14, 8:10 PM
markj committed rGdb494ceb65ef: virtio: Silence a -Wunused warning (authored by markj).
virtio: Silence a -Wunused warning
Mon, Nov 14, 8:10 PM
markj committed rG1e3927b93b57: Only define sanitizer wrappers for atomic fences once. (authored by jhb).
Only define sanitizer wrappers for atomic fences once.
Mon, Nov 14, 7:43 PM
markj committed rG54fe9183c8f9: atomic: Intercept atomic_(load|store)_bool for kernel sanitizers (authored by markj).
atomic: Intercept atomic_(load|store)_bool for kernel sanitizers
Mon, Nov 14, 7:42 PM
markj committed rG2b76d0699ed4: Simplify kernel sanitizer interceptors (authored by markj).
Simplify kernel sanitizer interceptors
Mon, Nov 14, 7:42 PM
markj accepted D37299: Disable superpage use for stage 2 arm64 mappings.
Mon, Nov 14, 4:41 PM
markj accepted D37152: vmm: Remove the per-vm cookie argument from vmmops taking a vcpu..
Mon, Nov 14, 4:40 PM
markj accepted D37173: vmm: Use a cpuset_t for vCPUs waiting for STARTUP IPIs..
Mon, Nov 14, 4:38 PM
markj accepted D37162: vmm: Pass vcpu instead of vm and vcpuid to APIs used from CPU backends..
Mon, Nov 14, 4:37 PM
markj accepted D37161: vmm: Use struct vcpu in the instruction emulation code..
Mon, Nov 14, 4:34 PM
markj accepted D37174: vmm: Allocate vCPUs on first use of a vCPU..
Mon, Nov 14, 4:28 PM
markj accepted D37151: vmm: Refactor storage of CPU-dependent per-vCPU data..
Mon, Nov 14, 4:26 PM
markj accepted D37372: ktls_ocf: Reject encrypted TLS records using AEAD that are too small..
Mon, Nov 14, 3:14 PM
markj accepted D37371: ktls: Add tests for software AES-CBC decryption for TLS 1.1+..
Mon, Nov 14, 2:59 PM
markj accepted D37370: ktls: Add software support for AES-CBC decryption for TLS 1.1+..

This is mainly intended to provide a fallback for TOE TLS which may need to use software decryption for an initial record at the start of a connection.

Mon, Nov 14, 2:51 PM
markj committed rG84b0b7ea4cd6: bhyve: Fix a typo in a comment (authored by markj).
bhyve: Fix a typo in a comment
Mon, Nov 14, 2:01 PM
markj accepted D37172: vmm: Use an sx lock to protect the memory map..
Mon, Nov 14, 1:59 PM
markj accepted D37386: bhyve/kdblayout: add some missing keys to german layout.
Mon, Nov 14, 1:56 PM

Fri, Nov 11

markj accepted D37175: vmm: Convert VM_MAXCPU into a loader tunable hw.vmm.maxcpu..
Fri, Nov 11, 10:58 PM
markj accepted D37333: ddb(4): document some missing commands.
Fri, Nov 11, 5:17 PM
markj accepted D37332: ddb(4): misc updates.
Fri, Nov 11, 5:11 PM
markj accepted D37330: netgdb(4): update list of required kernel options.
Fri, Nov 11, 5:07 PM
markj accepted D37331: netdump(4): document all kernel options required.
Fri, Nov 11, 5:06 PM
markj accepted D37353: ktls: Inline ktls_cleanup() into ktls_destroy()..
Fri, Nov 11, 5:05 PM
markj accepted D37352: ktls: Don't leak ktls session objects for certain errors..
Fri, Nov 11, 5:02 PM
markj accepted D37174: vmm: Allocate vCPUs on first use of a vCPU..
Fri, Nov 11, 4:55 PM
markj accepted D37168: vmm: Lookup vcpu pointers in vmmdev_ioctl..
Fri, Nov 11, 4:40 PM
markj added inline comments to D37173: vmm: Use a cpuset_t for vCPUs waiting for STARTUP IPIs..
Fri, Nov 11, 4:26 PM
markj accepted D37361: ddb: don't limit pindex output in 'show vmopag'.

If I recall correctly, it wasn't always possible to interrupt the pager, so running certain ddb commands could make the debugger unusable and force a hard reset.

Fri, Nov 11, 4:21 PM
markj added inline comments to D37175: vmm: Convert VM_MAXCPU into a loader tunable hw.vmm.maxcpu..
Fri, Nov 11, 4:15 PM
markj accepted D37176: bhyve: Remove vestigial support for setting max vCPUs..

Should vm_set_topology() be updated to indicate that maxcpus is unimplemented? I can see why you didn't remove the parameter at least.

Fri, Nov 11, 4:07 PM
markj accepted D37170: vmm stat: Add a special nelems constant for arrays sized by vCPU count..
Fri, Nov 11, 4:03 PM
markj accepted D37166: vmm: Remove unused vcpuid argument from vioapic_process_eoi..
Fri, Nov 11, 4:01 PM
markj accepted D37165: vmm: Use struct vcpu in the rendezvous code..
Fri, Nov 11, 4:01 PM
markj accepted D37164: vmm: Remove support for vm_rendezvous with a cpuid of -1..
Fri, Nov 11, 4:00 PM