Page MenuHomeFreeBSD

kib (Konstantin Belousov)
User

Projects

User Details

User Since
May 16 2014, 7:35 PM (287 w, 6 d)

Recent Activity

Today

kib updated subscribers of D22467: Ignore object->handle for OBJ_ANON objects..
Fri, Nov 22, 11:22 AM
kib accepted D22392: Fix locking in vm_reserv_reclaim_contig()..
Fri, Nov 22, 12:39 AM

Yesterday

kib accepted D22472: Move anonymous object copying into its own function and avoid objectlocking for non-anonymous objects..
Thu, Nov 21, 12:34 PM
kib added a comment to D22409: Optimize swp_pager_meta_lookup() to find additionally the numbers of continuous blocks..

Where is this optimization actually used ? Almost all calls to vm_pager_has_page() pass NULLs for behind/ahead.

Thu, Nov 21, 12:30 PM

Wed, Nov 20

kib added inline comments to D22467: Ignore object->handle for OBJ_ANON objects..
Wed, Nov 20, 9:08 PM
kib updated the diff for D22467: Ignore object->handle for OBJ_ANON objects..

shadow_count > 0 implies OBJ_ANON.

Wed, Nov 20, 9:01 PM
kib added inline comments to D22467: Ignore object->handle for OBJ_ANON objects..
Wed, Nov 20, 8:56 PM
kib created D22467: Ignore object->handle for OBJ_ANON objects..
Wed, Nov 20, 7:55 PM
kib committed rS354889: amd64: in double fault handler, do not rely on sane gsbase value..
amd64: in double fault handler, do not rely on sane gsbase value.
Wed, Nov 20, 11:12 AM
kib accepted D22202: vfs: change si_usecount management to count used vnodes.
Wed, Nov 20, 11:03 AM
kib committed rS354888: MFC r354787:.
MFC r354787:
Wed, Nov 20, 10:27 AM
kib committed rS354887: MFC r354788:.
MFC r354788:
Wed, Nov 20, 10:26 AM

Tue, Nov 19

kib added a comment to D22423: Only insert objects into a shadow list if they can later be collapsed..

Kind of obvious idea is to switch to periodic scans for collapses, and make the scan to walk the whole shadow chain for each map entry that has anon object on top. I.e. instead of trying to do collapses at precise points, we would have yet another daemon.

Tue, Nov 19, 10:01 PM
kib committed rS354856: MFC r354644:.
MFC r354644:
Tue, Nov 19, 3:32 PM
kib accepted D22423: Only insert objects into a shadow list if they can later be collapsed..

This should be fine IMO.

Tue, Nov 19, 3:28 PM
kib accepted D22119: Add a constant OBJ_ANONYMOUS flag to optimize out some locking..
Tue, Nov 19, 3:26 PM
kib accepted D22186: Remove unnecessary object locking from the vnode pager..
Tue, Nov 19, 3:15 PM
kib added a comment to D22324: try to free blocks by upgrading object locks.

I am somewhat curious how much does the upgrade succeed. Did you measured it ? E.g. the counters of total vm_pager_page_unswapped calls during buildworld vs. the number of times the lock needs to be upgraded vs. the number of successfull upgrades.

Tue, Nov 19, 3:14 PM

Mon, Nov 18

kib committed rS354830: bus_dma_dmar_set_buswide(9): KPI to indicate that the whole dmar.
bus_dma_dmar_set_buswide(9): KPI to indicate that the whole dmar
Mon, Nov 18, 8:57 PM
kib closed D22434: bus_dma_dmar_set_buswide(9): KPI to indicate that whole dmar context should share page tables..
Mon, Nov 18, 8:57 PM
kib committed rS354828: Add x86 msr tweak KPI..
Add x86 msr tweak KPI.
Mon, Nov 18, 8:54 PM
kib closed D22431: Add x86 msr tweak KPI..
Mon, Nov 18, 8:54 PM
kib updated the diff for D22431: Add x86 msr tweak KPI..

x86_var.h was missed.

Mon, Nov 18, 7:52 PM
kib updated the diff for D22431: Add x86 msr tweak KPI..

Make execution submode numeric.

Mon, Nov 18, 7:27 PM
kib updated the diff for D22431: Add x86 msr tweak KPI..

Add MSR_OP_RENDEZVOUS. Assert that exactly one command mode flag is passed.

Mon, Nov 18, 4:20 PM
kib accepted D22437: Change swp_pager_meta_ctl to swp_pager_meta_lookup.
Mon, Nov 18, 3:41 PM
kib committed rS354811: MFC r354630:.
MFC r354630:
Mon, Nov 18, 1:38 PM
kib committed rS354810: MFC r354591:.
MFC r354591:
Mon, Nov 18, 1:37 PM
kib committed rS354809: MFC r354592:.
MFC r354592:
Mon, Nov 18, 1:34 PM
kib updated the diff for D22431: Add x86 msr tweak KPI..

Rename to x86_msr_op().
Restore sched_bind() mode of broadcast to keep the ssb toggle algorithm unchanged. I do think that my switch to smp_rendezvous for ssb is actually fine because our use of mwait does not re-enable interrupts, but let do that as separate change.

Mon, Nov 18, 1:21 PM
kib added a comment to D22434: bus_dma_dmar_set_buswide(9): KPI to indicate that whole dmar context should share page tables..
In D22434#490451, @mav wrote:

I am not completely certain in what part of the driver it is cleaner to put this line. I though about the beginning, as I understand it should be just before the first bus_dma tag access or interrupt setup. But in case of attach failure I guess it should better be reverted somehow? Since there is no such method I put it when most of probe process is done.

There are two requirements for the call to bus_dma_dmar_set_buswide():

  1. the call must occur before the first busdma tag allocation for anything on this bus
  2. the call must not occur before you are certain that the device identified has the bus-wide property.
Mon, Nov 18, 9:48 AM

Sun, Nov 17

kib added inline comments to D22324: try to free blocks by upgrading object locks.
Sun, Nov 17, 10:52 PM
kib accepted D22402: Create swp_pager_free_empty_swblk function to free if a swblk is free..
Sun, Nov 17, 6:10 PM
kib updated the diff for D22298: Record part of the owner struct thread pointer into busy_lock..

Weaken asserts when pages are unbusy in context of io completion handlers.

Sun, Nov 17, 6:02 PM
kib added a comment to D22434: bus_dma_dmar_set_buswide(9): KPI to indicate that whole dmar context should share page tables..

Alexander, I obviously cannot test this, I only ensured that machine with DMAR enabled still boots.

Sun, Nov 17, 6:00 PM
kib created D22434: bus_dma_dmar_set_buswide(9): KPI to indicate that whole dmar context should share page tables..
Sun, Nov 17, 5:59 PM
kib created D22431: Add x86 msr tweak KPI..
Sun, Nov 17, 4:09 PM
kib committed rS354791: Update controlelf(1) to ahndle stack gap disable flag..
Update controlelf(1) to ahndle stack gap disable flag.
Sun, Nov 17, 2:55 PM
kib committed rS354790: Add elf image flag to disable stack gap..
Add elf image flag to disable stack gap.
Sun, Nov 17, 2:54 PM
kib committed rS354789: kern_exec: p_osrel and p_fctl0 were obliterated by failed execve(2) attempt..
kern_exec: p_osrel and p_fctl0 were obliterated by failed execve(2) attempt.
Sun, Nov 17, 2:52 PM
kib closed D22379: Add STKGAP disable fctl flag..
Sun, Nov 17, 2:52 PM
kib committed rS354788: amd64 copyout: remove irrelevant comment..
amd64 copyout: remove irrelevant comment.
Sun, Nov 17, 2:42 PM
kib committed rS354787: Document required size of buffer for elf_aux_info(3)..
Document required size of buffer for elf_aux_info(3).
Sun, Nov 17, 2:11 PM
kib closed D22380: Document required size of buffer for elf_aux_info(3)..
Sun, Nov 17, 2:11 PM
kib accepted D22401: Check for errors from copyout() and suword*() in sv_copyout_args/strings..
Sun, Nov 17, 1:53 PM

Sat, Nov 16

kib added inline comments to D22396: Simplify vm_pageout_init_domain() and add a "big picture" comment..
Sat, Nov 16, 7:09 PM
kib committed rS354770: MFC r354697:.
MFC r354697:
Sat, Nov 16, 11:02 AM
kib committed rS354769: MFC r354696:.
MFC r354696:
Sat, Nov 16, 11:00 AM
kib committed rS354768: MFC r354697:.
MFC r354697:
Sat, Nov 16, 10:50 AM
kib committed rS354767: MFC r354766:.
MFC r354766:
Sat, Nov 16, 10:49 AM
kib accepted D22397: Widen aflags to 16 bits..
Sat, Nov 16, 10:29 AM
kib accepted D22348: When traversing vm_map entries, don't look up the same neighbor twice.
Sat, Nov 16, 10:25 AM
kib accepted D22405: look for in-transition status in each map entry.
Sat, Nov 16, 10:22 AM
kib added inline comments to D22395: Reclaim memory from UMA if the page daemon is struggling..
Sat, Nov 16, 10:20 AM
kib accepted D22394: Update the checks in vm_page_zone_import()..
Sat, Nov 16, 10:17 AM
kib accepted D22392: Fix locking in vm_reserv_reclaim_contig()..
Sat, Nov 16, 10:07 AM
kib accepted D22391: vm_reserv: Group per-domain data in the same structure..
Sat, Nov 16, 10:03 AM

Fri, Nov 15

kib updated the diff for D22379: Add STKGAP disable fctl flag..

One more 'p'.

Fri, Nov 15, 9:49 PM
kib updated the diff for D22379: Add STKGAP disable fctl flag..

Only use imgp after it is initialized, and use p later.

Fri, Nov 15, 9:22 PM
kib added inline comments to D22379: Add STKGAP disable fctl flag..
Fri, Nov 15, 9:21 PM
kib added inline comments to D22374: TSX Asynchronous Abort Mitigation.
Fri, Nov 15, 8:44 PM
kib added a comment to D22374: TSX Asynchronous Abort Mitigation.

You also need to reset the taa state after resume, at least if it was set to disable TSX. See how ibrs and sbb are reset in acpi_sleep_machdep(). Or you need to re-apply TSX disabling command after resume.

Fri, Nov 15, 8:16 PM
kib added inline comments to D22374: TSX Asynchronous Abort Mitigation.
Fri, Nov 15, 8:10 PM
kib accepted D22358: NTPD Circumvent ASLR.
Fri, Nov 15, 3:39 PM
kib created D22380: Document required size of buffer for elf_aux_info(3)..
Fri, Nov 15, 9:51 AM
kib created D22379: Add STKGAP disable fctl flag..
Fri, Nov 15, 9:30 AM
kib updated subscribers of D22358: NTPD Circumvent ASLR.
Fri, Nov 15, 8:46 AM
kib added inline comments to D22358: NTPD Circumvent ASLR.
Fri, Nov 15, 8:46 AM

Thu, Nov 14

kib added inline comments to D22358: NTPD Circumvent ASLR.
Thu, Nov 14, 10:25 PM
kib added a comment to D22374: TSX Asynchronous Abort Mitigation.

That said, would be it more straightforward to add logic to hw_mds_recalculate() instead, to enable the workaround if either of mds_disable or tsx_disable is forced. I mean, get rid of hw_tsx_recalculate(), check TAA in hw_mds_recalculate.

Thu, Nov 14, 7:38 PM
kib accepted D22359: atomic: Add atomic_cmpset_masked to powerpc and use it.
Thu, Nov 14, 7:28 PM
kib added a comment to D22358: NTPD Circumvent ASLR.

If you want to disable ASLR, it is enough to issue procctl(), checking global system settings gives no value and is in fact racy.

Thu, Nov 14, 7:24 PM

Wed, Nov 13

kib committed rS354697: cpucontrol: print more useful information when MSR access fails..
cpucontrol: print more useful information when MSR access fails.
Wed, Nov 13, 10:43 PM
kib committed rS354696: amd64: only set PCB_FULL_IRET pcb flag when #gp or similar exception comes.
amd64: only set PCB_FULL_IRET pcb flag when #gp or similar exception comes
Wed, Nov 13, 10:40 PM

Tue, Nov 12

kib committed rS354651: MFC r354649:.
MFC r354649:
Tue, Nov 12, 6:04 PM
kib committed rS354650: MFC r354649:.
MFC r354649:
Tue, Nov 12, 6:03 PM
kib committed rS354649: Workaround for Intel SKL002/SKL012S errata..
Workaround for Intel SKL002/SKL012S errata.
Tue, Nov 12, 6:01 PM
kib committed rS354647: i386: stop guessing the address of the trap frame in ddb backtrace..
i386: stop guessing the address of the trap frame in ddb backtrace.
Tue, Nov 12, 3:56 PM
kib closed D22321: i386: stop guessing the address of the trap frame in ddb backtrace..
Tue, Nov 12, 3:56 PM
kib closed D22302: amd64: move gdt into pcpu.
Tue, Nov 12, 3:52 PM
kib committed rS354646: amd64: move GDT into PCPU area..
amd64: move GDT into PCPU area.
Tue, Nov 12, 3:52 PM
kib reopened D22302: amd64: move gdt into pcpu.
Tue, Nov 12, 3:50 PM
kib closed D22302: amd64: move gdt into pcpu.
Tue, Nov 12, 3:48 PM
kib committed rS354644: amd64: assert that size of the software prototype table for gdt is equal.
amd64: assert that size of the software prototype table for gdt is equal
Tue, Nov 12, 3:47 PM
kib updated the diff for D22321: i386: stop guessing the address of the trap frame in ddb backtrace..

Handle avg' suggestions.

Tue, Nov 12, 3:30 PM
kib added inline comments to D22321: i386: stop guessing the address of the trap frame in ddb backtrace..
Tue, Nov 12, 3:29 PM

Mon, Nov 11

kib created D22321: i386: stop guessing the address of the trap frame in ddb backtrace..
Mon, Nov 11, 10:35 PM
kib closed D22007: amd64: Ensure that the state of the switched-out thread is fully flushed.
Mon, Nov 11, 9:59 PM
kib committed rS354630: amd64: Issue MFENCE on context switch on AMD CPUs when reusing address space..
amd64: Issue MFENCE on context switch on AMD CPUs when reusing address space.
Mon, Nov 11, 9:59 PM
kib added a comment to D22303: db_nextframe/i386: reduce the number of special frame types.
In D22303#487963, @jhb wrote:

Note that gdb also knows which symbols have which behavior, so changing the stack frame layout will break kgdb, and then kgdb would have to somehow detect which i386 kernels had which behavior. We've done that once before by peeking at instructions [1], but I think it's not worth spending that much effort on i386 and easier to just let the frame layouts stay as-is. The reason for the enums was to handle the separate cases as you note for args. I don't mind changing this to use 'narg'.
1: https://github.com/bsdjhb/gdb/blob/kgdb-8.3/gdb/i386fbsd-kern.c#L82
For reference: here is how we currently decode frame offsets in kgdb now:
https://github.com/bsdjhb/gdb/blob/kgdb-8.3/gdb/i386fbsd-kern.c#L337

Mon, Nov 11, 6:08 PM
kib added a comment to D22303: db_nextframe/i386: reduce the number of special frame types.

Ok, I think I am convinced enough. As result, I do not like this code even more.

Mon, Nov 11, 1:58 PM
kib accepted D22280: exploit sparsity in swap_pager_copy.
Mon, Nov 11, 10:04 AM

Sun, Nov 10

kib added inline comments to D22280: exploit sparsity in swap_pager_copy.
Sun, Nov 10, 9:57 PM
kib added inline comments to D22302: amd64: move gdt into pcpu.
Sun, Nov 10, 4:00 PM
kib accepted D22305: db_nextframe/amd64: remove TRAP_INTERRUPT frame type.
Sun, Nov 10, 1:11 PM
kib created D22302: amd64: move gdt into pcpu.
Sun, Nov 10, 10:56 AM
kib committed rS354592: amd64: change r_gdt to the local variable in hammer_time()..
amd64: change r_gdt to the local variable in hammer_time().
Sun, Nov 10, 10:03 AM
kib updated the summary of D22007: amd64: Ensure that the state of the switched-out thread is fully flushed.
Sun, Nov 10, 9:52 AM
kib updated the diff for D22007: amd64: Ensure that the state of the switched-out thread is fully flushed.

The rest of the change, now I limit MFENCE only to non-Intel vendors.

Sun, Nov 10, 9:50 AM
kib reopened D22007: amd64: Ensure that the state of the switched-out thread is fully flushed.
Sun, Nov 10, 9:49 AM