Page MenuHomeFreeBSD

kib (Konstantin Belousov)
User

Projects

User Details

User Since
May 16 2014, 7:35 PM (417 w, 2 d)

Recent Activity

Sat, May 14

kib accepted D35204: libm: Add feenableexcept and fedisableexcept to library on powerpc.

You just merge it when you think that there is enough testing done in head, as usual. Or, is there some more background context I am not aware of?

Sat, May 14, 12:53 AM
kib added a comment to D35084: Allocate the pcpu memory on a single level 2 page.

I have a patch to use an IPI in pmap_update_entry. The variable to exit the loop is from the caller stack so would break exceptions in the same way if we promote/demote the page.

The main issue is deciding on which memory will need to use an IPI. I prototyped using a software flag in the pte, however this is likely to stop promotion as pmap_promote_l2 checks these attributes are identical over the entire range before promotion.

Sat, May 14, 12:34 AM

Fri, May 13

kib accepted D35150: Handle cas failure when the compare succeeds.
Fri, May 13, 2:40 PM

Mon, May 9

kib added a comment to D35150: Handle cas failure when the compare succeeds.

I checked for the described condition by testing for rv == 1. Then it does not need this long comment.

Mon, May 9, 9:21 PM
kib committed R10:ca7c2d2eedf6: UFS: clear fs_fmod once more, in the buffer data copy. (authored by kib).
UFS: clear fs_fmod once more, in the buffer data copy.
Mon, May 9, 9:10 PM
kib committed R10:4ac2df8f4cd9: ffs_use_bwrite: make the superblock snapshot more consistent (authored by kib).
ffs_use_bwrite: make the superblock snapshot more consistent
Mon, May 9, 9:10 PM
kib closed D35149: ffs_use_bwrite: make the superblock snapshot more consistent.
Mon, May 9, 9:10 PM

Sun, May 8

kib requested review of D35149: ffs_use_bwrite: make the superblock snapshot more consistent.
Sun, May 8, 2:06 PM

Sat, May 7

kib updated the diff for D32551: if(9): Implement support for nvlist-based set- and get- network interface capabilities..

Space in .Dv NULL ,
Bump man page date in advance.

Sat, May 7, 11:23 PM
kib added a comment to D32551: if(9): Implement support for nvlist-based set- and get- network interface capabilities..

ping?

Sat, May 7, 11:00 PM

Fri, May 6

kib accepted D35062: nvdimm: Use devclass_lookup to find devclasses..
Fri, May 6, 1:23 PM

Thu, May 5

kib added inline comments to D35084: Allocate the pcpu memory on a single level 2 page.
Thu, May 5, 9:19 PM
kib accepted D35121: sysvsem: Add a timeout argument to the semop..
Thu, May 5, 10:27 AM

Wed, May 4

kib committed R10:249d205cb8d9: subr_unit.c: make userspace tests buildable (authored by kib).
subr_unit.c: make userspace tests buildable
Wed, May 4, 10:34 PM
kib committed R10:5ba023517911: init_unrhdr(): make it usable by initializing everything (authored by kib).
init_unrhdr(): make it usable by initializing everything
Wed, May 4, 10:34 PM
kib committed R10:3bf38618ee3f: unr(9): allow to avoid internal locking (authored by kib).
unr(9): allow to avoid internal locking
Wed, May 4, 10:34 PM
kib added inline comments to D35084: Allocate the pcpu memory on a single level 2 page.
Wed, May 4, 10:29 PM
kib added inline comments to D35121: sysvsem: Add a timeout argument to the semop..
Wed, May 4, 10:24 PM
kib added inline comments to D35084: Allocate the pcpu memory on a single level 2 page.
Wed, May 4, 1:49 PM

Mon, May 2

kib committed R10:aca70bd01e3f: sched_getaffinity(3): more compatibility with Linux (authored by kib).
sched_getaffinity(3): more compatibility with Linux
Mon, May 2, 6:10 PM

Thu, Apr 28

kib committed R10:6fe78ad43455: subr_unit.c: make userspace tests buildable (authored by kib).
subr_unit.c: make userspace tests buildable
Thu, Apr 28, 12:49 AM

Wed, Apr 27

kib committed R10:709783373e57: Fix another race between fork(2) and PROC_REAP_KILL subtree (authored by kib).
Fix another race between fork(2) and PROC_REAP_KILL subtree
Wed, Apr 27, 11:29 PM
kib committed R10:39794d80ad90: Fix a race between fork(2) and PROC_REAP_KILL subtree (authored by kib).
Fix a race between fork(2) and PROC_REAP_KILL subtree
Wed, Apr 27, 11:29 PM
kib committed R10:d1df34736888: kern_procctl: add possibility to take stop_all_proc_block() around exec (authored by kib).
kern_procctl: add possibility to take stop_all_proc_block() around exec
Wed, Apr 27, 11:29 PM
kib committed R10:54a11adbd9c2: reap_kill(): split children and subtree killers into helpers (authored by kib).
reap_kill(): split children and subtree killers into helpers
Wed, Apr 27, 11:29 PM
kib committed R10:2e7595ef2f53: Add stop_all_proc_block(9) (authored by kib).
Add stop_all_proc_block(9)
Wed, Apr 27, 11:29 PM
kib committed R10:e4ce431e2a02: reap_kill(): de-inline LIST_FOREACH(), twice (authored by kib).
reap_kill(): de-inline LIST_FOREACH(), twice
Wed, Apr 27, 11:29 PM
kib committed R10:134529b11b53: reap_kill(): rename the reap variable to reaper (authored by kib).
reap_kill(): rename the reap variable to reaper
Wed, Apr 27, 11:29 PM
kib committed R10:b9294a3e152b: reaper_abandon_children(): upgrade proctree_lock assert to exclusive (authored by kib).
reaper_abandon_children(): upgrade proctree_lock assert to exclusive
Wed, Apr 27, 11:29 PM
kib committed R10:e59b940dcb45: unr(9): allow to avoid internal locking (authored by kib).
unr(9): allow to avoid internal locking
Wed, Apr 27, 11:28 PM
kib closed D35014: Fix a race between fork(2) and PROC_REAP_KILL subtree.
Wed, Apr 27, 11:28 PM
kib committed R10:c4be460e84b4: init_unrhdr(): make it usable by initializing everything (authored by kib).
init_unrhdr(): make it usable by initializing everything
Wed, Apr 27, 11:28 PM
kib added inline comments to D35068: proc: Add new process hold facility..
Wed, Apr 27, 10:29 PM
kib added a comment to D35084: Allocate the pcpu memory on a single level 2 page.

Does it make sense to add asserts in the demotion code to ensure that it does not touch pcpu mappings? Or even, somewhat more to the point, in the break-before-make code.

Wed, Apr 27, 10:19 PM
kib accepted D35077: nvdimm_e820: Use driver->name in identify method..
Wed, Apr 27, 10:15 PM
kib added inline comments to D35062: nvdimm: Use devclass_lookup to find devclasses..
Wed, Apr 27, 10:15 PM
kib added a comment to D35014: Fix a race between fork(2) and PROC_REAP_KILL subtree.

Since PROC_REAP_KILL only operates with P_PID, it could set the PCTL_UNLOCKED flag instead, and the stop_all_proc and proctree locks can be acquired in the proper order within reap_kill().

Wed, Apr 27, 10:12 PM
kib updated the diff for D35014: Fix a race between fork(2) and PROC_REAP_KILL subtree.

Avoid LOR between stop_all_proc_block() and proctree_lock.

Wed, Apr 27, 9:48 PM
kib committed R10:6d23cd6674fe: syscons: silent 'set but unused' warning in some configurations (authored by kib).
syscons: silent 'set but unused' warning in some configurations
Wed, Apr 27, 12:38 AM

Tue, Apr 26

kib accepted D35062: nvdimm: Use devclass_lookup to find devclasses..
Tue, Apr 26, 9:22 PM
kib added a comment to D35068: proc: Add new process hold facility..
In D35068#794803, @kib wrote:

I do not quite understand this. Am I right that the intent is to see zombies under linprocfs? If yes, what exact entries from the pid directory should be exposed?

yes, you are right.
linprocfs_doprocstatus, PFS_ZOMBIE flag of pfs_create_xxx()

Tue, Apr 26, 8:51 PM
kib added a comment to D35068: proc: Add new process hold facility..

I do not quite understand this. Am I right that the intent is to see zombies under linprocfs? If yes, what exact entries from the pid directory should be exposed?

Tue, Apr 26, 8:09 PM
kib updated the diff for D35014: Fix a race between fork(2) and PROC_REAP_KILL subtree.

Use sx for stop_all_proc_block().
Upgrade proctree_lock assert to XLOCKED in reaper_abandon_children().

Tue, Apr 26, 2:50 PM
kib added a comment to D35014: Fix a race between fork(2) and PROC_REAP_KILL subtree.

Seems ok to me. One general comment: we have to stop the target process because we have no mechanism to synchronize with a forking process. For example, a per-proc sx lock which is held for the duration of fork, so other threads can block until the target is finished forking. Or some blockcount-like barrier. I think I added such a thing for Isilon a long time ago to fix a problem with dtrace, IMO it would be useful here too. Do you agree?

Tue, Apr 26, 2:48 PM
kib updated the diff for D35014: Fix a race between fork(2) and PROC_REAP_KILL subtree.

Fix condition for need_stop: it should check that REAPER_KILL_CHILDREN is not set. REAPER_KILL_SUBTREE is legitimately unset when all descendants of the reaper must be killed.

Tue, Apr 26, 11:33 AM
kib added inline comments to D35062: nvdimm: Use devclass_lookup to find devclasses..
Tue, Apr 26, 1:06 AM
kib added inline comments to D35062: nvdimm: Use devclass_lookup to find devclasses..
Tue, Apr 26, 1:05 AM

Mon, Apr 25

kib updated the diff for D35014: Fix a race between fork(2) and PROC_REAP_KILL subtree.

Handle Mark' comments.

Mon, Apr 25, 10:31 PM
kib added inline comments to D35014: Fix a race between fork(2) and PROC_REAP_KILL subtree.
Mon, Apr 25, 10:31 PM
kib closed D35045: sched_getaffinity(3): more compatibility with Linux.
Mon, Apr 25, 2:23 PM
kib committed R10:67fc95025ccf: sched_getaffinity(3): more compatibility with Linux (authored by kib).
sched_getaffinity(3): more compatibility with Linux
Mon, Apr 25, 2:23 PM
kib updated the diff for D35045: sched_getaffinity(3): more compatibility with Linux.

Fix error/errno meh.

Mon, Apr 25, 1:22 PM

Sun, Apr 24

kib added a comment to D34850: linux(4); Adopt affinity syscalls to the recent kernel changes..
In D34850#790822, @jhb wrote:

Note that FreeBSD would benefit from similar changes in the native API btw. As it was we can't safely raise MAXCPU in the default amd64 kernel (for example) because it breaks the ABI since old kernels would be too pick about userland having a larger size. It would be good perhaps to fix the native syscalls to adopt Linux's more flexible semantics and then you would not need to change the Linux ABI itself.

Sun, Apr 24, 10:13 PM
kib requested review of D35045: sched_getaffinity(3): more compatibility with Linux.
Sun, Apr 24, 10:13 PM
kib added inline comments to D34849: Use Linux semantics for the thread affinity syscalls..
Sun, Apr 24, 9:56 PM
kib updated the summary of D35014: Fix a race between fork(2) and PROC_REAP_KILL subtree.
Sun, Apr 24, 1:32 PM
kib accepted D35037: g_vfs_done: Report when we switch on ENXIO conversion.
Sun, Apr 24, 1:31 PM
kib accepted D35034: g_vfs_done: Only report ENXIO once.
Sun, Apr 24, 1:30 PM
kib added inline comments to D35034: g_vfs_done: Only report ENXIO once.
Sun, Apr 24, 12:51 AM

Sat, Apr 23

kib updated the diff for D35014: Fix a race between fork(2) and PROC_REAP_KILL subtree.

Add stop_all_proc_blocker.

Sat, Apr 23, 10:57 PM
kib accepted D35034: g_vfs_done: Only report ENXIO once.
Sat, Apr 23, 10:22 PM
kib accepted D35037: g_vfs_done: Report when we switch on ENXIO conversion.
Sat, Apr 23, 10:22 PM
kib accepted D35036: geom_vfs: make sc_orphaned and sc_enxio_active bools.
Sat, Apr 23, 10:21 PM
kib added inline comments to D35034: g_vfs_done: Only report ENXIO once.
Sat, Apr 23, 10:21 PM
kib added inline comments to D35034: g_vfs_done: Only report ENXIO once.
Sat, Apr 23, 8:03 PM
kib added inline comments to D35034: g_vfs_done: Only report ENXIO once.
Sat, Apr 23, 3:10 PM
kib updated the diff for D35014: Fix a race between fork(2) and PROC_REAP_KILL subtree.

Stop the victim while signalling.

Sat, Apr 23, 1:57 PM

Thu, Apr 21

kib added inline comments to D34980: Add tests for getpagesize{,s}.
Thu, Apr 21, 9:28 PM
kib accepted D34981: sigtimedwait: Prevent timeout math overflows..
Thu, Apr 21, 1:57 PM
kib added inline comments to D34981: sigtimedwait: Prevent timeout math overflows..
Thu, Apr 21, 12:24 AM

Wed, Apr 20

kib accepted D34984: Remove PAGE_SIZE from libthr.
Wed, Apr 20, 11:10 PM
kib accepted D34983: Use the existing page size in libthr.
Wed, Apr 20, 11:06 PM
kib added a comment to D35014: Fix a race between fork(2) and PROC_REAP_KILL subtree.

Per-commit view is available at https://kib.kiev.ua/git/gitweb.cgi?p=deviant3.git;a=shortlog;h=refs/heads/reap

Wed, Apr 20, 11:02 PM
kib requested review of D35014: Fix a race between fork(2) and PROC_REAP_KILL subtree.
Wed, Apr 20, 11:02 PM
kib committed R10:d282bb42c341: syscons: silent 'set but unused' warning in some configurations (authored by kib).
syscons: silent 'set but unused' warning in some configurations
Wed, Apr 20, 10:56 PM
kib added inline comments to D34980: Add tests for getpagesize{,s}.
Wed, Apr 20, 2:01 PM
kib added a comment to D34907: dmar: Disable PMR in driver attach routine.

If this is a laptop (judging by ahci/amount of memory), you most likely have two DMARs, one serving the GPU, and another covering all PCIe devices. In this configuration, whatever was protected by PMR for GPU, does not make sense to unprotect.

Wed, Apr 20, 10:46 AM
kib accepted D34978: Respect maxaddr limit with nonzero offset in iommu_gas_match_one.
Wed, Apr 20, 9:43 AM
kib added a comment to D34907: dmar: Disable PMR in driver attach routine.
In D34907#792838, @kib wrote:

As a second though, this control is global. Do you want it to be per-DMAR unit, in fact? [I am fine with this refine to be done later]

IMHO having one knob is better:

  1. Other DMAR related tunables are "global", e.g. hw.dmar.enable, hw.dmar.dma.
  2. From user perspective if they want to disable PMR it's probably on all units.

Otherwise we'd end up in a weird situation where some devices can access memory that was previously used by firmware and other don't.
I can't think of a scenario where that would be useful.

Wed, Apr 20, 9:40 AM

Tue, Apr 19

kib added a comment to D34907: dmar: Disable PMR in driver attach routine.

As a second though, this control is global. Do you want it to be per-DMAR unit, in fact? [I am fine with this refine to be done later]

Tue, Apr 19, 9:39 PM
kib accepted D34907: dmar: Disable PMR in driver attach routine.
Tue, Apr 19, 9:38 PM
kib accepted D33693: Run softclock threads at a hardware ithread priority..

Doesnt' all real-time priority threads run to completion? In other words, if all ithreads are put under the same priority, then there is no preemption to let other ithread to run until current ithread finishes? To put it differently, making ithreads time-share interrupt time requires changes to the schedulers, not just adjusting the priorities.

Tue, Apr 19, 9:36 PM
kib added a reverting change for R10:a5970a529c2d: Make files opened with O_PATH to not block non-forced unmount: R10:821467b5a087: Mostly revert a5970a529c2d95271: Make files opened with O_PATH to not block non….
Tue, Apr 19, 9:04 PM
kib committed R10:821467b5a087: Mostly revert a5970a529c2d95271: Make files opened with O_PATH to not block non… (authored by kib).
Mostly revert a5970a529c2d95271: Make files opened with O_PATH to not block non…
Tue, Apr 19, 9:04 PM
kib added a reverting change for D29323: Implement O_PATH: R10:821467b5a087: Mostly revert a5970a529c2d95271: Make files opened with O_PATH to not block non….
Tue, Apr 19, 9:04 PM
kib accepted D34961: Have posixshm_test ask the kernel for the page size.

BTW, should PAGE_SIZE be the least guaranteed page size? In other words, should some test ensure _Static_assert(PAGE_SIZE <= ps[0]). Also perhaps something about ps[0] being multiple of PAGE_SIZE worth to be guaranteed?

Tue, Apr 19, 8:48 PM
kib accepted D34960: Fill the page size array in one posix shm test.
Tue, Apr 19, 8:44 PM
kib committed R10:3122e54a4f4b: Revert rest of a5970a529c2d95271: use vrefact() when working on fp->f_vnode (authored by kib).
Revert rest of a5970a529c2d95271: use vrefact() when working on fp->f_vnode
Tue, Apr 19, 8:24 PM
kib added a reverting change for D29323: Implement O_PATH: R10:6daddc54debb: Mostly revert a5970a529c2d95271: Make files opened with O_PATH to not block non….
Tue, Apr 19, 8:24 PM
kib added a reverting change for R10:a5970a529c2d: Make files opened with O_PATH to not block non-forced unmount: R10:6daddc54debb: Mostly revert a5970a529c2d95271: Make files opened with O_PATH to not block non….
Tue, Apr 19, 8:24 PM
kib committed R10:6daddc54debb: Mostly revert a5970a529c2d95271: Make files opened with O_PATH to not block non… (authored by kib).
Mostly revert a5970a529c2d95271: Make files opened with O_PATH to not block non…
Tue, Apr 19, 8:23 PM

Sat, Apr 16

kib added a comment to D34184: struct kinfo_file changes needed for lsof to work using only usermode APIs.

Regardless of the notes I put above, please mail me the git patch with the correct 'Author' metadata.

Sat, Apr 16, 11:48 PM · Contributor Reviews (base)
kib added a comment to D34907: dmar: Disable PMR in driver attach routine.

I am not sure that I like/agree with the patch. My main objection is that you are unconditionally tickle PMR despite DMAR state. In fact, it is quite far from the place where you put the call to dmar_disable_protected_regions(), to the actual enable of translation.

Sat, Apr 16, 2:25 PM

Apr 16 2022

kib committed R10:539dc6ea3b4e: Implement procstat(1) advlocks command (authored by kib).
Implement procstat(1) advlocks command
Apr 16 2022, 2:19 AM
kib committed R10:f9daaf452a8a: Document procstat(1) advlock command (authored by kib).
Document procstat(1) advlock command
Apr 16 2022, 2:19 AM
kib committed R10:d52eaf841577: procstat(1): add ability to specify subcommands not requiring pid lists (authored by kib).
procstat(1): add ability to specify subcommands not requiring pid lists
Apr 16 2022, 2:19 AM
kib committed R10:c0a496394140: libprocstat: document procstat_getadvlock(3) (authored by kib).
libprocstat: document procstat_getadvlock(3)
Apr 16 2022, 2:19 AM
kib committed R10:c649ead622cd: libprocstat: add procstat_getadvlock(3) (authored by kib).
libprocstat: add procstat_getadvlock(3)
Apr 16 2022, 2:19 AM
kib committed R10:e858a8053d47: Add sysctl KERN_LOCKF (authored by kib).
Add sysctl KERN_LOCKF
Apr 16 2022, 2:19 AM
kib committed R10:deb674c402c8: sys/user.h: Add kinfo_lockf structure to report advisory locks (authored by kib).
sys/user.h: Add kinfo_lockf structure to report advisory locks
Apr 16 2022, 2:19 AM