Page MenuHomeFreeBSD
Feed Advanced Search

Mar 6 2019

markj closed D19171: Add RISC-V minidump support to libkvm.
Mar 6 2019, 12:00 AM

Mar 5 2019

markj closed D19170: Initialize dump_avail on RISC-V.
Mar 5 2019, 11:58 PM
markj committed rS344828: Initialize dump_avail[] on riscv..
Initialize dump_avail[] on riscv.
Mar 5 2019, 11:58 PM
markj committed rS344827: Add pmap_get_tables() for riscv..
Add pmap_get_tables() for riscv.
Mar 5 2019, 11:57 PM
markj closed D18321: RISC-V: Add definition for pmap_get_tables().
Mar 5 2019, 11:57 PM
markj committed rS344823: Show wiring state of map entries in procstat -v..
Show wiring state of map entries in procstat -v.
Mar 5 2019, 7:45 PM
markj closed D19461: Show wiring state of map entries in procstat -v..
Mar 5 2019, 7:45 PM
markj committed rS344822: MFC r344600:.
MFC r344600:
Mar 5 2019, 7:41 PM
markj committed rS344821: MFC r344600:.
MFC r344600:
Mar 5 2019, 7:41 PM
markj committed rS344820: MFC r344278:.
MFC r344278:
Mar 5 2019, 7:39 PM
markj committed rS344819: MFC r344278:.
MFC r344278:
Mar 5 2019, 7:37 PM

Mar 4 2019

markj added inline comments to D19461: Show wiring state of map entries in procstat -v..
Mar 4 2019, 10:21 PM
markj updated the diff for D19461: Show wiring state of map entries in procstat -v..
  • Change man page wording.
  • Call the flag KVME_FLAG_USER_WIRED; we do not set it if the mapping is wired by vslock().
Mar 4 2019, 10:20 PM
markj abandoned D19462: Show wiring state of map entries in procstat -v..
Mar 4 2019, 10:20 PM
markj added a comment to D19390: Split kernel and user wire accounting..

IMO the concept should be defined at the mapping level, not at the level of the physical page; to effect wiring, the VM can use the reference counter to ensure that the page is not reclaimable, and the PG_USER_WIRED flag caches the information that at least one non-kernel mapping of the page is wired. This is similar in principle to, e.g., PGA_WRITEABLE.

Mar 4 2019, 9:09 PM
markj added reviewers for D19461: Show wiring state of map entries in procstat -v.: alc, kib.
Mar 4 2019, 9:00 PM
markj created D19462: Show wiring state of map entries in procstat -v..
Mar 4 2019, 8:59 PM
markj created D19461: Show wiring state of map entries in procstat -v..
Mar 4 2019, 8:57 PM
markj added a comment to D19390: Split kernel and user wire accounting..
In D19390#416489, @kib wrote:

[I am not suggesting to redo the patch, only discussing the possible approaches].

Mar 4 2019, 8:54 PM

Mar 2 2019

markj accepted D19170: Initialize dump_avail on RISC-V.
Mar 2 2019, 7:28 PM
markj added a comment to D19227: geom: add feature: gconcat online append.

Feel free to break the change into multiple patches. The change to use a TAILQ could certainly be committed on its own as a "no functional change" diff.

Not sure how to do this? My current workflow is copy-pasting the output of svnlite diff into phabricator. I'm not aware of a convenient way to split up diffs like this.

Mar 2 2019, 7:15 PM

Mar 1 2019

markj added a comment to D19265: libctf, dtrace: Plumb through support for CONSTVAL values.
In D19265#415876, @cem wrote:

Ah, I assumed this was a port from OneFS. I'll try running the suite this afternoon.

Thanks!

Mar 1 2019, 11:15 PM
markj added inline comments to D19170: Initialize dump_avail on RISC-V.
Mar 1 2019, 6:06 PM
markj added a comment to D19265: libctf, dtrace: Plumb through support for CONSTVAL values.
In D19265#415623, @cem wrote:
In D19265#414685, @cem wrote:

My notion is that any time a script refers to a constval args[n], libdtrace would emit the "load immediate" DIF instruction which loads the constant value into a register, and any time it refers to a non-constval args[n+1], libdtrace knows to emit DIF with the ABI argument index shifted to take into account the fact that args[n] isn't represented in the ABI.

That sounds pretty reasonable. Any idea how difficult it would be to implement?

Mar 1 2019, 4:08 PM
markj accepted D19264: ctf: Add support for typed constant values.
Mar 1 2019, 4:05 PM
markj accepted D19409: fortuna: Deduplicate kernel vs user includes.
Mar 1 2019, 3:52 PM
markj added a comment to D18320: RISC-V: add minidump support.

Am I right that we only write 4KB at a time?

Yes. I tried writing out more than one page at a time and it failed quite spectacularly, so this could be a good spot to revisit and introduce pmap_kenter_temporary() as we discussed on IRC.

Mar 1 2019, 3:49 PM

Feb 28 2019

markj added inline comments to D19170: Initialize dump_avail on RISC-V.
Feb 28 2019, 11:42 PM
markj added inline comments to D19264: ctf: Add support for typed constant values.
Feb 28 2019, 11:24 PM
markj committed rS344670: Allow FIONBIO and FIOASYNC ioctls on POSIX shm descriptors..
Allow FIONBIO and FIOASYNC ioctls on POSIX shm descriptors.
Feb 28 2019, 10:00 PM
markj closed D19330: Allow setting O_NONBLOCK on shm file descriptors.
Feb 28 2019, 10:00 PM
markj added inline comments to D19227: geom: add feature: gconcat online append.
Feb 28 2019, 9:42 PM
markj accepted D19265: libctf, dtrace: Plumb through support for CONSTVAL values.
In D19265#414685, @cem wrote:

Consider that the pid provider (fbt for userspace) has exactly this same problem, and this fix does not address that.

Right; that is a shortcoming of this patch. We could probably fix pid::: in a similar, straightforward (but ugly) fashion. Are there any other Providers that rely on CTF function types?

Feb 28 2019, 8:46 PM
markj accepted D19264: ctf: Add support for typed constant values.
Feb 28 2019, 8:31 PM
markj added inline comments to D19390: Split kernel and user wire accounting..
Feb 28 2019, 7:54 PM
markj accepted D19365: Invalidate cache for the pdir page when using PAE paging but PAT is not supported..
Feb 28 2019, 7:09 PM
markj accepted D18320: RISC-V: add minidump support.

Looks ok, just a couple of nits.

Feb 28 2019, 6:37 PM
markj accepted D18321: RISC-V: Add definition for pmap_get_tables().
Feb 28 2019, 6:34 PM
markj accepted D19171: Add RISC-V minidump support to libkvm.
Feb 28 2019, 6:31 PM
markj added inline comments to D19365: Invalidate cache for the pdir page when using PAE paging but PAT is not supported..
Feb 28 2019, 6:21 PM
markj added inline comments to D19170: Initialize dump_avail on RISC-V.
Feb 28 2019, 6:13 PM
markj added inline comments to D18321: RISC-V: Add definition for pmap_get_tables().
Feb 28 2019, 6:02 PM
markj added a comment to D19365: Invalidate cache for the pdir page when using PAE paging but PAT is not supported..

PS. Due to a note in 4.9.2 I was tempted to always flush pdir, but then backed it off.

Feb 28 2019, 5:57 PM
markj accepted D19315: Dynamically allocate per-cpu scheduler state.
In D19315#413467, @kib wrote:

Can you re-upload the diff with the full context added, please ?

Feb 28 2019, 5:32 PM

Feb 27 2019

markj committed rS344629: rtsol: Use vwarnx(3) to log messages to standard error..
rtsol: Use vwarnx(3) to log messages to standard error.
Feb 27 2019, 6:13 PM
markj added reviewers for D19390: Split kernel and user wire accounting.: alc, kib, jeff.
Feb 27 2019, 6:05 PM
markj created D19390: Split kernel and user wire accounting..
Feb 27 2019, 6:04 PM
markj updated the diff for D19247: Merge hold_count into wire_count..
  • Rebase after removal of sys/dev/drm
  • Remove vm_page_(un)hold() prototypes for now
Feb 27 2019, 5:13 PM
markj added a comment to D18569: Fix most shellcheck warnings in newvers.sh.

Using $( ) instead of ` is an improvement IMO, I'm a little less convinced by some of the new quote use.

Feb 27 2019, 2:32 AM
markj accepted D18569: Fix most shellcheck warnings in newvers.sh.

This file is pretty inconsistent about the use of braces around variable names; I prefer not to use them unless they're needed, like on line 299 in the new version.

Feb 27 2019, 2:31 AM

Feb 26 2019

markj committed rS344600: Add a missing return statement to g_concat_kernel_dump()..
Add a missing return statement to g_concat_kernel_dump().
Feb 26 2019, 6:31 PM
markj committed rS344599: Fix fasttrap_sig{trap,segv}()..
Fix fasttrap_sig{trap,segv}().
Feb 26 2019, 6:20 PM
markj committed rS344591: Revert r344587..
Revert r344587.
Feb 26 2019, 5:34 PM
markj committed rS344588: Remove illumos-specific code from the x86 fasttrap_isa.c..
Remove illumos-specific code from the x86 fasttrap_isa.c.
Feb 26 2019, 4:34 PM
markj committed rS344587: Remove stub fasttrap implementations..
Remove stub fasttrap implementations.
Feb 26 2019, 4:32 PM
markj added a comment to D19227: geom: add feature: gconcat online append.

You're right, this should be a linked list. The only reason I went with the reallocation approach is that I wanted to touch as little code as possible to avoid new bugs.

Feb 26 2019, 4:28 PM
markj added a comment to D19330: Allow setting O_NONBLOCK on shm file descriptors.
In D19330#414142, @greg_unrelenting.technology wrote:

I don't really follow. For regular files, O_NONBLOCK means "don't block on open." vn_read() will translate O_NONBLOCK to IO_NDELAY, but most filesystems don't do anything with that. In the snippet you referenced, the code has a comment, "refuse to block when reading," but with this patch shm_read() will block anyway because uiomove_object_page() provides no mechanism for the caller to ask for non-blocking semantics. So either Linux ignores the O_NONBLOCK flag when reading from a shm object and the referenced comment is bogus, or Linux actually honours the flag, in which case this patch isn't sufficient. In the former case, the code should simply be eliminated rather than changing the kernel.

Yes, for regular files, O_NONBLOCK means "don't block on open" — therefore, it doesn't mean anything when the file has already been opened — so it is silently ignored in ioctl/fcntl in vn_ioctl. I'm *only* talking about fcntl, not opening.

As I understand it, the referenced comment isn't bogus, it's defensive code: imagine if a client application passes a pipe or socket instead of the expected file/shm. It would have the ability to make the display server hang forever. The server sets nonblock to prevent that from happening. It's not supposed to do anything in the good case (file/shm was actually sent).

Feb 26 2019, 3:31 PM
markj committed rS344584: MFC r344305, r344365:.
MFC r344305, r344365:
Feb 26 2019, 3:07 PM
markj committed rS344583: MFC r344305, r344365:.
MFC r344305, r344365:
Feb 26 2019, 3:04 PM
markj committed rS344582: MFC r344307:.
MFC r344307:
Feb 26 2019, 2:59 PM
markj committed rS344581: MFC r344307:.
MFC r344307:
Feb 26 2019, 2:56 PM

Feb 25 2019

markj added inline comments to D18843: readelf(1): Speed up readelf -wo.
Feb 25 2019, 9:04 PM
markj committed rS344551: Fix handling of rights on stdio streams, take two..
Fix handling of rights on stdio streams, take two.
Feb 25 2019, 7:47 PM
markj closed D19216: Fix the case where stdin is closed, second attempt..
Feb 25 2019, 7:47 PM
markj added a comment to D19330: Allow setting O_NONBLOCK on shm file descriptors.
In D19330#414129, @greg_unrelenting.technology wrote:

What are the semantics on Linux? I can imagine O_NONBLOCK meaning "return EAGAIN if the page is swapped out," in which case this patch is not sufficient.

I haven't looked at Linux, but [[ https://github.com/freebsd/freebsd/blob/724199fd4be1d5274c9fabdfb9bb84778cf8de41/sys/kern/vfs_vnops.c#L1485-L1487 | our semantics for regular files is return (0) ]], so it would make sense to do the same thing between shm and an unlinked file, right?

Feb 25 2019, 7:44 PM
markj committed rS344550: Improve vmem tuning for platforms without a direct map..
Improve vmem tuning for platforms without a direct map.
Feb 25 2019, 7:22 PM
markj closed D19337: Improve vmem tuning for platforms without a direct map..
Feb 25 2019, 7:22 PM
markj accepted D19353: Increase ctfconvert buffer size.
Feb 25 2019, 6:48 PM
markj added inline comments to D19337: Improve vmem tuning for platforms without a direct map..
Feb 25 2019, 4:39 PM
markj added a comment to D19247: Merge hold_count into wire_count..
In D19247#414032, @kib wrote:
In D19247#413465, @kib wrote:

Don't we need to split the kernel wire/user wire limits for this to be feasible, otherwise intensive io holding pages would deny user wiring requests.

That is my next step, yes. I am not certain that the changes must be committed together since the user wire limit is already quite broken: it is typically exceeded for anyone using the ZFS ARC, and mlockall() does not check the user wire limit.

My point is that it might start breaking configurations which worked before, e.g. UFS/tmpfs-only installs.

Feb 25 2019, 4:24 PM
markj committed rS344522: MFC r344369:.
MFC r344369:
Feb 25 2019, 3:51 PM
markj committed rS344521: MFC r344232:.
MFC r344232:
Feb 25 2019, 3:51 PM
markj committed rS344520: MFC r344231, r344440:.
MFC r344231, r344440:
Feb 25 2019, 3:50 PM
markj updated the test plan for D19247: Merge hold_count into wire_count..
Feb 25 2019, 3:48 PM
markj added a comment to D19247: Merge hold_count into wire_count..
In D19247#413465, @kib wrote:

Don't we need to split the kernel wire/user wire limits for this to be feasible, otherwise intensive io holding pages would deny user wiring requests.

Feb 25 2019, 3:47 PM
markj added a comment to D19330: Allow setting O_NONBLOCK on shm file descriptors.

What are the semantics on Linux? I can imagine O_NONBLOCK meaning "return EAGAIN if the page is swapped out," in which case this patch is not sufficient.

Feb 25 2019, 3:35 PM
markj updated the test plan for D19337: Improve vmem tuning for platforms without a direct map..
Feb 25 2019, 3:13 PM
markj added a comment to D19337: Improve vmem tuning for platforms without a direct map..
In D19337#413816, @jeff wrote:

We probably shouldn't enable NUMA on 32 bit platforms. It doesn't make a ton of sense.

Feb 25 2019, 2:49 AM

Feb 24 2019

markj updated the summary of D19337: Improve vmem tuning for platforms without a direct map..
Feb 24 2019, 11:04 PM
markj updated the summary of D19337: Improve vmem tuning for platforms without a direct map..
Feb 24 2019, 11:03 PM
markj created D19337: Improve vmem tuning for platforms without a direct map..
Feb 24 2019, 11:03 PM
markj added a comment to D19216: Fix the case where stdin is closed, second attempt..

Ping?

Feb 24 2019, 10:52 PM
markj added a comment to D19265: libctf, dtrace: Plumb through support for CONSTVAL values.
In D19265#413165, @cem wrote:

Thanks for taking a look!

I think the dtrace changes are somewhat hackish.

Yes, that's a fair characterization. (I think it kind of fits in with the quality and design of the rest of fbt, but...)

Feb 24 2019, 10:23 PM

Feb 22 2019

markj added a comment to D19265: libctf, dtrace: Plumb through support for CONSTVAL values.

I think the dtrace changes are somewhat hackish. Did you consider the approach of modifying the D compiler to shift argument indices accordingly when one of a probes arguments is a CONSTVAL?

Feb 22 2019, 9:02 PM
markj added a comment to D19264: ctf: Add support for typed constant values.

Overall this looks ok to me.

Feb 22 2019, 8:55 PM
markj accepted D18843: readelf(1): Speed up readelf -wo.
Feb 22 2019, 8:33 PM
markj added a comment to D18848: readelf(1): Fix readelf -wo to show correct offsets.

Note, Dwarf_Locdesc is part of the public ABI, so this change would require a library version number bump; see SHLIB_MAJOR in lib/libdwarf/Makefile.

Did you consider adding a len field to Dwarf_Loc instead? Consumers can easily sum up the expressions for a given description and add the fixed dwarf_get_address_size(dbg) + 2.

Feb 22 2019, 8:18 PM
markj added a comment to D18848: readelf(1): Fix readelf -wo to show correct offsets.

Note, Dwarf_Locdesc is part of the public ABI, so this change would require a library version number bump; see SHLIB_MAJOR in lib/libdwarf/Makefile.

Feb 22 2019, 8:17 PM
markj accepted D18843: readelf(1): Speed up readelf -wo.

Looks ok to me, modulo a couple more style nits.

Feb 22 2019, 6:06 PM

Feb 21 2019

markj committed rS344453: Commit a missing piece of r344452..
Commit a missing piece of r344452.
Feb 21 2019, 10:57 PM
markj committed rS344452: Fix a tracepoint lookup race in fasttrap_pid_probe()..
Fix a tracepoint lookup race in fasttrap_pid_probe().
Feb 21 2019, 10:54 PM
markj closed D19273: Fix a hash table lookup race in fasttrap_pid_probe()..
Feb 21 2019, 10:54 PM
markj committed rS344450: Disconnect fasttrap from the 32-bit powerpc build..
Disconnect fasttrap from the 32-bit powerpc build.
Feb 21 2019, 10:49 PM
markj added inline comments to D18843: readelf(1): Speed up readelf -wo.
Feb 21 2019, 10:09 PM
markj added inline comments to D19273: Fix a hash table lookup race in fasttrap_pid_probe()..
Feb 21 2019, 4:04 PM
markj committed rS344440: Clear pointers to indicate that the respective locks are released..
Clear pointers to indicate that the respective locks are released.
Feb 21 2019, 3:44 PM
markj committed rS344439: Release lwhsu from mentorship..
Release lwhsu from mentorship.
Feb 21 2019, 3:31 PM
markj updated the diff for D19273: Fix a hash table lookup race in fasttrap_pid_probe()..

Make a comment more accurate.

Feb 21 2019, 4:11 AM
markj added inline comments to D19273: Fix a hash table lookup race in fasttrap_pid_probe()..
Feb 21 2019, 4:10 AM
markj added a comment to D19273: Fix a hash table lookup race in fasttrap_pid_probe()..
In D19273#412540, @cem wrote:

Solve the race using a per-process generation counter which gets updated
before a tracepoint is removed from the hash table, and after it is
removed from the target process' vmspace.

We do the latter, but I think we're missing the former.

Feb 21 2019, 3:16 AM