Page MenuHomeFreeBSD
Feed Advanced Search

Wed, Nov 27

alc committed rGfd630ae93634: vm: Retire an unused declaration (authored by alc).
vm: Retire an unused declaration
Wed, Nov 27, 8:23 AM

Tue, Nov 5

alc committed rGf076dd3ef02d: imgact_elf: Optimize pagesizes[] loop (authored by alc).
imgact_elf: Optimize pagesizes[] loop
Tue, Nov 5, 2:09 PM
alc committed rG2001bef84ba6: vm: Eliminate unnecessary lock asserts (authored by alc).
vm: Eliminate unnecessary lock asserts
Tue, Nov 5, 11:25 AM
alc committed rGf6ed52c1f010: vm: Stop reducing vm_pageout_page_count at startup (authored by alc).
vm: Stop reducing vm_pageout_page_count at startup
Tue, Nov 5, 10:20 AM
alc committed rG98dd639c94f7: arm64 pmap: Eliminate an unnecessary conditional (authored by alc).
arm64 pmap: Eliminate an unnecessary conditional
Tue, Nov 5, 10:15 AM
alc committed rG772ae9eddf87: vm ASLR: Handle VM_NRESERV_LEVEL == 0 (authored by alc).
vm ASLR: Handle VM_NRESERV_LEVEL == 0
Tue, Nov 5, 10:07 AM
alc committed rG383fd3ea0012: arm64: Handle an unaligned start in pmap_mask_set_locked() (authored by alc).
arm64: Handle an unaligned start in pmap_mask_set_locked()
Tue, Nov 5, 10:01 AM
alc committed rG60847070f908: vm: Eliminate a redundant call to vm_reserv_break_all() (authored by alc).
vm: Eliminate a redundant call to vm_reserv_break_all()
Tue, Nov 5, 9:18 AM
alc committed rG3dc2a8848986: arm64 pmap: Convert panic()s to KASSERT()s (authored by alc).
arm64 pmap: Convert panic()s to KASSERT()s
Tue, Nov 5, 9:14 AM
alc committed rG4f77144279f2: arm64 pmap: eliminate a redundant variable (authored by alc).
arm64 pmap: eliminate a redundant variable
Tue, Nov 5, 9:05 AM

Apr 9 2024

alc committed rG841cf52595b6: arm64 pmap: Add ATTR_CONTIGUOUS support [Part 2] (authored by alc).
arm64 pmap: Add ATTR_CONTIGUOUS support [Part 2]
Apr 9 2024, 4:22 PM

Apr 8 2024

alc added a comment to D38852: vm: improve kstack_object pindex calculation scheme to avoid pindex holes.

Just so we're all on the same page, I want to point out the following: While this patch achieves contiguity, it doesn't guarantee 2 MB alignment. Let 'F' represent a fully populated 2 MB reservation, 'E', represent a partially populated reservation, where the population begins in the middle and goes to the end, and 'B' is the complement of 'E', where the population begins at the start and ends in the middle. Typically, the physical memory allocation for one chunk of stacks on amd64 looks like 'EFFFB'. While it would be nice to achieve 'FFFF', this patch is already a great improvement over the current state of affairs.

Apr 8 2024, 7:13 PM

Apr 7 2024

alc updated the diff for D44575: arm64 pmap: Add ATTR_CONTIGUOUS support [Part 2].

Update to reflect committed change.

Apr 7 2024, 5:40 PM
alc reopened D44575: arm64 pmap: Add ATTR_CONTIGUOUS support [Part 2].
Apr 7 2024, 5:33 PM

Apr 6 2024

alc added inline comments to D44575: arm64 pmap: Add ATTR_CONTIGUOUS support [Part 2].
Apr 6 2024, 10:58 PM
alc added inline comments to D44575: arm64 pmap: Add ATTR_CONTIGUOUS support [Part 2].
Apr 6 2024, 10:53 PM
alc updated the diff for D44575: arm64 pmap: Add ATTR_CONTIGUOUS support [Part 2].

Eliminate an unnecessary variable.

Apr 6 2024, 10:47 PM
alc accepted D44646: swap_pager: Unbusy readahead pages after an I/O error.
Apr 6 2024, 7:10 PM
alc added a comment to D44575: arm64 pmap: Add ATTR_CONTIGUOUS support [Part 2].

I do, however, want to point out that a good portion of the reduction in buildworld time is coming from performing a smaller number of icache flushes when creating executable mappings.

Have you looked at teaching the vm code to manage the icache? We currently call cpu_icache_sync_range more than we need to, e.g. if mapping the same physical address as twice we will call it twice.

We discussed this a while ago. To minimize icache syncing, I believe we need to identify all of the places where a kernel might modify a user-mapped page via the direct map. I think that hooking uiomove_* would get us most of the way there, but it's hard to be confident that that's sufficient.

Apr 6 2024, 5:50 AM
alc updated subscribers of D44575: arm64 pmap: Add ATTR_CONTIGUOUS support [Part 2].
Apr 6 2024, 5:21 AM
alc added inline comments to D44575: arm64 pmap: Add ATTR_CONTIGUOUS support [Part 2].
Apr 6 2024, 5:19 AM
alc updated the diff for D44575: arm64 pmap: Add ATTR_CONTIGUOUS support [Part 2].

Add KASSERT to vm_reserv_is_populated().

Apr 6 2024, 4:59 AM

Apr 3 2024

alc updated the diff for D44575: arm64 pmap: Add ATTR_CONTIGUOUS support [Part 2].

Rename pmap_enter_object()'s helpers to not have 64k or 2m in their names.

Apr 3 2024, 6:52 PM
alc committed rG22c098843127: arm64: correctly handle a failed BTI check in pmap_enter_l2() (authored by alc).
arm64: correctly handle a failed BTI check in pmap_enter_l2()
Apr 3 2024, 4:20 PM
alc added inline comments to D44575: arm64 pmap: Add ATTR_CONTIGUOUS support [Part 2].
Apr 3 2024, 5:02 AM

Apr 1 2024

alc updated the test plan for D44575: arm64 pmap: Add ATTR_CONTIGUOUS support [Part 2].
Apr 1 2024, 9:49 PM
alc added inline comments to D44575: arm64 pmap: Add ATTR_CONTIGUOUS support [Part 2].
Apr 1 2024, 5:39 AM
alc updated the summary of D44575: arm64 pmap: Add ATTR_CONTIGUOUS support [Part 2].
Apr 1 2024, 5:28 AM
alc requested review of D44575: arm64 pmap: Add ATTR_CONTIGUOUS support [Part 2].
Apr 1 2024, 5:26 AM

Mar 30 2024

alc committed rGe0388a906ca7: arm64: enable superpage mappings by pmap_mapdev{,_attr}() (authored by alc).
arm64: enable superpage mappings by pmap_mapdev{,_attr}()
Mar 30 2024, 8:55 PM
alc closed D42737: arm64 pmap: Add ATTR_CONTIGUOUS support [Part 1].
Mar 30 2024, 6:47 PM
alc committed rGfd6cb031f577: arm64 pmap: Add ATTR_CONTIGUOUS support [Part 1] (authored by ehs3_rice.edu).
arm64 pmap: Add ATTR_CONTIGUOUS support [Part 1]
Mar 30 2024, 6:47 PM

Mar 24 2024

alc updated the diff for D42737: arm64 pmap: Add ATTR_CONTIGUOUS support [Part 1].

Reopen after reservation size fix was committed.

Mar 24 2024, 6:11 PM
alc reopened D42737: arm64 pmap: Add ATTR_CONTIGUOUS support [Part 1].
Mar 24 2024, 6:09 PM
alc closed D42737: arm64 pmap: Add ATTR_CONTIGUOUS support [Part 1].
Mar 24 2024, 5:48 PM
alc committed rG9fabf97682ce: arm64: fix free queue and reservation configuration for 16KB pages (authored by ehs3_rice.edu).
arm64: fix free queue and reservation configuration for 16KB pages
Mar 24 2024, 5:48 PM

Mar 18 2024

alc updated the diff for D42737: arm64 pmap: Add ATTR_CONTIGUOUS support [Part 1].

Correct VM_NFREEORDER for 16KB page size.

Mar 18 2024, 5:13 PM
alc updated subscribers of D42737: arm64 pmap: Add ATTR_CONTIGUOUS support [Part 1].
Mar 18 2024, 4:58 PM

Mar 13 2024

alc updated the diff for D42737: arm64 pmap: Add ATTR_CONTIGUOUS support [Part 1].

Teach sysctl vm.pmap.kernel_maps to correctly count ATTR_CONTIGUOUS superpages when the base page size is 16KB.

Mar 13 2024, 7:07 AM

Mar 12 2024

alc updated the diff for D42737: arm64 pmap: Add ATTR_CONTIGUOUS support [Part 1].

Add (void) casts. Refill a comment whose lines were too long.

Mar 12 2024, 7:08 PM
alc added inline comments to D42737: arm64 pmap: Add ATTR_CONTIGUOUS support [Part 1].
Mar 12 2024, 5:18 PM

Mar 10 2024

alc added a comment to D38852: vm: improve kstack_object pindex calculation scheme to avoid pindex holes.

I'd really like to see this committed.

Mar 10 2024, 7:51 AM

Jan 28 2024

alc accepted D43636: vm_phys: Add a vm_phys_seg_paddr_to_vm_page() helper.

Despite the long name, it's still two characters shorter than the original code. :-)

Jan 28 2024, 6:09 PM

Jan 27 2024

alc accepted D40400: vm_phys: Factor out some calls to vm_freelist_add().
Jan 27 2024, 8:36 PM
alc accepted D40399: vm_page: Let vm_page_init_page() take a pool parameter.
Jan 27 2024, 8:21 PM
alc added a comment to D40403: vm_page: Implement lazy page initialization.

What happens if we increase VM_NFREEORDER, e.g., 262144, to support 1 GB allocations? I think that you might might want to have a different constant to cap the lazy init chunk size.

Jan 27 2024, 8:19 PM
alc added inline comments to D40403: vm_page: Implement lazy page initialization.
Jan 27 2024, 7:51 PM

Jan 18 2024

alc accepted D43503: arm64: Add a VM_FREELIST_DMA32 freelist.
Jan 18 2024, 11:08 PM

Jan 11 2024

alc accepted D43358: vnode_pager_generic_putpages(): correctly handle clean block at EOF.
Jan 11 2024, 6:44 AM

Dec 21 2023

alc accepted D43140: vmm iommu: stop transiently wiring already wired pages.
Dec 21 2023, 6:54 PM

Dec 1 2023

alc accepted D42853: Allow sbrk on arm64 and riscv.
Dec 1 2023, 8:27 AM

Nov 30 2023

alc updated the diff for D42737: arm64 pmap: Add ATTR_CONTIGUOUS support [Part 1].

Eliot and I have addressed most of Mark's comments.

Nov 30 2023, 7:37 PM
alc added inline comments to D42737: arm64 pmap: Add ATTR_CONTIGUOUS support [Part 1].
Nov 30 2023, 7:35 PM

Nov 29 2023

alc accepted D42788: vm: Add kva_alloc_aligned.
Nov 29 2023, 5:35 PM
alc accepted D42831: vm: Use vmem_xalloc in kva_alloc.
Nov 29 2023, 5:09 PM

Nov 28 2023

alc added inline comments to D42737: arm64 pmap: Add ATTR_CONTIGUOUS support [Part 1].
Nov 28 2023, 8:44 PM
alc added inline comments to D42737: arm64 pmap: Add ATTR_CONTIGUOUS support [Part 1].
Nov 28 2023, 8:43 PM
alc added inline comments to D42732: arm64: Use the DMAP region in pmap_mapbios.
Nov 28 2023, 6:49 PM
alc added inline comments to D42737: arm64 pmap: Add ATTR_CONTIGUOUS support [Part 1].
Nov 28 2023, 6:03 PM
alc added inline comments to D42788: vm: Add kva_alloc_aligned.
Nov 28 2023, 5:18 PM

Nov 27 2023

alc added a comment to D42737: arm64 pmap: Add ATTR_CONTIGUOUS support [Part 1].
In D42737#975855, @alc wrote:

Thanks, Mark. We'd like to see the output from sysctl vm.pmap.kernel_maps too.

That's what I provided in the links - did you mean something else?

In both cases, this was the output of sysctl vm.pmap.kernel_maps immediately after booting. I can grab it from after the buildworld too, if that's useful.

Nov 27 2023, 5:38 PM
alc added a comment to D42737: arm64 pmap: Add ATTR_CONTIGUOUS support [Part 1].
In D42737#975855, @alc wrote:

Thanks, Mark. We'd like to see the output from sysctl vm.pmap.kernel_maps too.

Nov 27 2023, 5:22 PM
alc added a comment to D42737: arm64 pmap: Add ATTR_CONTIGUOUS support [Part 1].

Thanks, Mark. We'd like to see the output from sysctl vm.pmap.kernel_maps too.

Nov 27 2023, 5:19 PM
alc updated subscribers of D42737: arm64 pmap: Add ATTR_CONTIGUOUS support [Part 1].
Nov 27 2023, 5:12 PM

Nov 25 2023

alc updated the diff for D42737: arm64 pmap: Add ATTR_CONTIGUOUS support [Part 1].

There was one function where PTE_TO_PHYS/PHYS_TO_PTE conversion hadn't been done yet.

Nov 25 2023, 6:07 PM

Nov 24 2023

alc updated the summary of D42737: arm64 pmap: Add ATTR_CONTIGUOUS support [Part 1].
Nov 24 2023, 9:09 PM
alc updated the diff for D42737: arm64 pmap: Add ATTR_CONTIGUOUS support [Part 1].

pmap_kremove_device: fix 2MB mapping removal; optimize TLB invalidation

Nov 24 2023, 8:54 PM

Nov 23 2023

alc updated the summary of D42737: arm64 pmap: Add ATTR_CONTIGUOUS support [Part 1].
Nov 23 2023, 8:52 PM
alc updated the test plan for D42737: arm64 pmap: Add ATTR_CONTIGUOUS support [Part 1].
Nov 23 2023, 7:42 PM
alc updated the test plan for D42737: arm64 pmap: Add ATTR_CONTIGUOUS support [Part 1].
Nov 23 2023, 7:41 PM
alc requested review of D42737: arm64 pmap: Add ATTR_CONTIGUOUS support [Part 1].
Nov 23 2023, 6:32 PM

Nov 13 2023

alc accepted D42509: vm_phys: fix freelist_contig.
Nov 13 2023, 5:39 PM

Nov 12 2023

alc added inline comments to D42509: vm_phys: fix freelist_contig.
Nov 12 2023, 9:56 PM
alc added inline comments to D38852: vm: improve kstack_object pindex calculation scheme to avoid pindex holes.
Nov 12 2023, 9:24 PM
alc added inline comments to D38852: vm: improve kstack_object pindex calculation scheme to avoid pindex holes.
Nov 12 2023, 9:14 AM

Nov 11 2023

alc added a comment to D42509: vm_phys: fix freelist_contig.

I'm convinced that it's correct. That said, even the person who reported the problem is probably not exercising this while loop:

while (!vm_addr_ok(VM_PAGE_TO_PHYS(m_ret),
    size, alignment, boundary) &&
    ...
Nov 11 2023, 10:24 PM
alc added inline comments to D42509: vm_phys: fix freelist_contig.
Nov 11 2023, 10:09 PM
alc added inline comments to D42509: vm_phys: fix freelist_contig.
Nov 11 2023, 10:07 PM
alc added inline comments to D42509: vm_phys: fix freelist_contig.
Nov 11 2023, 10:03 PM
alc added inline comments to D42509: vm_phys: fix freelist_contig.
Nov 11 2023, 10:01 PM
alc added inline comments to D42509: vm_phys: fix freelist_contig.
Nov 11 2023, 9:39 PM
alc added inline comments to D42509: vm_phys: fix freelist_contig.
Nov 11 2023, 8:02 PM
alc added inline comments to D42509: vm_phys: fix freelist_contig.
Nov 11 2023, 7:52 PM
alc added a comment to D42509: vm_phys: fix freelist_contig.

We may want to issue this as an errata for 14.0, so can we have a minimal version without style changes?

Nov 11 2023, 7:15 PM

Nov 10 2023

alc added inline comments to D42509: vm_phys: fix freelist_contig.
Nov 10 2023, 6:42 PM
alc added inline comments to D42509: vm_phys: fix freelist_contig.
Nov 10 2023, 6:32 PM
alc added inline comments to D42509: vm_phys: fix freelist_contig.
Nov 10 2023, 6:29 PM

Nov 9 2023

alc added a comment to D42512: vm_page_advise(9): expand from vm_page_dontneed(9).

I'm kind of skeptical that this man page is useful at all. vm_page_advise() really exists just to implement the madvise() system call, it's not going to be called externally. And, it's just a piece of that system call. vm_map_madvise(), vm_object_madvise(), pmap_advise() also implement parts of madvise(); why are they not documented as well? IMHO it's somewhat more useful to focus on improving madvise.3, which is user-facing and describes the user-visible effect for each type of advice. With a high-level understanding of what MADV_FREE etc. are supposed to do, it becomes easier to understand why vm_page_advise() does what it does.

Nov 9 2023, 9:31 PM
alc added inline comments to D42513: vm_page_advise(): reformat conditional statements.
Nov 9 2023, 7:08 AM
alc accepted D42517: vm_fault: revert D19670.
Nov 9 2023, 2:31 AM

Nov 2 2023

alc accepted D42446: amd64: Remove PMAP_INLINE.
Nov 2 2023, 4:41 PM

Oct 26 2023

alc added a comment to D40772: Tentative physical memory compaction.

Note this became more important since we have ASLR turned on for 64 bit processes since 13.2-RELEASE. And ASLR adds great deal of fragmentation. It leads to significant performance degradation over long run due to superpages becoming unusable due memory fragmentation.

Oct 26 2023, 7:30 PM

Oct 20 2023

alc accepted D42287: riscv: Retire PMAP_INLINE.
Oct 20 2023, 4:09 PM

Oct 18 2023

alc accepted D42274: pmap: Prefer consistent naming for loader tunable.
Oct 18 2023, 4:01 PM

Oct 17 2023

alc added inline comments to D42233: amd64: Add sysctl knobs for loader tunables.
Oct 17 2023, 5:09 PM
alc added inline comments to D42080: arm64: Set the Guarded Page flag in the kernel.
Oct 17 2023, 5:05 PM

Oct 10 2023

alc added a comment to D35709: fix pmcstat .
In D35709#961602, @alc wrote:

Before I forget, we also ran into a second bug: Specifying ",usr" on a counter no longer worked. Essentially, the ",usr" was just being ignored. We haven't checked if any of the recent changes might have addressed this issue.

I am not surprised, and I doubt anyone has fixed it (though it should be straightforward). This is on an AMD machine?

Oct 10 2023, 7:29 PM
alc added a comment to D35709: fix pmcstat .
In D35709#950482, @alc wrote:
In D35709#950480, @alc wrote:

One of my graduate students found that this change had a seriously bad side effect. Specifically, on a Ryzen processor, instead of being able to collect data from 6 counters simultaneously, he could only configure 3 counters. So, we backed out this change locally.

Thanks Alan, I have found the same, and I have a fix for it. The problem is that we now allocate the requested event twice on CPU 0, thus reducing the total number of available counters by two.

I will put the fix up for review within the next week, and make sure it is present in 14.0.

I forgot to follow up here. The fix (c362fe939f6f) has landed in stable/14, and I will request to merge it to releng/14.0 on Thursday.

That's good to hear!

Out of curiosity, is anyone working on PEBS/IBS support?

Sort of. @br has developed a new "Hardware Tracing" framework, separate from pmc/hwpmc, which aims to enable these types of profiling features. The work currently focuses on supporting Coresight/ARM SPE, rather than x86, but this paves the way so that adding classes for e.g. Intel PT will be the "easy part".

See D40466, D40477, D40728.

Oct 10 2023, 5:39 PM

Oct 8 2023

alc added a comment to D41635: i386 pmap: allocate leaf page table page for wired userspace superpages.

@markj Are you overloaded? Should I commit this?

Oct 8 2023, 7:47 PM
alc accepted D42080: arm64: Set the Guarded Page flag in the kernel.

For the most part, these changes are setting the guarded bit on mappings that are already no-execute. Is there a reason to do that? To be clear, I don't object to doing so. It just seems redundant.

Oct 8 2023, 7:43 PM