Page MenuHomeFreeBSD

markj (Mark Johnston)
User

Projects (9)

User Details

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

Recent Activity

Today

markj requested review of D50371: unix: Restrict dirfds exchanged between jails with a different root.
Fri, May 16, 1:40 AM

Yesterday

markj added a comment to D50315: inotify: Initial revision.

I tried building it with make buildworld && make buildkernel and it failed with

--- libsys.so.7.full ---
Building shared library libsys.so.7
...
ld: error: version script assignment of 'FBSDprivate_1.0' to symbol '_inotify_add_watch' failed: symbol not defined
ld: error: version script assignment of 'FBSDprivate_1.0' to symbol '__sys_inotify_add_watch' failed: symbol not defined
ld: error: version script assignment of 'FBSDprivate_1.0' to symbol '_inotify_rm_watch' failed: symbol not defined
ld: error: version script assignment of 'FBSDprivate_1.0' to symbol '__sys_inotify_rm_watch' failed: symbol not defined
cc: error: linker command failed with exit code 1 (use -v to see invocation)
Thu, May 15, 10:40 PM
markj updated the diff for D50315: inotify: Initial revision.
  • Address some review comments.
  • Rename INOTIFY_ND to INOTIFY_NAME and move those events to VOP hooks.
  • When a watched file/dir itself triggers an event, the name stored in the event structure should be the empty string.
Thu, May 15, 10:39 PM
markj accepted D50263: vm_page: cleanup.
Thu, May 15, 6:59 PM

Wed, May 14

markj accepted D50357: cp: Avoid prepending ./ in file-to-file case..
Wed, May 14, 10:10 PM
markj added a comment to D45552: create sticky bit /usr/obj/home dir.

I'd rather not add new uses of the sticky bit.

Wed, May 14, 7:19 PM
markj updated the summary of D50354: libc: Give __thr_jtable protected visibility.
Wed, May 14, 4:48 PM
markj requested review of D50354: libc: Give __thr_jtable protected visibility.
Wed, May 14, 4:42 PM
markj committed rG735138131408: vfs: Restore a require include (authored by markj).
vfs: Restore a require include
Wed, May 14, 12:52 AM

Tue, May 13

markj committed rGa2e22ed3420d: file: Simplify an INVARIANTS check in _fdrop() (authored by markj).
file: Simplify an INVARIANTS check in _fdrop()
Tue, May 13, 11:34 PM
markj committed rGc5a769781c1f: vfs: Sort includes in vfs_syscalls.c (authored by markj).
vfs: Sort includes in vfs_syscalls.c
Tue, May 13, 11:34 PM
markj committed rGaee6c83e06a8: vfs: Sort includes in vfs_vnops.c (authored by markj).
vfs: Sort includes in vfs_vnops.c
Tue, May 13, 11:34 PM
markj closed D50317: vfs: Sort includes in vfs_syscalls.c.
Tue, May 13, 11:34 PM
markj closed D50316: vfs: Sort includes in vfs_vnops.c.
Tue, May 13, 11:33 PM
markj added a comment to D50337: sound: Call PCM_RELEASE() if pcm_addchan() fails.

@markj If this fixes the issue mentioned in D48482, should we MFC it to releng/14.3 as well?

Yes, definitely.

Alright. Can I do it directly or do I need to get formal approval from re@?

Tue, May 13, 10:05 PM
markj accepted D50337: sound: Call PCM_RELEASE() if pcm_addchan() fails.

@markj If this fixes the issue mentioned in D48482, should we MFC it to releng/14.3 as well?

Tue, May 13, 9:54 PM
markj added inline comments to D50310: vfs: vntblinit(): Rework comments on the computation of 'kern.maxvnodes'.
Tue, May 13, 8:09 PM
markj committed rG15143ba61a3b: sdt: Fix a typo in arm's sdt_tracepoint_valid() (authored by markj).
sdt: Fix a typo in arm's sdt_tracepoint_valid()
Tue, May 13, 7:38 PM
markj requested review of D50333: vm_phys: Ensure that pages are removed from pagequeues before freeing.
Tue, May 13, 5:26 PM
markj added a comment to D48482: sound: Simplify locking during device creation.

This change breaks booting for me on a Talos II board, both on powerpc64 and powerpc64le. Please revert, at least on releng/14.3.

Tue, May 13, 4:57 PM
markj updated the diff for D50317: vfs: Sort includes in vfs_syscalls.c.

Sort harder.

Tue, May 13, 2:53 PM
markj updated the diff for D50316: vfs: Sort includes in vfs_vnops.c.

Remove some more unneeded includes.

Tue, May 13, 2:52 PM
markj committed rGbd20de7d16c7: vm_fault: Defer marking COW pages valid (authored by markj).
vm_fault: Defer marking COW pages valid
Tue, May 13, 12:51 PM
markj committed rG6180a8eaba89: tests: Serialize kern_descrip_test (authored by markj).
tests: Serialize kern_descrip_test
Tue, May 13, 12:51 PM
markj committed rG33475cb18e9e: racct: Fix a typo in a comment (authored by markj).
racct: Fix a typo in a comment
Tue, May 13, 12:51 PM
markj committed rGdf4d9abbcc04: aio: Fix opcode handling in aio_process_rw() (authored by markj).
aio: Fix opcode handling in aio_process_rw()
Tue, May 13, 12:51 PM

Mon, May 12

markj updated the summary of D50315: inotify: Initial revision.
Mon, May 12, 10:25 PM
markj requested review of D50317: vfs: Sort includes in vfs_syscalls.c.
Mon, May 12, 8:54 PM
markj requested review of D50316: vfs: Sort includes in vfs_vnops.c.
Mon, May 12, 8:54 PM
markj requested review of D50315: inotify: Initial revision.
Mon, May 12, 8:52 PM
markj added a comment to D50125: kern.maxfiles: Clamp it to 'kern.maxvnodes'.
In D50125#1147887, @kib wrote:

Being able to use the user thread context to help system thread to cope with load is beneficial. For instance, a lot of deadlocks in buffer cache were fixed by allowing the allocating thread to do some work for the buffer daemon. Compare the amount of tuning required for the page daemon, with the almost non-existent issues for the buffer cache.

Mon, May 12, 4:40 PM
markj added a comment to D50125: kern.maxfiles: Clamp it to 'kern.maxvnodes'.
In D50125#1147862, @kib wrote:

Thinking about it some more, from my POV the bug is that we are applying a resource limit (maxvnodes) when there is no actual shortage (of memory).

Yes.

getnewvnode()/vn_alloc() seems to try very hard to avoid exceeding the desiredvnodes limit. It will even do direct reclaim and try to claim a vnode from the free list (this can have unpredictable latency that is quite large in the worst case, and we purposefully avoid this kind of mechanism for page reclamation for that reason) rather than exceed the limit. Meanwhile we have a dedicated thread whose sole responsibility is to reclaim unused vnodes.

This is not a small effort, but I would prefer to fix this by making maxvnodes a soft limit. That is, getnewvnode() should always allocate a vnode unless it's really unable to because of a memory shortage (or because we're getting "close" to a memory shortage by some metric). Let the vnlru thread handle the hard work of maintaining the vnode cache size, and keep the allocation path simple. Going further, if vnode allocation outpaces the vnlru thread in practices, then we can spin up additional threads to handle the load. It may also potentially be useful to use a PID controller (in subr_pidctrl.c) to regulate the vnlru thread. Even further, the vnode cache should react to pressure from the rest of the kernel and be able to dynamically shrink the cache in proportion to its total memory usage (the total number of vnodes plus auxiliary structures like v_pollinfo and namecache entries).

There are two big issues there:

  1. getnewvnode() is not supposed to fail. It is claimed that the assumption is the bug in filesystems, but I think now that it is not. It should be similar to the pv allocator in pmap, always giving the resource on request.
Mon, May 12, 3:35 PM
markj added a comment to D50125: kern.maxfiles: Clamp it to 'kern.maxvnodes'.

It will even do direct reclaim and try to claim a vnode from the free list (this can have unpredictable latency that is quite large in the worst case, and we purposefully avoid this kind of mechanism for page reclamation for that reason) rather than exceed the limit.

Mon, May 12, 3:02 PM
markj added a comment to D50125: kern.maxfiles: Clamp it to 'kern.maxvnodes'.

I tend to agree. I don't think this change really fixes the problem either: even with maxfiles larger than maxvnodes you're not safe, since multiple processes may open the same vnode, which counts multiple times against maxfiles but only once against maxvnodes.

I think you're seeing it backwards. Ensuring that kern.maxfiles is lower than kern.maxvnodes does fix the problem (modulo the leeway, see below), because then no process is able to continue to open file descriptors referencing not-yet opened files until kern.maxvnodes is exhausted, which is necessary to reach the deadlock point.

If your leeway is 1000, and you have 333 processes that hold /dev/null open over fds 0, 1, 2, then any process can still exhaust the limit.

No, because the limit we are talking about is the vnode limit, not the file descriptor limits (kern.maxfiles/kern.maxfilesperproc). In your example, it's the opposite: All vnodes are shared, so that limit is never reached and there can be no deadlocks; the file descriptor limits still apply though (without causing any problem).

Mon, May 12, 2:55 PM
markj accepted D50312: vm-design: Remove reference to page coloring.
Mon, May 12, 2:24 PM
markj added inline comments to D50312: vm-design: Remove reference to page coloring.
Mon, May 12, 2:24 PM
markj added a comment to D50312: vm-design: Remove reference to page coloring.

Section 9.5 should be removed too, I think.

Mon, May 12, 2:10 PM
markj committed rGeed3be47967f: linuxkpi: Fix up jiffies handling (authored by markj).
linuxkpi: Fix up jiffies handling
Mon, May 12, 2:09 PM
markj closed D50192: linuxkpi: Fix up jiffies handling.
Mon, May 12, 2:09 PM
markj added a comment to D49463: kyua: Add "kyua debug -p" option.

A couple more man page nits, otherwise this seems fine to me, modulo the other comment. I didn't carefully review the code changes.

Mon, May 12, 2:09 AM

Sun, May 11

markj added inline comments to D50289: build.7: Improve building pkgbase.
Sun, May 11, 7:19 PM
markj added a comment to D50192: linuxkpi: Fix up jiffies handling.

I've been running this patch on my desktop. I'll commit it tomorrow if there are no objections.

Sun, May 11, 6:02 PM
markj accepted D50279: sched: mark several kern.sched.* sysctls as CTLFLAG_RWTUN.
Sun, May 11, 5:35 PM
markj added inline comments to D50263: vm_page: cleanup.
Sun, May 11, 4:17 PM
markj added inline comments to D50289: build.7: Improve building pkgbase.
Sun, May 11, 4:05 PM
markj added a comment to D50279: sched: mark several kern.sched.* sysctls as CTLFLAG_RWTUN.

This seems fine, sure.

Sun, May 11, 4:04 PM
markj added inline comments to D49463: kyua: Add "kyua debug -p" option.
Sun, May 11, 3:59 PM
markj committed rGb0dd1a604810: vm_page: Don't create a cache zone for the lazyinit freepool (authored by markj).
vm_page: Don't create a cache zone for the lazyinit freepool
Sun, May 11, 2:52 PM
markj closed D50275: vm_page: Don't create a cache zone for the lazyinit freepool.
Sun, May 11, 2:52 PM

Fri, May 9

markj accepted D50266: cp: Fix issues with destination directory mode..
Fri, May 9, 9:46 PM
markj requested review of D50275: vm_page: Don't create a cache zone for the lazyinit freepool.
Fri, May 9, 7:17 PM
markj added a comment to D50271: libutil: Add a routine to fetch SOURCE_DATE_EPOCH.

Maybe "entire" build process isn't the way to express it. "Build process step" perhaps -- e.g., as if makefs was run at some given SOURCE_DATE_EPOCH.

Maybe "Behave as if the step in the build process was started at the time given by SOURCE_DATE_EPOCH and completed instantaneously."

Fri, May 9, 3:19 PM
markj added a comment to D50271: libutil: Add a routine to fetch SOURCE_DATE_EPOCH.

Supporting clamping in makefs will require a bit more effort.

I'm not sure that's worth the effort. I've been discussing this in the reproducible-builds IRC channel and there seems to be a consensus:

  • SOURCE_DATE_EPOCH isn't intended to override filesystem timestamps
  • It can be interpreted as "Behave as if the entire build process occurred at the time specified by SOURCE_DATE_EPOCH"
Fri, May 9, 3:05 PM
markj added a comment to D50271: libutil: Add a routine to fetch SOURCE_DATE_EPOCH.

The SOURCE_DATE_EPOCH spec doesn't explicitly state this, but based on these points I think it is the intent:

  • Build processes MUST use this variable for embedded timestamps in place of the "current" date and time.
  • Where build processes embed timestamps that are not "current", but are nevertheless still specific to one execution of the build process, they MUST use a timestamp no later than the value of this variable. This is often called "timestamp clamping".

I think for "use this timestamp instead of the real one from the filesystem" we do want an explicit flag rather than using SOURCE_DATE_EPOCH

Fri, May 9, 2:53 PM
markj updated the diff for D49601: makefs: Remove redundant 'stampst' checks in several backends.

Remove an incorrectly dropped timestamp setting.

Fri, May 9, 2:42 PM
markj commandeered D49601: makefs: Remove redundant 'stampst' checks in several backends.
Fri, May 9, 2:37 PM
markj abandoned D50272: makefs: Use a reproducible timestamp in the volume header.
Fri, May 9, 2:36 PM
markj added a comment to D50271: libutil: Add a routine to fetch SOURCE_DATE_EPOCH.

Seems reasonable, but also SOURCE_DATE_EPOCH is intended to override the notion of "now" so should the routine return SOURCE_DATE_EPOCH if set or time(3) if not?

Fri, May 9, 2:32 PM
markj updated the diff for D50271: libutil: Add a routine to fetch SOURCE_DATE_EPOCH.

Fix the copyright.

Fri, May 9, 2:30 PM
markj requested review of D50272: makefs: Use a reproducible timestamp in the volume header.
Fri, May 9, 2:25 PM
markj updated the diff for D49602: makefs: Honor timestamp passsed through 'SOURCE_DATE_EPOCH'.
  • Correct the man page (-T overrides SOURCE_DATE_EPOCH, not the other way around)
  • Use libutil's source_date_epoch()
Fri, May 9, 2:12 PM
markj commandeered D49602: makefs: Honor timestamp passsed through 'SOURCE_DATE_EPOCH'.
Fri, May 9, 2:12 PM
markj added a comment to D50271: libutil: Add a routine to fetch SOURCE_DATE_EPOCH.

This is missing a man page, I'll write one once there's some consensus on the interface.

Fri, May 9, 2:12 PM
markj requested review of D50271: libutil: Add a routine to fetch SOURCE_DATE_EPOCH.
Fri, May 9, 2:11 PM
markj updated the diff for D49492: makefs: Add tests for the -T flag.
  • Remove expected failure annotations (assuming that the makefs code changes will be committed first)
Fri, May 9, 2:10 PM
markj commandeered D49492: makefs: Add tests for the -T flag.
Fri, May 9, 2:09 PM
markj updated the diff for D49531: makefs: Honor -T timestamps when creating images from mtree manifests.
  • Fix the man page.
  • Update mtree_global_inode as well.
  • Factor out some duplicated code.
Fri, May 9, 2:07 PM
markj commandeered D49531: makefs: Honor -T timestamps when creating images from mtree manifests.
Fri, May 9, 2:06 PM
markj committed rG2fa185f9bf59: crypto: Remove uses of CRYPTO_F_DONE (authored by markj).
crypto: Remove uses of CRYPTO_F_DONE
Fri, May 9, 12:34 AM
markj closed D50104: crypto: Remove uses of CRYPTO_F_DONE.
Fri, May 9, 12:34 AM
markj closed D50238: krb5: Fix handling of transient crypto request failures.
Fri, May 9, 12:34 AM
markj committed rG04421fda140b: krb5: Fix handling of transient crypto request failures (authored by markj).
krb5: Fix handling of transient crypto request failures
Fri, May 9, 12:34 AM

Thu, May 8

markj accepted D50257: cp: Fix dead link case..
Thu, May 8, 11:29 PM
markj accepted D50256: cp: Address style issues from external review..
Thu, May 8, 11:28 PM
markj added inline comments to D50104: crypto: Remove uses of CRYPTO_F_DONE.
Thu, May 8, 6:29 PM
markj added a comment to D50192: linuxkpi: Fix up jiffies handling.

Beside the conflict with D49808, this looks good to me.

Your version of the code that conflicts with mine looks more complete now that the timeout is a long. Perhaps you should commit this one and I will rebase my patch on top of this.

Thu, May 8, 4:19 PM
markj added inline comments to D49531: makefs: Honor -T timestamps when creating images from mtree manifests.
Thu, May 8, 4:06 PM
markj committed rG018493d32ac2: makefs: Use gmtime() instead of localtime for timestamps (authored by markj).
makefs: Use gmtime() instead of localtime for timestamps
Thu, May 8, 4:05 PM
markj committed rG31c3ef95ec43: makefs: Make sure that directory entry order is consistent (authored by markj).
makefs: Make sure that directory entry order is consistent
Thu, May 8, 4:05 PM
markj committed rG764ccf410c3c: makefs: Ensure that FFS superblocks are reproducible (authored by markj).
makefs: Ensure that FFS superblocks are reproducible
Thu, May 8, 4:05 PM
markj closed D50198: makefs: Use gmtime() instead of localtime for timestamps.
Thu, May 8, 4:04 PM
markj closed D50197: makefs: Make sure that directory entry order is consistent.
Thu, May 8, 4:04 PM
markj closed D50196: makefs: Ensure that FFS superblocks are reproducible.
Thu, May 8, 4:04 PM
markj added inline comments to D50253: vm_page_grab_pages: fetch page ranges.
Thu, May 8, 2:36 PM
markj accepted D50253: vm_page_grab_pages: fetch page ranges.
Thu, May 8, 2:20 PM
markj accepted D50248: vm_page: make iter_insert() public.
Thu, May 8, 2:04 PM

Wed, May 7

markj updated the diff for D50192: linuxkpi: Fix up jiffies handling.

Push the conversion into linux_add_to_sleepqueue().

Wed, May 7, 6:18 PM
markj added a comment to D50192: linuxkpi: Fix up jiffies handling.

Why not call linux_jiffies_timeout_to_ticks() only once from linux_add_to_sleepqueue(), in the concerned callee, instead of in all callers?

Wed, May 7, 6:18 PM
markj added a comment to D50192: linuxkpi: Fix up jiffies handling.
In D50192#1145248, @bz wrote:

Does __wait_event_common need similar treatment?

Wed, May 7, 12:45 PM
markj updated the diff for D50192: linuxkpi: Fix up jiffies handling.

Deduplicate jiffies->ticks conversions, use a local variable instead of casting.

Wed, May 7, 12:43 PM
markj added a comment to D50104: crypto: Remove uses of CRYPTO_F_DONE.
In D50104#1145336, @jhb wrote:

So maybe one commit to update the krb5 code to use crp_opaque = NULL and then you can just remove the flag entirely in a second commit? The changes look ok to me though (I'm just also fine with now removing the flag entirely)

Wed, May 7, 12:33 PM
markj updated the diff for D50104: crypto: Remove uses of CRYPTO_F_DONE.

Apply John's suggestion of splitting the diff into two.

Wed, May 7, 12:33 PM
markj retitled D50104: crypto: Remove uses of CRYPTO_F_DONE from crypto: Remove most uses of CRYPTO_F_DONE to crypto: Remove uses of CRYPTO_F_DONE.
Wed, May 7, 12:32 PM
markj requested review of D50238: krb5: Fix handling of transient crypto request failures.
Wed, May 7, 12:32 PM
markj accepted D50199: vm_page: drop mpred param from insert_lookup.
Wed, May 7, 12:20 PM
markj committed rGf30669ba9725: bpf: Make bpf.h self-contained (authored by markj).
bpf: Make bpf.h self-contained
Wed, May 7, 12:10 PM
markj committed rG399bc0c1823c: netinet: Make in_systm.h self-contained (authored by markj).
netinet: Make in_systm.h self-contained
Wed, May 7, 12:10 PM

Tue, May 6

markj closed D50191: mccomphy: Guard the definition of mcommphy_yt8531_setup_delay().
Tue, May 6, 7:27 PM
markj committed rG2ad32d3a6868: mccomphy: Guard the definition of mcommphy_yt8531_setup_delay() (authored by markj).
mccomphy: Guard the definition of mcommphy_yt8531_setup_delay()
Tue, May 6, 7:27 PM
markj accepted D50121: sysctl(9): Ease exporting struct sizes; Discourage doing that.
Tue, May 6, 5:32 PM