Page MenuHomeFreeBSD

markj (Mark Johnston)
User

Projects (10)

User Details

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

Recent Activity

Today

markj added a comment to D55902: snd_uaudio: Merge umidi_init() with umidi_attach().

From what I can see, now, we initialize the mutex only if sc_midi_chan.valid is true, but we will destroy it unconditionally, so we might destroy an uninitialized mutex.

Thu, Mar 19, 8:18 AM
markj added inline comments to D55901: snd_uaudio: Introduce umidi_probe().
Thu, Mar 19, 8:15 AM
markj accepted D55900: snd_uaudio: Rename umidi_probe() to umidi_attach().
Thu, Mar 19, 8:08 AM
markj accepted D55916: snd_uaudio: Simplify umidi_probe().
Thu, Mar 19, 7:57 AM
markj added a comment to D55604: hwpstate_amd: Refactor by brancless version.

The commit log message should be a bit more explicit. Describing the implementation as "branchless" makes it sound like you are micro-optimizing the code to avoid branches, but really this change is just factoring out the backend of the driver into separate functions. I presume this is to make the code easier to read and modify.

Thu, Mar 19, 7:20 AM
markj accepted D55931: amd64: remove assertion about sizeof(struct pcb).
Thu, Mar 19, 7:05 AM

Sun, Mar 15

markj accepted D54441: asmc: add raw SMC key read/write interface.
Sun, Mar 15, 1:50 AM
markj accepted D55831: x86 FRED: add hardware definitions for the trap frames fields.
Sun, Mar 15, 1:47 AM
markj accepted D55809: amd64: move code to check for traps with interrupts disabled into helpers.
Sun, Mar 15, 1:42 AM
markj updated the diff for D55852: kqueue: Fix a race when adding an fd-based knote to a queue.

Add an isfd check

Sun, Mar 15, 1:36 AM

Sat, Mar 14

markj accepted D54073: bhyve/virtio-scsi: Make all I/O processing parameters configurable.
Sat, Mar 14, 3:06 AM
markj accepted D53223: bhyve/virtio-scsi: Support multiple backends.
Sat, Mar 14, 3:05 AM
markj added inline comments to D53222: bhyve/virtio-scsi: Implement task management functions.
Sat, Mar 14, 3:02 AM
markj accepted D53221: bhyve/virtio-scsi: Support for multiple targets.
Sat, Mar 14, 2:54 AM
markj requested review of D55852: kqueue: Fix a race when adding an fd-based knote to a queue.
Sat, Mar 14, 2:21 AM
markj accepted D55790: timerfd: Fix interval callout scheduling.
Sat, Mar 14, 1:06 AM
markj added inline comments to D54441: asmc: add raw SMC key read/write interface.
Sat, Mar 14, 1:03 AM
markj accepted D55809: amd64: move code to check for traps with interrupts disabled into helpers.
Sat, Mar 14, 1:00 AM
markj added a comment to D55789: timerfd: Add tests.

A bit tangential, but: we found a while back that it was possible to trivially livelock a core by scheduling timeouts of 1ns using EVFILT_TIMER or setitimer(). Basically, it takes longer than the callout interval to execute the callout handler, so the callout handler ends up running in a loop.

I should note that the current timerfd implementation fails to pass the timerfd__periodic_timer_performance test, which expects 400000000 individual nanosecond timeouts. I usually see 360000000 - 380000000 timeouts printed by the test case. I'm not sure if this performance issue is related to the core livelock in some way. The callout routine (timerfd_expire()) is fairly lightweight, specifying absolute expiration time with maximum precision (no C_PREL() or pr specified).

Sat, Mar 14, 12:58 AM
markj added inline comments to D55831: x86 FRED: add hardware definitions for the trap frames fields.
Sat, Mar 14, 12:52 AM
markj added a comment to D55670: virtual_oss: Define a default control device for /dev/dsp.

I'm thinking about this again and I'm suspecting this will make things very inflexible. I think that instead of patching virtual_oss, it might be better to have an environment variable that specifies the control device name, and let devd use that. @markj What do you think?

As I understand it, the basic problem is that virtual_oss is providing a virtual audio device, and there's an associated control device, and there is no mechanism to figure out the control device name from the audio device name, aside from looking at whatever's configured in rc.conf.

Can virtual_oss create files under /var/run which provide this mapping? Similar to a pidfile, it could create /var/run/virtual_oss.dsp at startup, and the file would contain the path to the control device. Then snd.conf would contain something like action "/usr/sbin/virtual_oss_cmd $(cat /var/run/virtual_oss.${cdev}) -R /dev/${cdev}". I'm pretty sure devd can perform substitutions like that, the devd.conf man page has an example of it.

The thing is that if we want to be flexible, we cannot know which control device the user wants to use. Perhaps the user wants to use a control device for a virtual_oss instance that does not replace /dev/dsp, hence why an environment variable that is easily modifiable might be simpler. Not sure yet.

Sat, Mar 14, 12:13 AM

Wed, Mar 11

markj added a comment to D55792: timerfd: Use saturating sbintime conversions.

Is this covered by the timerfd tests you posted already?

Wed, Mar 11, 2:38 AM
markj updated subscribers of D55789: timerfd: Add tests.

A bit tangential, but: we found a while back that it was possible to trivially livelock a core by scheduling timeouts of 1ns using EVFILT_TIMER or setitimer(). Basically, it takes longer than the callout interval to execute the callout handler, so the callout handler ends up running in a loop.

Wed, Mar 11, 2:34 AM
markj added a comment to D55789: timerfd: Add tests.

I think the tests are ok, though as before the errno checking doesn't seem very useful. I'm also not sure about this leak detection stuff, I would probably inline it into the timerfd.c tests if we're going to keep it. With ATF each test runs in its own process so fd leaks aren't really a problem, and many existing test cases are not careful to close fds.

Wed, Mar 11, 2:27 AM
markj added inline comments to D55790: timerfd: Fix interval callout scheduling.
Wed, Mar 11, 2:19 AM
markj accepted D55791: sys/time: Add saturating sbt conversions.
Wed, Mar 11, 2:07 AM
markj accepted D55750: sigreturn.2: refresh the man page.
Wed, Mar 11, 1:56 AM
markj added a comment to D55670: virtual_oss: Define a default control device for /dev/dsp.

I'm thinking about this again and I'm suspecting this will make things very inflexible. I think that instead of patching virtual_oss, it might be better to have an environment variable that specifies the control device name, and let devd use that. @markj What do you think?

Wed, Mar 11, 1:52 AM

Tue, Mar 10

markj added a comment to D55670: virtual_oss: Define a default control device for /dev/dsp.

It's hard for me to understand what this change does, or the tradeoffs involved, without a commit log message.

Tue, Mar 10, 2:11 AM
markj added inline comments to D55790: timerfd: Fix interval callout scheduling.
Tue, Mar 10, 1:54 AM
markj added a comment to D55765: dtrace: Improve dmesg kernel message prefix.

I think this is fine. It's a bit of layering violation since opensolaris is supposed to be able to serve multiple consumers (dtrace and ZFS in the past, just dtrace now). I'm in favour of converting assertion and print function calls in dtrace to just using FreeBSD interfaces directly.

Tue, Mar 10, 1:49 AM
markj added inline comments to D55750: sigreturn.2: refresh the man page.
Tue, Mar 10, 1:46 AM
markj accepted D55755: p9fs: fix panic in freevnode when vfs_hash_insert finds a duplicate.

Looks ok to me.

Tue, Mar 10, 1:43 AM
markj accepted D55665: p9fs: locking improvements for p9fs_stat_vnode_dotl().
Tue, Mar 10, 1:23 AM
markj accepted D55671: virtual_oss: Combine -d, -l and -L option getopt code.
Tue, Mar 10, 1:19 AM

Sun, Mar 8

markj added inline comments to D55665: p9fs: locking improvements for p9fs_stat_vnode_dotl().
Sun, Mar 8, 1:27 AM
markj added inline comments to D55671: virtual_oss: Combine -d, -l and -L option getopt code.
Sun, Mar 8, 1:19 AM
markj added inline comments to D55671: virtual_oss: Combine -d, -l and -L option getopt code.
Sun, Mar 8, 1:17 AM
markj added inline comments to D55665: p9fs: locking improvements for p9fs_stat_vnode_dotl().
Sun, Mar 8, 1:13 AM
markj added a comment to D55661: inpcb: apply smr_advance(9)/smr_wait(9) trick only to reusable sockets.

I don't see a point in clearing the addresses either. Speculatively (didn't check!) it should even fix getsockname(2) on a disconnected TCP connection.

Sun, Mar 8, 1:08 AM
markj accepted D55681: vn_delayed_setsize(): post-commit review' changes.
Sun, Mar 8, 12:46 AM

Sat, Mar 7

markj added a comment to D55661: inpcb: apply smr_advance(9)/smr_wait(9) trick only to reusable sockets.

This removes the smr_advance() calls, but also the clearing of the addr/port. Is it intentional?

Sat, Mar 7, 12:40 AM
markj accepted D55665: p9fs: locking improvements for p9fs_stat_vnode_dotl().
Sat, Mar 7, 12:27 AM
markj accepted D55679: x86: change signatures of ipi_{bitmap,swi}_handler() to take pointer.
Sat, Mar 7, 12:22 AM
markj added inline comments to D55681: vn_delayed_setsize(): post-commit review' changes.
Sat, Mar 7, 12:19 AM

Thu, Mar 5

markj added inline comments to D55595: vn_delayed_setsize().
Thu, Mar 5, 11:58 PM
markj added inline comments to D55595: vn_delayed_setsize().
Thu, Mar 5, 11:55 PM
markj accepted D55539: Add renameat(2) and AT_RENAME_NOREPLACE flag for it.
Thu, Mar 5, 11:38 PM
markj added a comment to D55536: vm_fault: Avoid creating clean, writeable superpage mappings.

I only see the "upgrading to write fault" for many processes. Tested with both xfce and plasma. Seems like all the apps that initiate graphics get reported by the message (xfwm4, firefox, plasmashell, Xorg, etc)

Thu, Mar 5, 11:33 PM
markj added inline comments to D55579: splice: optionally limit worker queues.
Thu, Mar 5, 11:20 PM
markj added a reviewer for D55678: krb5, kerberos5: Remove no-undefined linker option: krb5.
Thu, Mar 5, 11:07 PM

Wed, Mar 4

markj added a comment to D55536: vm_fault: Avoid creating clean, writeable superpage mappings.
In D55536#1271983, @alc wrote:

@markj Do we know if there is actually a mix of clean and dirty pages being mapped?

Wed, Mar 4, 1:09 AM
markj updated the diff for D55536: vm_fault: Avoid creating clean, writeable superpage mappings.

Add some prints

Wed, Mar 4, 1:09 AM
markj accepted D55539: Add renameat(2) and AT_RENAME_NOREPLACE flag for it.
Wed, Mar 4, 12:56 AM
markj added inline comments to D55579: splice: optionally limit worker queues.
Wed, Mar 4, 12:51 AM
markj accepted D53470: bhyve/virtio-scsi: Check LUN address validity.
Wed, Mar 4, 12:37 AM
markj accepted D53469: bhyve/virtio-scsi: Preallocate all I/O requests.
Wed, Mar 4, 12:36 AM
markj accepted D53468: bhyve/virtio: Rework iovec handling functions for efficiency and clarity.
Wed, Mar 4, 12:34 AM

Mon, Mar 2

markj accepted D55539: Add renameat(2) and AT_RENAME_NOREPLACE flag for it.
Mon, Mar 2, 9:55 AM

Sun, Mar 1

markj added inline comments to D55539: Add renameat(2) and AT_RENAME_NOREPLACE flag for it.
Sun, Mar 1, 3:55 PM
markj added inline comments to D55539: Add renameat(2) and AT_RENAME_NOREPLACE flag for it.
Sun, Mar 1, 3:47 PM
markj added a comment to D55539: Add renameat(2) and AT_RENAME_NOREPLACE flag for it.

Is my understanding correct that it is not supposed to work with ZFS yet?

Sun, Mar 1, 12:41 PM

Fri, Feb 27

markj accepted D55508: power: Power device and ioctl for state transitions.
Fri, Feb 27, 9:52 PM
markj added inline comments to D55536: vm_fault: Avoid creating clean, writeable superpage mappings.
Fri, Feb 27, 9:47 PM
markj updated the diff for D55536: vm_fault: Avoid creating clean, writeable superpage mappings.

Rather than preemptively dirtying pages, make the map read-only unless all pages are already dirty.

Fri, Feb 27, 9:46 PM
markj added inline comments to D55536: vm_fault: Avoid creating clean, writeable superpage mappings.
Fri, Feb 27, 9:33 PM
markj added inline comments to D55536: vm_fault: Avoid creating clean, writeable superpage mappings.
Fri, Feb 27, 5:25 PM
markj added a comment to D55508: power: Power device and ioctl for state transitions.

Looks ok with one nit fixed.

Fri, Feb 27, 3:23 PM
markj accepted D55560: vnet: Ensure space allocated by vnet_data_alloc() is properly aligned.
Fri, Feb 27, 3:20 PM
markj added a comment to D55557: param: Refactor rounddown.

Does it actually make a difference in generated code? I would expect a compiler to be able to do this transformation.

Fri, Feb 27, 3:15 PM

Thu, Feb 26

markj accepted D55548: divert: unbreak the LINT-NOIP build.

Thank you.

Thu, Feb 26, 11:14 PM
markj committed rG5547a7bb39ac: divert: Use a better source identifier for netisr_queue_src() calls (authored by markj).
divert: Use a better source identifier for netisr_queue_src() calls
Thu, Feb 26, 8:26 PM
markj closed D55537: divert: Use a better source identifier for netisr_queue_src() calls.
Thu, Feb 26, 8:26 PM
markj added inline comments to D55508: power: Power device and ioctl for state transitions.
Thu, Feb 26, 8:00 PM
markj requested review of D55537: divert: Use a better source identifier for netisr_queue_src() calls.
Thu, Feb 26, 6:40 PM
markj added a comment to D55525: pmap_enter: always pass PG_M to pmap_enter_pde if PG_RW is set.

https://reviews.freebsd.org/D55536 is my attempt at a solution.

Thu, Feb 26, 6:39 PM
markj requested review of D55536: vm_fault: Avoid creating clean, writeable superpage mappings.
Thu, Feb 26, 6:38 PM
markj added a comment to D55525: pmap_enter: always pass PG_M to pmap_enter_pde if PG_RW is set.

vm_fault_soft_fast() is careful to create a writable superpage mapping only if all constituent pages are dirty. In that case it will preset PG_M by setting fs->fault_type |= VM_PROT_WRITE. More generally, there is an invariant that writable superpage mappings are dirty, which is what the assertion is complaining about.

vm_fault_populate() does not preset VM_PROT_WRITE, even though it marks all constituent pages dirty at the MI layer (though I'm not 100% sure why it does that unconditionally... what if the mapping is read-only?). I think this is an oversight, so this might be a better solution:

Thu, Feb 26, 6:16 PM
markj updated subscribers of D55525: pmap_enter: always pass PG_M to pmap_enter_pde if PG_RW is set.
Thu, Feb 26, 6:04 PM
markj added a comment to D55525: pmap_enter: always pass PG_M to pmap_enter_pde if PG_RW is set.

vm_fault_soft_fast() is careful to create a writable superpage mapping only if all constituent pages are dirty. In that case it will preset PG_M by setting fs->fault_type |= VM_PROT_WRITE. More generally, there is an invariant that writable superpage mappings are dirty, which is what the assertion is complaining about.

Thu, Feb 26, 6:04 PM
markj added inline comments to D55517: diff3: Code cleanup.
Thu, Feb 26, 2:42 PM
markj added inline comments to D55508: power: Power device and ioctl for state transitions.
Thu, Feb 26, 2:41 PM
markj committed rG6ed373227680: nullfs: Fix handling of doomed vnodes in nullfs_unlink_lowervp() (authored by markj).
nullfs: Fix handling of doomed vnodes in nullfs_unlink_lowervp()
Thu, Feb 26, 2:59 AM
markj added inline comments to D55524: diskinfo: Add libxo support to diskinfo.
Thu, Feb 26, 12:10 AM

Wed, Feb 25

markj added a comment to D55399: lpd: Improve robustness.
In D55399#1270409, @des wrote:

I'm not sure about a 3 day MFC timeout, but I'm also not sure that any significant number of people are using this code on main.

I assumed that we'd want to merge it quickly to 15 and especially 14...

Wed, Feb 25, 10:08 PM
markj accepted D55399: lpd: Improve robustness.

I'm not sure about a 3 day MFC timeout, but I'm also not sure that any significant number of people are using this code on main.

Wed, Feb 25, 9:02 PM
markj added a comment to D55508: power: Power device and ioctl for state transitions.

Why exactly do you use a device interface rather than a sysctl? Is it just to make the functionality available to non-root users (i.e., members of the operator group)?

Wed, Feb 25, 6:08 PM
markj committed rG8b64d46fab87: nullfs: Fix handling of doomed vnodes in nullfs_unlink_lowervp() (authored by markj).
nullfs: Fix handling of doomed vnodes in nullfs_unlink_lowervp()
Wed, Feb 25, 5:10 PM
markj closed D55446: nullfs: Fix handling of doomed vnodes in nullfs_unlink_lowervp().
Wed, Feb 25, 5:10 PM

Tue, Feb 24

markj added inline comments to D55399: lpd: Improve robustness.
Tue, Feb 24, 4:29 PM
markj committed rG9d3e842358b4: Add UPDATING entries and bump version (authored by markj).
Add UPDATING entries and bump version
Tue, Feb 24, 4:06 PM
markj committed rGc2e2bfbd9e09: rtsock: Fix stack overflow (authored by markj).
rtsock: Fix stack overflow
Tue, Feb 24, 4:06 PM
markj committed rG933abe4a1940: amd64/conf: Remove a config committed by accident (authored by markj).
amd64/conf: Remove a config committed by accident
Tue, Feb 24, 4:06 PM
markj committed rGecec5410875f: unix/tests: Add a regression test for fd transfer across jails (authored by markj).
unix/tests: Add a regression test for fd transfer across jails
Tue, Feb 24, 4:06 PM
markj committed rGe6b96891ef7c: unix: Set O_RESOLVE_BENEATH on fds transferred between jails (authored by markj).
unix: Set O_RESOLVE_BENEATH on fds transferred between jails
Tue, Feb 24, 4:06 PM
markj committed rG82cee749b523: file: Add a fd flag with O_RESOLVE_BENEATH semantics (authored by markj).
file: Add a fd flag with O_RESOLVE_BENEATH semantics
Tue, Feb 24, 4:05 PM
markj committed rG0b18e4842c9d: file: Qualify pointers to capsicum rights as const (authored by markj).
file: Qualify pointers to capsicum rights as const
Tue, Feb 24, 4:05 PM
markj committed rG8b476ffc4ea3: rtsock: Fix stack overflow (authored by markj).
rtsock: Fix stack overflow
Tue, Feb 24, 4:04 PM
markj committed rG7465d0b094b7: rtsock: Fix stack overflow (authored by markj).
rtsock: Fix stack overflow
Tue, Feb 24, 4:03 PM
markj committed rG24c55170cef4: Add UPDATING entries and bump version (authored by markj).
Add UPDATING entries and bump version
Tue, Feb 24, 4:02 PM