Page MenuHomeFreeBSD
Feed Advanced Search

Oct 16 2019

kib committed rS353664: Port r353622 to sparc64 and arm v4..
Port r353622 to sparc64 and arm v4.
Oct 16 2019, 9:07 PM
kib closed D22056: Port D22041/r353622 to sparc64 and arm v4..
Oct 16 2019, 9:07 PM
kib accepted D22061: Build toolchain components as dynamically linked executables by default.
Oct 16 2019, 9:04 PM
kib added inline comments to D21597: Drop the object lock in vfs_bio and cluster.
Oct 16 2019, 7:18 PM
kib retitled D22056: Port D22041/r353622 to sparc64 and arm v4. from Port D22041/r353622 to sparc64. to Port D22041/r353622 to sparc64 and arm v4..
Oct 16 2019, 7:03 PM
kib updated the diff for D22056: Port D22041/r353622 to sparc64 and arm v4..

Handle arm v4.

Oct 16 2019, 7:03 PM
kib added inline comments to D21597: Drop the object lock in vfs_bio and cluster.
Oct 16 2019, 6:55 PM
kib updated the diff for D22007: amd64: Ensure that the state of the switched-out thread is fully flushed.

Rework patch as discussed above, changing most of the sfence uses by a locked op.

Oct 16 2019, 2:15 PM
kib accepted D22040: Further constrain the use of per-CPU page caches..
Oct 16 2019, 12:40 PM
kib accepted D22036: Reduce the scope of the object lock in fault..
Oct 16 2019, 12:38 PM
kib added inline comments to D21597: Drop the object lock in vfs_bio and cluster.
Oct 16 2019, 12:36 PM
kib created D22056: Port D22041/r353622 to sparc64 and arm v4..
Oct 16 2019, 12:24 PM
kib added a comment to D21883: Fix interface between nfsclient and vnode pager..

Alan. Mark, could you please look at the sys/vm part of the patch ? It was changed, and I think it was simplified comparing to the original version. Now the change is that vm_fault() path can take the vnode lock earlier, comparing with previous more delicate (and apparently buggy) move of the size check.

Oct 16 2019, 7:19 AM
kib added a comment to D22007: amd64: Ensure that the state of the switched-out thread is fully flushed.

So, can we get to some conclusion there, please ? I see two action items:

  1. Addition of SFENCE. I now tend to think that SFENCE should be moved to the else part of 'oldpmap == pmap' in pmap_activate_sw(). Intel changed its description several times, I believe it is the safest way.
  2. From the discussion, I believe that SFENCEs which brace CLFLUSH{OPT} for Intel could be replaced by locked atomic, i.e. atomic_thread_fence_seq_cst().
  3. Additionally, I will try to make a query about this stuff through FF/Intel technical contact.
Oct 16 2019, 7:17 AM
kib closed D22041: Fix assert in powerpc pmaps after introduction of object busy..
Oct 16 2019, 7:09 AM
kib committed rS353622: Fix assert in PowerPC pmaps after introduction of object busy..
Fix assert in PowerPC pmaps after introduction of object busy.
Oct 16 2019, 7:09 AM
kib committed rS353620: MFC r353463:.
MFC r353463:
Oct 16 2019, 7:04 AM
kib accepted D22044: Clear PGA_WRITEABLE in moea_remove_pvo()..
Oct 16 2019, 6:49 AM

Oct 15 2019

kib added a comment to D22007: amd64: Ensure that the state of the switched-out thread is fully flushed.
In D22007#481450, @alc wrote:
In D22007#481438, @kib wrote:

BTW, I did tried to find a reference in the SDM vol.3 that would certainly witness that interrupts and exceptions are serialized, and failed. I know for sure that sysenter is not serializing.

If an application performs a system call in the middle of, for example, a sequence of non-temporal stores, without having performed an sfence first, I would say that the application is broken. :-)

Oct 15 2019, 7:56 PM
kib added a comment to D22041: Fix assert in powerpc pmaps after introduction of object busy..
In D22041#481451, @alc wrote:

If my recollection of the sparc64 pmap is correct, it will have the same issue.

Oct 15 2019, 7:54 PM
kib added a comment to D22041: Fix assert in powerpc pmaps after introduction of object busy..
In D22041#481448, @alc wrote:

Why not use PMAP_ENTER_NOSLEEP instead of introducing a new flag?

Oct 15 2019, 7:54 PM
kib added a comment to D22007: amd64: Ensure that the state of the switched-out thread is fully flushed.

BTW, I did tried to find a reference in the SDM vol.3 that would certainly witness that interrupts and exceptions are serialized, and failed. I know for sure that sysenter is not serializing.

Oct 15 2019, 6:37 PM
kib updated the diff for D22041: Fix assert in powerpc pmaps after introduction of object busy..

Really update used var.

Oct 15 2019, 6:23 PM
kib updated the diff for D22041: Fix assert in powerpc pmaps after introduction of object busy..

Update flags arg name for booke.
Assert that the object is locked if !quick.

Oct 15 2019, 5:51 PM
kib created D22041: Fix assert in powerpc pmaps after introduction of object busy..
Oct 15 2019, 4:26 PM
kib accepted D22038: Make vmdaemon timeout configurable.
Oct 15 2019, 3:50 PM
kib added a comment to D22038: Make vmdaemon timeout configurable.

What is the purpose ?

Oct 15 2019, 3:38 PM
kib added a comment to D21883: Fix interface between nfsclient and vnode pager..

This version passes stress2, according to Peter' report.

Oct 15 2019, 7:29 AM
kib updated the diff for D21883: Fix interface between nfsclient and vnode pager..

Rebase.
Disable assert for ZFS, I do not intend to fix it now.

Oct 15 2019, 7:29 AM
kib added a comment to D22007: amd64: Ensure that the state of the switched-out thread is fully flushed.

I remembered why I did not wanted to put the SFENCE instruction in pmap_activate_sw(). Description of e.g. CLFLUSHOPT (as well as e.g. AMD CLZERO) explicitly state that SFENCE is required, they do not mention serialization instructions.

Oct 15 2019, 7:11 AM

Oct 14 2019

kib added a comment to D22007: amd64: Ensure that the state of the switched-out thread is fully flushed.
In D22007#481114, @alc wrote:

I'm confused as to why this is necessary. pmap_activate_sw() performs a serializing instruction, specifically, a move to cr3. And, Section 8.2.5 of Volume 3 says,

Program synchronization can also be carried out with serializing instructions (see Section 8.3). These instructions
are typically used at critical procedure or task boundaries to force completion of all previous instructions before a
jump to a new section of code or a context switch occurs. Like the I/O and locking instructions, the processor waits
until all previous instructions have been completed and all buffered writes have been drained to memory before
executing the serializing instruction.

And, the next paragraph discusses the use of fences, e.g., sfence, instead of serializing instructions, e.g., cpuid.

Oct 14 2019, 8:27 PM
kib added inline comments to D22007: amd64: Ensure that the state of the switched-out thread is fully flushed.
Oct 14 2019, 6:42 PM
kib added a comment to D22007: amd64: Ensure that the state of the switched-out thread is fully flushed.
In D22007#481089, @jhb wrote:

Does i386 require a similar fix (or do we not care enough about i386 to bother?)

Oct 14 2019, 6:23 PM

Oct 13 2019

kib accepted D22008: vfs: return free vnode batches in sync instead of vfs_msync.
Oct 13 2019, 3:28 PM
kib accepted D22009: vfs: add MNTK_NOMSYNC.
Oct 13 2019, 3:21 PM
kib added a comment to D21964: Make vm_map a threaded tree.

What do you mean by idle map entries ? The deferred list ?

Oct 13 2019, 3:19 PM
kib created D22007: amd64: Ensure that the state of the switched-out thread is fully flushed.
Oct 13 2019, 2:05 PM
kib updated the diff for D21883: Fix interface between nfsclient and vnode pager..

Rebase.

Oct 13 2019, 7:13 AM
kib committed rS353465: MFC r353413:.
MFC r353413:
Oct 13 2019, 6:59 AM
kib committed rS353464: MFC r353413:.
MFC r353413:
Oct 13 2019, 6:59 AM
kib committed rS353463: Restore nofaulting operations after r352807.
Restore nofaulting operations after r352807
Oct 13 2019, 6:57 AM
kib closed D21992: Restore nofaulting operations after r352807.
Oct 13 2019, 6:57 AM

Oct 12 2019

kib updated the diff for D21992: Restore nofaulting operations after r352807.

Stop using td in vm_fault_trap(), use curthread.

Oct 12 2019, 5:31 PM
kib updated the diff for D21883: Fix interface between nfsclient and vnode pager..

Add comment trying to explain convoluted ncl_pager_setsize() interface.

Oct 12 2019, 4:20 PM
kib updated the summary of D21992: Restore nofaulting operations after r352807.
Oct 12 2019, 3:47 PM
kib created D21992: Restore nofaulting operations after r352807.
Oct 12 2019, 3:27 PM

Oct 11 2019

kib updated the diff for D21883: Fix interface between nfsclient and vnode pager..

Instead of unconditionally moving the object size check for vnodes, ensure that the vnode is locked at the existing check place. Only do the locking for filesystems that require it, by a flag on the object.

Oct 11 2019, 9:32 PM
kib accepted D21984: vfs: reduce failing trylock attempts in mnt_vnode_next_active.
Oct 11 2019, 8:57 PM
kib added a comment to D21984: vfs: reduce failing trylock attempts in mnt_vnode_next_active.

This cannot go in without explanation why mtx_owner is checked, in the comment above. But it should not go in regardless, if such check is useful perhaps it should be added to VI_TRYLOCK, or mtx_trylock, or another version of VI_TRYLOCK created.

Oct 11 2019, 8:23 PM
kib committed rS353447: devfs_vptocnp(): correct the component name when node is not at top..
devfs_vptocnp(): correct the component name when node is not at top.
Oct 11 2019, 6:41 PM
kib committed rS353446: Plug the rest of undef behavior places that were missed in r337456..
Plug the rest of undef behavior places that were missed in r337456.
Oct 11 2019, 6:37 PM
kib added inline comments to D21976: amd64 pmap: per-domain pv chunk list.
Oct 11 2019, 5:22 PM
kib added a comment to D21978: vmm: remove a wmb() call.

It is relative, of course. SFENCE might not flush store buffers faster than possbile, but it does guarantee that code after it sees store buffers flushed.

Oct 11 2019, 5:19 PM
kib added inline comments to D21976: amd64 pmap: per-domain pv chunk list.
Oct 11 2019, 5:07 PM

Oct 10 2019

kib committed rS353413: Typo out->in..
Typo out->in.
Oct 10 2019, 6:52 PM
kib accepted D21970: Add an ldscript for amd64 kmods..
Oct 10 2019, 4:26 PM
kib committed rS353404: MFC r353065, MFS12 353385:.
MFC r353065, MFS12 353385:
Oct 10 2019, 3:20 PM
kib added inline comments to D21592: (vm object 3) Add a shared object busy synchronization mechanism that blocks new page busy acquires while held..
Oct 10 2019, 8:57 AM
kib committed rS353388: MFC r353065:.
MFC r353065:
Oct 10 2019, 8:50 AM
kib committed rS353387: MFC r353064:.
MFC r353064:
Oct 10 2019, 8:49 AM
kib committed rS353386: MFC r353033:.
MFC r353033:
Oct 10 2019, 8:47 AM
kib committed rS353385: MFC r353065:.
MFC r353065:
Oct 10 2019, 8:33 AM
kib committed rS353384: MFC r353064:.
MFC r353064:
Oct 10 2019, 8:31 AM
kib committed rS353383: MFC r353033:.
MFC r353033:
Oct 10 2019, 8:28 AM

Oct 9 2019

kib added a comment to D21883: Fix interface between nfsclient and vnode pager..
In D21883#479546, @kib wrote:

I think the fault handler change is ok. I read through the NFS changes but am not very confident in that area.

Are you fine with both vm changes commits with 'Reviewed by: you' ?

Yes.

I was somewhat surprised to see that vm_page_alloc() and its callees do not verify that the requested pindex is < object->size. Indeed, vm_reserv_alloc_page() even handles the case where pindex >= object->size.

This is because we actually have pages beyond EOF on the object' queue. Main offender is UFS, where negative logical block numbers are used for indirect blocks and extended data blocks. Then the negative indexes of the blocks are converted into very large pindexes, which cannot be equal to pindex of any data page, due to sign extension.

I see, thanks. I knew about the negative block numbers but did not remember that they are used in VMIO.

Oct 9 2019, 8:29 AM
kib added inline comments to D21592: (vm object 3) Add a shared object busy synchronization mechanism that blocks new page busy acquires while held..
Oct 9 2019, 8:11 AM
kib added a comment to D21883: Fix interface between nfsclient and vnode pager..

Peter, could you, please, test this ? Whole test suite run is required, just NFS part is not enough.

Oct 9 2019, 1:21 AM
kib updated the diff for D21883: Fix interface between nfsclient and vnode pager..

Add comment in vm_fault.c.

Oct 9 2019, 1:20 AM
kib added a comment to D21883: Fix interface between nfsclient and vnode pager..

I think the fault handler change is ok. I read through the NFS changes but am not very confident in that area.

Are you fine with both vm changes commits with 'Reviewed by: you' ?

Oct 9 2019, 1:20 AM

Oct 8 2019

kib accepted D21906: amd64: plug spurious cld instructions.
Oct 8 2019, 9:11 PM
kib accepted D21548: (vm object 1) Replace busy checks and sleeps with acquires where it is trivial to do so..
Oct 8 2019, 8:40 AM
kib accepted D21594: (vm object 4) Wrap valid accesses in inlines. Add missing busy acquires to protect valid..
Oct 8 2019, 8:39 AM
kib added inline comments to D21592: (vm object 3) Add a shared object busy synchronization mechanism that blocks new page busy acquires while held..
Oct 8 2019, 8:38 AM
kib added a comment to D21678: Use AMD CLZERO instruction for pagezero..

Am I right that the total wall clock time for buildworld is same, while the system time slighly reduced ?

Oct 8 2019, 8:19 AM

Oct 7 2019

kib added a comment to D21921: devfs: don't invoke dev_clone for !ISOPEN inquiries.

dev_clone(9) does certainly document it as being invoked for all name lookups; I'm thinking passing the flags along would be more appropriate for this.

Oct 7 2019, 8:03 PM

Oct 6 2019

kib accepted D21646: vfs: add root vnode caching for mount points.
Oct 6 2019, 7:17 PM
kib accepted D21833: amd64 pmap: retire the global lock array in favor of per-superpage locks.
Oct 6 2019, 7:13 PM
kib added inline comments to D21740: lockprof: fix hangs under load when changing the state or dumping stats.
Oct 6 2019, 7:12 PM
kib added inline comments to D21883: Fix interface between nfsclient and vnode pager..
Oct 6 2019, 6:43 PM
kib added inline comments to D21592: (vm object 3) Add a shared object busy synchronization mechanism that blocks new page busy acquires while held..
Oct 6 2019, 12:40 PM
kib added inline comments to D21833: amd64 pmap: retire the global lock array in favor of per-superpage locks.
Oct 6 2019, 12:34 PM
kib added inline comments to D21592: (vm object 3) Add a shared object busy synchronization mechanism that blocks new page busy acquires while held..
Oct 6 2019, 12:30 PM
kib added a comment to D21909: amd64 pmap: stop actively maintaning pages for minidump.

Well, this relies on the pv chunks list consistency. In other words, if any CPU in the system modifies pv lru list, minidump would hang/crash.
More, you are locking the mutex, which is either nop or hangs as well.

Oct 6 2019, 12:14 PM
kib accepted D21903: Add per-process flag to disable logsigexit.

It is impossible to turn logsigexit back to default with proccontrol(1), but this is arguably a wart in the current structure of the arguments parser.

Oct 6 2019, 12:11 PM
kib updated the diff for D21883: Fix interface between nfsclient and vnode pager..

Second LK_UPGRADE should have been LK_TRYUPGRADE.

Oct 6 2019, 8:42 AM
kib added inline comments to D21883: Fix interface between nfsclient and vnode pager..
Oct 6 2019, 8:42 AM

Oct 5 2019

kib added inline comments to D21904: kern_conf: fully initialize cloned devices with make_dev_args, too.
Oct 5 2019, 7:26 PM
kib accepted D21904: kern_conf: fully initialize cloned devices with make_dev_args, too.
Oct 5 2019, 7:08 PM
kib added inline comments to D21833: amd64 pmap: retire the global lock array in favor of per-superpage locks.
Oct 5 2019, 6:54 PM
kib added a comment to D21906: amd64: plug spurious cld instructions.

Why did you left i386 out ?

Oct 5 2019, 5:36 PM
kib accepted D21905: devfs: plug redundant bwillwrite avoidance.

You may note that this is a revert of r244643, in the commit message.

Oct 5 2019, 5:08 PM
kib added a comment to D21883: Fix interface between nfsclient and vnode pager..

I have a tangential question regarding the vnode size: in vn_lseek()'s L_XTND case, we use VOP_GETATTR to get the file size. Why is it not sufficient to use the size from the pager field, under the shared vnode lock?

Oct 5 2019, 10:01 AM
kib added a comment to D21903: Add per-process flag to disable logsigexit.

You need to handle compat32.

Oct 5 2019, 9:56 AM

Oct 4 2019

kib accepted D21896: link_elf_obj: Apply protection based on section flags..
Oct 4 2019, 7:46 PM
kib added inline comments to D21896: link_elf_obj: Apply protection based on section flags..
Oct 4 2019, 5:33 PM
kib accepted D21885: nvdimm(4): Add nvdimm_e820 pseudo-bus.
Oct 4 2019, 1:21 PM
kib committed rS353102: MFC r352807:.
MFC r352807:
Oct 4 2019, 12:18 PM

Oct 3 2019

kib committed rS353065: tmpfs_readdir(): unlock the locked node..
tmpfs_readdir(): unlock the locked node.
Oct 3 2019, 7:55 PM
kib committed rS353064: tmpfs_rename: style..
tmpfs_rename: style.
Oct 3 2019, 7:52 PM
kib accepted D21887: Formalize the use of linker scripts for kernel modules..
Oct 3 2019, 6:19 PM