Page MenuHomeFreeBSD

jmg (John-Mark Gurney)
User

Projects

User Details

User Since
Sep 2 2014, 10:55 PM (577 w, 1 d)

Recent Activity

Mon, Sep 15

jmg committed rGe1bc42cb1551: e1000: fix/complete merge of previous two commits (authored by jmg).
e1000: fix/complete merge of previous two commits
Mon, Sep 15, 9:45 PM

Fri, Sep 12

jmg committed rG3c60ea77649d: e1000: fix igb VF stats (authored by jmg).
e1000: fix igb VF stats
Fri, Sep 12, 10:09 PM
jmg closed D52326: first cut at reading igb vf stat support.
Fri, Sep 12, 10:09 PM

Thu, Sep 11

jmg added a comment to D52326: first cut at reading igb vf stat support.

We have tested PF, and verified that the sysctls are still there and have not changed.

Thu, Sep 11, 5:23 PM
jmg added a comment to D52326: first cut at reading igb vf stat support.

ping, any update on this?

Thu, Sep 11, 4:57 AM

Fri, Sep 5

jmg added a comment to D52326: first cut at reading igb vf stat support.

@jmg thank you for the patch! I started working on that issue, but a family emergency put me AFK for almost 2 weeks. To avoid further delay I think we should proceed with your version. It looks good to me, but let me run some basic tests on Monday. I'll approve this review as soon as I'm done.

Fri, Sep 5, 9:07 PM

Thu, Sep 4

jmg added a reviewer for D52390: e1000: remove unused header file: kbowling.
Thu, Sep 4, 11:35 PM
jmg added a comment to D52326: first cut at reading igb vf stat support.

fixed comments, commit message to be:

e1000: fix igb VF stats
Thu, Sep 4, 11:32 PM
jmg updated the diff for D52326: first cut at reading igb vf stat support.

address comments, add comment about union usage

Thu, Sep 4, 11:28 PM
jmg requested review of D52390: e1000: remove unused header file.
Thu, Sep 4, 11:17 PM

Tue, Sep 2

jmg added inline comments to D52326: first cut at reading igb vf stat support.
Tue, Sep 2, 7:24 AM

Mon, Sep 1

jmg removed a reviewer for D52326: first cut at reading igb vf stat support: kbowling.
Mon, Sep 1, 10:08 PM
jmg added a comment to D52326: first cut at reading igb vf stat support.

Note that this is only compiled tested. This was mainly to get a preliminary test patch out as it might be a couple days before I can do my own testing, and w/ 15 branch coming up, thought if someone had time to test/look at it in the meantime, we can compress the timeline.

Mon, Sep 1, 10:08 PM
jmg retitled D52326: first cut at reading igb vf stat support from first cut at readding igb stat support to first cut at reading igb vf stat support.
Mon, Sep 1, 10:06 PM
jmg requested review of D52326: first cut at reading igb vf stat support.
Mon, Sep 1, 10:04 PM

Fri, Aug 29

jmg committed rGc4fed7d86d5d: tarfs: add missing set of eofflag in early return, discovered on aarch64 (authored by jmg).
tarfs: add missing set of eofflag in early return, discovered on aarch64
Fri, Aug 29, 9:52 PM
jmg attached a referenced file: F127258092: syscalltest.c.
Fri, Aug 29, 5:30 PM
jmg added a comment to D52243: arm64: 32-bit compat is little endian, read the correct word.

The attached program can be used to test/verify the problem/fix. Compile w/ -m32.

Fri, Aug 29, 5:29 PM
jmg requested review of D52243: arm64: 32-bit compat is little endian, read the correct word.
Fri, Aug 29, 5:24 PM
jmg committed rG0b607a0d6040: fix mispelling in panic msg (authored by jmg).
fix mispelling in panic msg
Fri, Aug 29, 4:55 PM

Aug 19 2025

jmg committed R9:09a5974db0be: Update jmg@ expiry date (authored by jmg).
Update jmg@ expiry date
Aug 19 2025, 11:26 PM
jmg closed D52005: if the syscall muxes are used, up to two additional argumentsmay be required. This means that the 8 required for mmap increasesup to 10 (for __syscall)..

I forgot to tag the commit. This was committed in: https://cgit.freebsd.org/src/commit/?id=740b879c6ade531adebeba7cd2f261bbe650797f

Aug 19 2025, 11:13 PM
jmg committed rG740b879c6ade: arm64: prevent panic when using syscall mux + large arg call (mmap) (authored by jmg).
arm64: prevent panic when using syscall mux + large arg call (mmap)
Aug 19 2025, 11:03 PM

Aug 18 2025

jmg updated the summary of D52005: if the syscall muxes are used, up to two additional argumentsmay be required. This means that the 8 required for mmap increasesup to 10 (for __syscall)..
Aug 18 2025, 8:35 PM
jmg retitled D52005: if the syscall muxes are used, up to two additional argumentsmay be required. This means that the 8 required for mmap increasesup to 10 (for __syscall). from if the syscall muxes are used, up to two additional arguments may be required. This means that the 8 required for mmap increases up to 10 (for __syscall). to if the syscall muxes are used, up to two additional argumentsmay be required. This means that the 8 required for mmap increasesup to 10 (for __syscall)..
Aug 18 2025, 8:33 PM
jmg requested review of D52005: if the syscall muxes are used, up to two additional argumentsmay be required. This means that the 8 required for mmap increasesup to 10 (for __syscall)..
Aug 18 2025, 8:31 PM

Oct 19 2024

jmg committed rG4ad443a106d3: they have been not true since 2012. (authored by jmg).
they have been not true since 2012.
Oct 19 2024, 4:56 AM

Mar 4 2023

jmg added a comment to D38898: virtio_random: pipeline fetching the data... This hides latencies that reach 500us, where otherwise we are busy looping....
In D38898#885654, @jmg wrote:

So, I think what might be wrong is that you don't have another virtio driver to "unstick" the virtio queue. FreeBSD only has drivers for balloon, block, console, network, entropy and scsi. I looked at your config, and the only other device you define that is supported by FreeBSD is balloon. In my config, I'm using both network and block so it's possible that it's working here only because there is additional disk/network traffic causing the rng events to get dequeued...

you can see (part? of) my config at https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=269874
so there is a network driver, but there might not have been much going on

regardless, the fact that virtio_random requires some other driver to unstick its poll queue sounds like a bug in our virtio implementation.

Mar 4 2023, 1:17 AM
jmg added inline comments to D38898: virtio_random: pipeline fetching the data... This hides latencies that reach 500us, where otherwise we are busy looping....
Mar 4 2023, 12:13 AM

Mar 3 2023

jmg added inline comments to D38898: virtio_random: pipeline fetching the data... This hides latencies that reach 500us, where otherwise we are busy looping....
Mar 3 2023, 11:58 PM
jmg added a comment to D38898: virtio_random: pipeline fetching the data... This hides latencies that reach 500us, where otherwise we are busy looping....

rebuilt with this patch, here's the disas:

`Dump of assembler code for function vtrnd_read:

0xffffffff82b05340 <+0>:     55      push   %rbp
0xffffffff82b05341 <+1>:     48 89 e5        mov    %rsp,%rbp
0xffffffff82b05344 <+4>:     41 57   push   %r15
0xffffffff82b05346 <+6>:     41 56   push   %r14
0xffffffff82b05348 <+8>:     41 54   push   %r12
0xffffffff82b0534a <+10>:    53      push   %rbx
0xffffffff82b0534b <+11>:    48 83 ec 10     sub    $0x10,%rsp
0xffffffff82b0534f <+15>:    48 8b 1d 3a 1f 00 00    mov    0x1f3a(%rip),%rbx        # 0xffffffff82b07290 <g_vtrnd_softc>
0xffffffff82b05356 <+22>:    45 31 f6        xor    %r14d,%r14d
0xffffffff82b05359 <+25>:    48 85 db        test   %rbx,%rbx
0xffffffff82b0535c <+28>:    74 4e   je     0xffffffff82b053ac <vtrnd_read+108>
0xffffffff82b0535e <+30>:    80 7b 20 00     cmpb   $0x0,0x20(%rbx)
0xffffffff82b05362 <+34>:    75 48   jne    0xffffffff82b053ac <vtrnd_read+108>
0xffffffff82b05364 <+36>:    41 89 f4        mov    %esi,%r12d
0xffffffff82b05367 <+39>:    49 89 ff        mov    %rdi,%r15
0xffffffff82b0536a <+42>:    48 8b 7b 10     mov    0x10(%rbx),%rdi
0xffffffff82b0536e <+46>:    48 8d 75 dc     lea    -0x24(%rbp),%rsi
0xffffffff82b05372 <+50>:    e8 29 be f0 fd  call   0xffffffff80a111a0 <virtqueue_dequeue>
0xffffffff82b05377 <+55>:    48 85 c0        test   %rax,%rax
0xffffffff82b0537a <+58>:    74 30   je     0xffffffff82b053ac <vtrnd_read+108>

[...]

0xffffffff82b053ac <+108>:   44 89 f0        mov    %r14d,%eax
0xffffffff82b053af <+111>:   48 83 c4 10     add    $0x10,%rsp
0xffffffff82b053b3 <+115>:   5b      pop    %rbx
0xffffffff82b053b4 <+116>:   41 5c   pop    %r12
0xffffffff82b053b6 <+118>:   41 5e   pop    %r14
0xffffffff82b053b8 <+120>:   41 5f   pop    %r15
0xffffffff82b053ba <+122>:   5d      pop    %rbp
0xffffffff82b053bb <+123>:   c3      ret

End of assembler dump.

Mar 3 2023, 11:43 PM
jmg added inline comments to D38898: virtio_random: pipeline fetching the data... This hides latencies that reach 500us, where otherwise we are busy looping....
Mar 3 2023, 10:57 PM
jmg added a reviewer for D38898: virtio_random: pipeline fetching the data... This hides latencies that reach 500us, where otherwise we are busy looping...: csprng.

This change was inspired by noticing that CPU usage was significantly increased when running w/ the virtio_random module loaded. W/o it loaded, the harvest thread was consuming ~.02% cpu, but when it was loaded, it was consuming ~1% CPU (and there's a bug report of it consuming 100% cpu: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=269823 which this would partially fix).

Mar 3 2023, 7:02 PM
jmg requested review of D38898: virtio_random: pipeline fetching the data... This hides latencies that reach 500us, where otherwise we are busy looping....
Mar 3 2023, 6:48 PM
jmg added a reviewer for D38897: stop looping if it fails, we'll try again in 100ms..: csprng.
Mar 3 2023, 6:45 PM
jmg requested review of D38897: stop looping if it fails, we'll try again in 100ms...
Mar 3 2023, 6:44 PM
jmg added a watcher for csprng: jmg.
Mar 3 2023, 6:19 PM
jmg removed a member for csprng: jmg.
Mar 3 2023, 6:18 PM
jmg committed rG144661f94145: note that some arch independent code can live in dev (e.g. SMBios) (authored by jmg).
note that some arch independent code can live in dev (e.g. SMBios)
Mar 3 2023, 9:55 AM
jmg committed rG13597be965b7: length for the 64-bit entry is 32-bits, not 16-bits. (authored by jmg).
length for the 64-bit entry is 32-bits, not 16-bits.
Mar 3 2023, 1:06 AM
jmg committed rG2fee87562948: abstract out the vm detection via smbios.. (authored by jmg).
abstract out the vm detection via smbios..
Mar 3 2023, 12:56 AM
jmg closed D38800: abstract out the vm detection via smbios...
Mar 3 2023, 12:56 AM

Mar 1 2023

jmg added inline comments to D37812: Mechanically convert usb ethernet drivers to DrvAPI.
Mar 1 2023, 1:24 AM

Feb 28 2023

jmg added reviewers for D38813: error out on any error, and ignore two errors that were already ignored (on cross builds w/o qemu)...: cperciva, gjb.
Feb 28 2023, 1:33 AM

Feb 27 2023

jmg updated the diff for D38800: abstract out the vm detection via smbios...

not sure how it included a file AFTER the commit hash, but arc is
weird.. hopefully this will work..

Feb 27 2023, 11:26 PM
jmg added a comment to D38800: abstract out the vm detection via smbios...

done.

Feb 27 2023, 11:24 PM
jmg updated the diff for D38800: abstract out the vm detection via smbios...

implement kib's comments

Feb 27 2023, 11:23 PM
jmg requested review of D38813: error out on any error, and ignore two errors that were already ignored (on cross builds w/o qemu)....
Feb 27 2023, 9:39 PM

Feb 26 2023

jmg requested review of D38800: abstract out the vm detection via smbios...
Feb 26 2023, 7:07 PM

Feb 24 2023

jmg closed D38762: make cross build from arm64 work...
Feb 24 2023, 10:26 PM
jmg committed rGeb81dd8404e5: make cross build from arm64 work.. (authored by jmg).
make cross build from arm64 work..
Feb 24 2023, 10:26 PM
jmg requested review of D38762: make cross build from arm64 work...
Feb 24 2023, 6:47 PM

Feb 22 2023

jmg closed D38721: Support SMBIOS v3 for 64-bit entry systems.
Feb 22 2023, 4:32 AM
jmg committed rGee97f198b42d: Support SMBIOS v3 for 64-bit entry systems (authored by jmg).
Support SMBIOS v3 for 64-bit entry systems
Feb 22 2023, 4:32 AM
jmg updated the diff for D38721: Support SMBIOS v3 for 64-bit entry systems.

wrong change made it, this fully addresses comments

Feb 22 2023, 3:30 AM
jmg updated the diff for D38721: Support SMBIOS v3 for 64-bit entry systems.

address style comments

Feb 22 2023, 3:28 AM
jmg added a comment to D38721: Support SMBIOS v3 for 64-bit entry systems.

Ok, will update the patch in a second, also forgot to include the output of the result:

root@freebsd:~ # kenv | grep ^smbios
smbios.bios.reldate="02/06/2015"
smbios.bios.revision="0.0"
smbios.bios.vendor="EFI Development Kit II / OVMF"
smbios.bios.version="0.0.0"
smbios.chassis.maker="QEMU"
smbios.chassis.type="Other"
smbios.chassis.version="virt-7.1"
smbios.memory.enabled="4194304"
smbios.socket.enabled="1"
smbios.socket.populated="1"
smbios.system.maker="QEMU"
smbios.system.product="QEMU Virtual Machine"
smbios.system.version="virt-7.1"
smbios.version="3.0"
Feb 22 2023, 3:23 AM
jmg requested review of D38721: Support SMBIOS v3 for 64-bit entry systems.
Feb 22 2023, 2:31 AM

May 26 2022

jmg committed rG35dc7f8f5dcd: dhclient: test against a real (ISC) dhcp server (authored by jmg).
dhclient: test against a real (ISC) dhcp server
May 26 2022, 12:08 AM
jmg closed D35178: Add end to end tests for dhclient.
May 26 2022, 12:08 AM

May 23 2022

jmg added inline comments to D35178: Add end to end tests for dhclient.
May 23 2022, 10:27 PM

May 14 2022

jmg added a comment to D4964: Protect calls to explicit_bzero() via by explicitly disabling the link-time and other optimizations that can cause code elimination..

So, spent a few minutes looking into this, my testing was done on:

FreeBSD gate4 14.0-CURRENT FreeBSD 14.0-CURRENT #0 main-n255198-1907e1c07c3: Thu May  5 07:52:56 UTC 2022     root@releng1.nyi.freebsd.org:/usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64
May 14 2022, 12:02 AM

May 13 2022

jmg added a comment to D35178: Add end to end tests for dhclient.

New patch has addressed a few of the comments.

May 13 2022, 11:08 PM
jmg updated the diff for D35178: Add end to end tests for dhclient.

Addresses a few of the comments.

May 13 2022, 11:07 PM
jmg added inline comments to D35178: Add end to end tests for dhclient.
May 13 2022, 11:01 PM
jmg added a comment to D35178: Add end to end tests for dhclient.

Thanks, will address a few of the comments.

May 13 2022, 10:58 PM

May 12 2022

jmg requested review of D35178: Add end to end tests for dhclient.
May 12 2022, 12:45 AM

May 11 2022

jmg committed rG50dd2ceaea44: update command to one that will actually give results (authored by jmg).
update command to one that will actually give results
May 11 2022, 3:18 AM

Apr 13 2022

jmg added a comment to D34896: strcpy(3): Explicitly mention the recommended usage of strlcpy().

I'll second the usage of Em or Sy, I'm a bit nervous about Sy, being symbolic, and how it'll format when using a proportional font (e.g. printed).

Apr 13 2022, 10:13 PM

Dec 23 2021

jmg added inline comments to D33626: schedgraph.py: port to Python 3.
Dec 23 2021, 11:00 PM

Dec 13 2021

jmg committed R9:47a5a8a623cb: update expiration date of my key.. (authored by jmg).
update expiration date of my key..
Dec 13 2021, 11:03 PM

Jun 29 2021

jmg committed rG3d5104182c2e: ued may be NULL here which will cause a panic... reproducable by (authored by jmg).
ued may be NULL here which will cause a panic... reproducable by
Jun 29 2021, 1:11 AM

Jun 26 2021

jmg committed rGb43d600c839a: Add support for link status, media and VLAN MTU (if supported) to if_cdce... (authored by jmg).
Add support for link status, media and VLAN MTU (if supported) to if_cdce...
Jun 26 2021, 12:58 AM
jmg closed D30625: add support for media and link change events to CDCE..
Jun 26 2021, 12:58 AM

Jun 24 2021

jmg added a comment to D30625: add support for media and link change events to CDCE..

Thanks for catching the compile issue. I hacked the modules to compile w/ debug, so missed the bug compiling w/o.

Jun 24 2021, 10:33 PM
jmg updated the diff for D30625: add support for media and link change events to CDCE..
  • make compile w/o USB_DEBUG defined...
Jun 24 2021, 10:28 PM
jmg updated the diff for D30625: add support for media and link change events to CDCE..

update to support VLAN MTU...

Jun 24 2021, 6:06 AM

Jun 3 2021

jmg added inline comments to D30625: add support for media and link change events to CDCE..
Jun 3 2021, 7:43 PM
jmg added a comment to D30625: add support for media and link change events to CDCE..

Let me know more about the CDCE_IND_SIZE_MAX constant.

Jun 3 2021, 5:57 PM
jmg requested review of D30625: add support for media and link change events to CDCE..
Jun 3 2021, 6:05 AM

May 4 2021

jmg added a comment to D26305: search does not work with multiple sites listed.

No, this needs to be updated to the new website.

May 4 2021, 6:54 PM

Apr 21 2021

jmg accepted D29748: rc: fix dependencies for growfs.

looks good.

Apr 21 2021, 8:51 PM

Apr 15 2021

jmg added a comment to D29748: rc: fix dependencies for growfs.

Makes perfect sense, but growfs depends on awk(1), which might be on a separate /usr, which gets mounted by mountcritlocal, which runs after root.

I wonder if it would be possible to somehow extend geom(8) to make the walk through the hierarchy easier, to not require complicated text processing?

Apr 15 2021, 12:49 AM

Apr 13 2021

jmg added a comment to D29748: rc: fix dependencies for growfs.

Do you remember any details about the bug, or the testing setup?

The problem with current ordering is that it's not really defined when the sysctl script runs - it has no dependencies, so it's up to rcorder(8), and from what I've seen it's not very stable about sorting.

Apr 13 2021, 10:59 PM
jmg added a comment to D29748: rc: fix dependencies for growfs.

Looking at the comment in the original commit:

# TODO: Figure out where this should really be ordered.
# I suspect it should go just after fsck but before mountcritlocal
# but it's hard to tell for sure because of the bug described
# below.
Apr 13 2021, 6:49 PM

Apr 6 2021

jmg committed rGb8028f9d3ca0: add Xr to the rc.d script... (authored by jmg).
add Xr to the rc.d script...
Apr 6 2021, 11:34 PM

Mar 16 2021

jmg added inline comments to D29268: armv8crypto: add some missing copyright statements.
Mar 16 2021, 11:43 PM
jmg added a comment to D29268: armv8crypto: add some missing copyright statements.

the phrase "This file derived from" has no history in our tree, I'd prefer the phrase I proposed.

Mar 16 2021, 9:50 PM

Mar 15 2021

jmg added a comment to D29268: armv8crypto: add some missing copyright statements.

Thank you.

Mar 15 2021, 9:11 PM

Mar 6 2021

jmg added a comment to D29007: address a performance problem w/ partial sscanf on long strings....

Ok, the results from an arm64 run (A53, Pine64 A64-LTS).

Mar 6 2021, 2:41 AM

Mar 3 2021

jmg added a comment to D29007: address a performance problem w/ partial sscanf on long strings....
In D29007#650040, @cem wrote:
In D29007#649973, @jmg wrote:
In D29007#649700, @cem wrote:

Is 128 a reasonable chunk here? How does it relate to the internal buffering of FILE?

I'm going to run some perf numbers on ARM, but w/ the attached file w/ benchmarks, it looks like the chunk should be closer to 16.

That sounds about right if we're optimizing for single conversions (%d, %g, whatever) at the start of long input strings. Does the small size penalize larger conversions much? It seems like we'll be bouncing around _vsscanf_read every N bytes now. (I wonder how common the GTA use case actually is.)

Mar 3 2021, 7:07 PM
jmg added a comment to D29007: address a performance problem w/ partial sscanf on long strings....
In D29007#649700, @cem wrote:

Is 128 a reasonable chunk here? How does it relate to the internal buffering of FILE?

Mar 3 2021, 2:35 AM

Mar 2 2021

jmg added a comment to D29007: address a performance problem w/ partial sscanf on long strings....

strlen tests pass:

freebsd@test:/usr/tests $ kyua test lib/libc/string/strlen_test
lib/libc/string/strlen_test:strlen_basic  ->  passed  [0.004s]
lib/libc/string/strlen_test:strlen_huge  ->  passed  [0.027s]
lib/libc/string/strlen_test:strnlen_basic  ->  passed  [0.004s]
Mar 2 2021, 12:39 AM
jmg added a comment to D29007: address a performance problem w/ partial sscanf on long strings....

address comments.

Mar 2 2021, 12:26 AM
jmg updated the diff for D29007: address a performance problem w/ partial sscanf on long strings....
  • address brooks's comments,
Mar 2 2021, 12:25 AM
jmg added a comment to D29007: address a performance problem w/ partial sscanf on long strings....

style(9) uses \0 exclusively, so I guess I'll change.

Mar 2 2021, 12:21 AM
jmg updated the diff for D29007: address a performance problem w/ partial sscanf on long strings....
  • use a more common spelling of NUL...
Mar 2 2021, 12:20 AM
jmg added a comment to D29007: address a performance problem w/ partial sscanf on long strings....

Attached is a set of benchmarks. First number is chunk size, second number is number of 0's in the string that is sscanf'd.
Bench (results from an amd64, AMD PRO A10-8770E, 2.8GHz):

Mar 2 2021, 12:10 AM
jmg added a comment to D29007: address a performance problem w/ partial sscanf on long strings....

The strnlen will be committed as a separate commit, likely before this change, as this change depends upon it for performance.

Mar 2 2021, 12:04 AM
jmg requested review of D29007: address a performance problem w/ partial sscanf on long strings....
Mar 2 2021, 12:02 AM