Page MenuHomeFreeBSD

jmg (John-Mark Gurney)
User

Projects

User Details

User Since
Sep 2 2014, 10:55 PM (515 w, 3 d)

Recent Activity

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

Feb 17 2021

jmg abandoned D3084: add option to invert data set so you can convert seconds into per seconds...

As "more" correct term was never provided, and phk also didn't like this change, no point in keeping this open.

Feb 17 2021, 12:06 AM
jmg abandoned D2651: libcpufeats and amd64 assembly for sha256.

I have no plans to work on this in the future. Someone else is free to take this over and get it committed.

Feb 17 2021, 12:03 AM

Jan 21 2021

jmg added a comment to D26538: Add SIOCGIFDATA.

Compat with what? There is no code in the FreeBSD source tree that uses it, and no releases have this ioctl. It hasn't even been merged to 12-stable yet.

Future backwards compat - i.e. introduce the new ioctl if and when we extend if_data.

Jan 21 2021, 9:25 PM
jmg added a comment to D26538: Add SIOCGIFDATA.
In D26538#632166, @jmg wrote:

I know this was closed and committed, but I want to get some more discussion on this.

I happen to be reviewing this for my own code (to get at _hwassist), and noticed that the code does not check how much space the program allocated for the if_data structure. This means that as the interface stands, it cannot be expanded, ever in the future, as it'll break old programs when they use this.

Why can't we change the ioctl number and keep the old one for compat?

Jan 21 2021, 8:56 PM
jmg reopened D26538: Add SIOCGIFDATA.

I know this was closed and committed, but I want to get some more discussion on this.

Jan 21 2021, 2:11 AM

Jan 19 2021

jmg committed rGfd11270509f2: add missing .Xr.. (authored by jmg).
add missing .Xr..
Jan 19 2021, 10:25 PM

Dec 13 2020

jmg committed R9:21b7427a8777: make the Makefile a bit more friendly to forieng configurations... (authored by jmg).
make the Makefile a bit more friendly to forieng configurations...
Dec 13 2020, 8:11 PM
jmg committed R9:5038e5588ef5: Hasty is out of order. Put him in his proper place. :) (authored by jmg).
Hasty is out of order. Put him in his proper place. :)
Dec 13 2020, 8:08 PM
jmg committed R9:19bbbdf4d0c9: fix a mistyping of mistype (authored by jmg).
fix a mistyping of mistype
Dec 13 2020, 7:54 PM
jmg committed R9:7e8c48d2b030: add Alfred Perlstein <bright@rush.net> for PR/12780... (authored by jmg).
add Alfred Perlstein <bright@rush.net> for PR/12780...
Dec 13 2020, 7:54 PM
jmg committed R9:ad12315b5420: add my pgp key to the rest... (authored by jmg).
add my pgp key to the rest...
Dec 13 2020, 7:45 PM
jmg committed R9:547de0e14375: move wosch's entry into line... talking with billf on irc it appears that (authored by jmg).
move wosch's entry into line... talking with billf on irc it appears that
Dec 13 2020, 7:44 PM
jmg committed R9:de1d5b1b2664: Announce that I'm back. (authored by jmg).
Announce that I'm back.
Dec 13 2020, 7:03 PM
jmg committed R9:abacb57ffe5f: Move myself from the Alumni back into the Developers section now that (authored by jmg).
Move myself from the Alumni back into the Developers section now that
Dec 13 2020, 7:03 PM
jmg committed R9:bdac1971333d: Update Ted's year he started. Gleaned from the old avail file: (authored by jmg).
Update Ted's year he started. Gleaned from the old avail file:
Dec 13 2020, 7:03 PM
jmg committed R9:5f5253cab020: update if_sk, and add if_re, both have been locked down for a while now.. (authored by jmg).
update if_sk, and add if_re, both have been locked down for a while now..
Dec 13 2020, 6:29 PM
jmg committed R9:c4e70f7290bc: spell N/A using the entity... (authored by jmg).
spell N/A using the entity...
Dec 13 2020, 6:29 PM
jmg committed R9:4eef766cbf7b: add request for fast AMD64 box for build support... (authored by jmg).
add request for fast AMD64 box for build support...
Dec 13 2020, 6:10 PM

Dec 10 2020

jmg committed rS368529: fix up documentation/comments: processname is not defined, but programname.
fix up documentation/comments: processname is not defined, but programname
Dec 10 2020, 11:24 PM

Dec 1 2020

jmg committed rS368267: add documentation that the rules need to be reloaded, and how to do it....
add documentation that the rules need to be reloaded, and how to do it...
Dec 1 2020, 11:25 PM

Nov 19 2020

jmg added a comment to D27279: if: Protect V_ifnet in vnet_if_return().

can't say how correct this is, but it'll be great to have it fixed!

Nov 19 2020, 6:46 PM

Nov 6 2020

jmg committed rS367434: fix up docs, if signature checking is enabled, the file MUST exist....
fix up docs, if signature checking is enabled, the file MUST exist...
Nov 6 2020, 10:11 PM
jmg added a comment to D26617: Rename DISTDIR to RELDISTDIR to avoid clash with ports DISTDIR defined in make.conf.

Yes, can we please get this committed ASAP? I just spent some time debugging this problem. (Other solution would be for base not to read /etc/make.conf, but I have a feeling this commit is more likely.)

Nov 6 2020, 12:33 AM

Nov 4 2020

jmg committed rS367354: fix the docs, this was always wrong... In some cases, DISTDIR is set.
fix the docs, this was always wrong... In some cases, DISTDIR is set
Nov 4 2020, 11:26 PM

Oct 26 2020

jmg committed rS367048: update write(2)'s iovec limit w/ info about the iosize_max_clamp sysctl....
update write(2)'s iovec limit w/ info about the iosize_max_clamp sysctl...
Oct 26 2020, 12:37 AM

Oct 8 2020

jmg updated the diff for D26713: enable firstboot configuration for arm images.
  • minor spelling and grammar fixups. (was originally included)
  • revert this change... (release.sh)
  • remove whitespace at end of the copyright lines..
Oct 8 2020, 6:53 PM
jmg added inline comments to D26713: enable firstboot configuration for arm images.
Oct 8 2020, 12:21 AM