Page MenuHomeFreeBSD
Feed Search

Jul 16 2025

alc updated the diff for D51353: pmap_enter_{l2,pde}: correct the handling of an error case.

Use ADDR_IS_KERNEL.

Jul 16 2025, 7:07 PM
alc added a comment to D51345: amd64/pmap: Remove !SMP TLB invalidation routines.

I also have an upcoming change in this area. AMD Ryzen processors have long supported a subset of the invpcid instruction’s functionality, even though they don’t support PCID. Specifically, they support the functionality to invalidate PG_G mappings, and not surprisingly this is supposed to be faster than toggling the PGE bit in CR4.

Jul 16 2025, 6:01 PM
alc accepted D51345: amd64/pmap: Remove !SMP TLB invalidation routines.
Jul 16 2025, 5:18 PM
alc updated the summary of D51353: pmap_enter_{l2,pde}: correct the handling of an error case.
Jul 16 2025, 5:00 PM
alc requested review of D51353: pmap_enter_{l2,pde}: correct the handling of an error case.
Jul 16 2025, 4:58 PM
alc added inline comments to D51345: amd64/pmap: Remove !SMP TLB invalidation routines.
Jul 16 2025, 4:22 PM

Jul 15 2025

alc accepted D48337: vm_pageout: Scan inactive dirty pages less aggressively.
Jul 15 2025, 3:00 AM
alc accepted D51322: vm_pageout: Remove a volatile qualifier from some vm_domain members.
Jul 15 2025, 2:58 AM
alc accepted D51321: swap_pager: Convert swap-space-full flags to bools.
Jul 15 2025, 1:16 AM
alc added a comment to D50333: vm_phys: Ensure that pages are removed from pagequeues before freeing.

This can be abandoned.

Jul 15 2025, 12:45 AM
alc accepted D48337: vm_pageout: Scan inactive dirty pages less aggressively.
Jul 15 2025, 12:42 AM
alc accepted D51311: i386: Avoid calling kmem_alloc_contig(M_NEVERFREED).
Jul 15 2025, 12:17 AM

Jul 14 2025

alc committed rGb87aa791533f: amd64 pmap: simplify recent changes to pmap_enter_pde().
Jul 14 2025, 12:29 AM
alc closed D51235: amd64 pmap: avoid an unnecessary demotion.
Jul 14 2025, 12:29 AM

Jul 13 2025

alc accepted D48337: vm_pageout: Scan inactive dirty pages less aggressively.
Jul 13 2025, 11:40 PM
alc added inline comments to D51235: amd64 pmap: avoid an unnecessary demotion.
Jul 13 2025, 8:07 PM
alc added inline comments to D51235: amd64 pmap: avoid an unnecessary demotion.
Jul 13 2025, 6:34 PM
alc committed rG2cfd6342ac84: arm64 pmap: do not panic when unable to insert PTP into trie.
Jul 13 2025, 5:09 PM
alc closed D51220: arm64 pmap: do not panic on inability to insert ptp into trie.
Jul 13 2025, 5:09 PM

Jul 12 2025

alc added a comment to D51220: arm64 pmap: do not panic on inability to insert ptp into trie.

Do you have some local modifications to test the ADDR_IS_KERNEL(va) code path in pmap_enter_l2()?

Jul 12 2025, 9:32 PM
alc updated the diff for D51220: arm64 pmap: do not panic on inability to insert ptp into trie.

See inline comment for an explanation.

Jul 12 2025, 9:27 PM

Jul 11 2025

alc accepted D51248: vm_domainset: Print correct function in KASSERT()/panic().
Jul 11 2025, 4:49 PM

Jul 10 2025

alc requested review of D51235: amd64 pmap: avoid an unnecessary demotion.
Jul 10 2025, 7:45 PM
alc accepted D51232: pctrie: leave pctrie top as current after [gl]e_lookup failure.
Jul 10 2025, 7:53 AM

Jul 9 2025

alc updated the diff for D51220: arm64 pmap: do not panic on inability to insert ptp into trie.

Rename remove_pt to demote_kl2e to better reflect what it controls.

Jul 9 2025, 7:35 PM
alc added inline comments to D51220: arm64 pmap: do not panic on inability to insert ptp into trie.
Jul 9 2025, 7:54 AM
alc requested review of D51220: arm64 pmap: do not panic on inability to insert ptp into trie.
Jul 9 2025, 7:38 AM

Jul 7 2025

alc closed D51180: amd64 pmap: convert some panics to KASSERTs.
Jul 7 2025, 12:07 AM
alc committed rG6a7761b4d27c: amd64 pmap: convert panics to KASSERTs.
Jul 7 2025, 12:07 AM

Jul 6 2025

alc added a comment to D51180: amd64 pmap: convert some panics to KASSERTs.
In D51180#1168328, @kib wrote:

Should the pmap_demote_pde() in pmap_unwire() get the same treatment? As I understand, wire should saved the pt page in radix.

Jul 6 2025, 8:16 PM
alc accepted D51179: vm_fault: drop never-true busy_sleep test.
Jul 6 2025, 8:09 PM
alc added a comment to D51179: vm_fault: drop never-true busy_sleep test.
In D51179#1168325, @alc wrote:

This lookup originated here:

commit 87b646630c4892e21446cd096bea6bcaecea33ac
Author: Mark Johnston <markj@FreeBSD.org>
Date:   Mon Nov 15 11:35:44 2021 -0500

    vm_page: Consolidate page busy sleep mechanisms
    
    - Modify vm_page_busy_sleep() and vm_page_busy_sleep_unlocked() to take
      a VM_ALLOC_* flag indicating whether to sleep on shared-busy, and fix
      up callers.
    - Modify vm_page_busy_sleep() to return a status indicating whether the
      object lock was dropped, and fix up callers.
    - Convert callers of vm_page_sleep_if_busy() to use vm_page_busy_sleep()
      instead.
    - Remove vm_page_sleep_if_(x)busy().
    
    No functional change intended.
    
    Obtained from:  jeff (object_concurrency patches)
    Reviewed by:    kib
    MFC after:      2 weeks
    Differential Revision:  https://reviews.freebsd.org/D32947
Jul 6 2025, 6:20 PM
alc added a comment to D51179: vm_fault: drop never-true busy_sleep test.

This lookup originated here:

commit 87b646630c4892e21446cd096bea6bcaecea33ac
Author: Mark Johnston <markj@FreeBSD.org>
Date:   Mon Nov 15 11:35:44 2021 -0500
Jul 6 2025, 6:01 PM
alc requested review of D51180: amd64 pmap: convert some panics to KASSERTs.
Jul 6 2025, 5:53 PM
alc committed rG88c8cba04395: amd64 pmap: preallocate another page table page in pmap_demote_DMAP().
Jul 6 2025, 5:09 PM
alc closed D51091: amd64 pmap: demotion changes for kib@.
Jul 6 2025, 5:09 PM

Jul 5 2025

alc updated the diff for D51091: amd64 pmap: demotion changes for kib@.

Rebase. Add lockp KASSERT.

Jul 5 2025, 7:56 PM
alc added a comment to D51060: pctrie: move the root to the latest search node.

I am rather concerned that the pathological case of having to walk up to the root and then back down will be common place. For example, consider a memory mapped file that is read sequentially. The first access, when the file is not yet memory resident, will leave the cursor at the end. Subsequent accesses well then have to walk all the way up, and all the way down to get to the first page.

Jul 5 2025, 6:25 PM

Jul 4 2025

alc accepted D50970: amd64 pmap: eliminate two explicit panics on low mem conditions.
Jul 4 2025, 7:07 PM
alc committed rG1c1acaf6858b: amd64: enable EFER.TCE.
Jul 4 2025, 1:01 AM
alc closed D51093: amd64: enable EFER.TCE.
Jul 4 2025, 1:01 AM

Jul 3 2025

alc added inline comments to D51085: amd64 pmap: move DMAP out of kernel pml4 table for LA57..
Jul 3 2025, 9:23 PM

Jul 1 2025

alc added a comment to D51093: amd64: enable EFER.TCE.
In D51093#1166331, @kib wrote:

It would be useful to provide a reasoning why the setting is safe.

From my understanding, there are (at least) two situations where TCE would be unsafe:

  1. Recursive pt mapping. But when we modify the kernel page table in a way that modifies the paging structure above the lowest level, we also explicitly invalidate the recursive mapping, in pmap_remove_kernel_pde(), pmap_demote_pde(), pmap_demote_pdpe().
  2. Sharing page table pages, mostly relevant when sharing occurs not at the leafs of the page table radix tree. We do not do that at all.

Anything else I missing?

Jul 1 2025, 5:33 PM
alc added inline comments to D50970: amd64 pmap: eliminate two explicit panics on low mem conditions.
Jul 1 2025, 8:13 AM
alc added inline comments to D51091: amd64 pmap: demotion changes for kib@.
Jul 1 2025, 8:01 AM

Jun 30 2025

alc added a comment to D51093: amd64: enable EFER.TCE.

dougm@ has been running stress on a Ryzen processor for more than 24 hours, and seen no ill effects.

Jun 30 2025, 5:13 PM
alc requested review of D51093: amd64: enable EFER.TCE.
Jun 30 2025, 5:12 PM
alc added a reviewer for D51091: amd64 pmap: demotion changes for kib@: markj.
Jun 30 2025, 5:04 PM
alc added a comment to D51091: amd64 pmap: demotion changes for kib@.
In D51091#1166112, @kib wrote:

Or, do you want me to integrate this into the series of patches for D50970?

Jun 30 2025, 5:03 PM
alc added inline comments to D50970: amd64 pmap: eliminate two explicit panics on low mem conditions.
Jun 30 2025, 4:55 PM
alc added inline comments to D50970: amd64 pmap: eliminate two explicit panics on low mem conditions.
Jun 30 2025, 8:17 AM
alc requested review of D51091: amd64 pmap: demotion changes for kib@.
Jun 30 2025, 8:15 AM
alc added inline comments to D50970: amd64 pmap: eliminate two explicit panics on low mem conditions.
Jun 30 2025, 8:11 AM

Jun 28 2025

alc accepted D51059: pctrie: correct iter node after node allocation.
Jun 28 2025, 6:31 AM

Jun 27 2025

alc accepted D51015: vm_pageout: Make the OOM killer less aggressive.
Jun 27 2025, 8:03 AM

Jun 26 2025

alc accepted D51057: pctrie: drop freenode param to pctrie_remove.
Jun 26 2025, 10:48 PM

Jun 25 2025

alc closed D49391: vm_page: update legend documenting allocation.
Jun 25 2025, 7:10 PM
alc committed rG07297aee35f2: vm_page: update comments and KASSERT()s concerning page allocation.
Jun 25 2025, 7:10 PM

Jun 24 2025

alc added inline comments to D50970: amd64 pmap: eliminate two explicit panics on low mem conditions.
Jun 24 2025, 6:51 PM
alc added inline comments to D50970: amd64 pmap: eliminate two explicit panics on low mem conditions.
Jun 24 2025, 5:44 PM

Jun 23 2025

alc added a comment to D49442: pmap: Avoid clearing the accessed bit for wired mappings.
In D49442#1163665, @kib wrote:
In D49442#1163641, @alc wrote:

A more direct approach would be to change pmap_demote_pde_locked() to handle wired mappings when the PDE was never accessed:

diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c
index 6d1c2d70d8c0..97ff9c67e8d5 100644
--- a/sys/amd64/amd64/pmap.c
+++ b/sys/amd64/amd64/pmap.c
@@ -6104,9 +6104,7 @@ pmap_demote_pde_locked(pmap_t pmap, pd_entry_t *pde, vm_offset_t va,
         * Invalidate the 2MB page mapping and return "failure" if the
         * mapping was never accessed.
         */
-       if ((oldpde & PG_A) == 0) {
-               KASSERT((oldpde & PG_W) == 0,
-                   ("pmap_demote_pde: a wired mapping is missing PG_A"));
+       if ((oldpde & (PG_W | PG_A)) == 0) {

Just for my understanding, do you mean

if ((oldpde & (PG_W | PG_A)) == PG_W) {

?

Jun 23 2025, 10:45 PM
alc added a comment to D49442: pmap: Avoid clearing the accessed bit for wired mappings.

A more direct approach would be to change pmap_demote_pde_locked() to handle wired mappings when the PDE was never accessed:

diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c
index 6d1c2d70d8c0..97ff9c67e8d5 100644
--- a/sys/amd64/amd64/pmap.c
+++ b/sys/amd64/amd64/pmap.c
@@ -6104,9 +6104,7 @@ pmap_demote_pde_locked(pmap_t pmap, pd_entry_t *pde, vm_offset_t va,
         * Invalidate the 2MB page mapping and return "failure" if the
         * mapping was never accessed.
         */
-       if ((oldpde & PG_A) == 0) {
-               KASSERT((oldpde & PG_W) == 0,
-                   ("pmap_demote_pde: a wired mapping is missing PG_A"));
+       if ((oldpde & (PG_W | PG_A)) == 0) {
                pmap_demote_pde_abort(pmap, va, pde, oldpde, lockp);
                return (false);
        }
@@ -6164,7 +6162,7 @@ pmap_demote_pde_locked(pmap_t pmap, pd_entry_t *pde, vm_offset_t va,
         * have PG_A set in every PTE, then fill it.  The new PTEs will all
         * have PG_A set.
         */
-       if (!vm_page_all_valid(mpte))
+       if (vm_page_all_valid(mpte) ^ (oldpde & PG_A) != 0)
                pmap_fill_ptp(firstpte, newpte);
Jun 23 2025, 4:52 PM

Jun 20 2025

alc updated the diff for D49391: vm_page: update legend documenting allocation.

Introduce VM_ALLOC_COMMON.

Jun 20 2025, 11:27 PM
alc updated the summary of D49391: vm_page: update legend documenting allocation.
Jun 20 2025, 5:43 PM
alc updated the diff for D49391: vm_page: update legend documenting allocation.
Jun 20 2025, 5:18 PM
alc retitled D49391: vm_page: update legend documenting allocation from vm_grab: assert no VM_ALLOC_WAITFAIL
Jun 20 2025, 5:16 PM
alc updated the diff for D49391: vm_page: update legend documenting allocation.
Jun 20 2025, 5:14 PM

Jun 19 2025

alc committed rGc7fe7912a623: vm_page: eliminate a stale KASSERT.
Jun 19 2025, 4:09 PM

Jun 18 2025

alc committed rGdeddede58e83: arm64 pmap: use the counter(9) KPI for L2 superpages.
Jun 18 2025, 11:07 PM
alc accepted D50877: vm_page: Fix nofree page accounting.
Jun 18 2025, 8:03 PM

Jun 17 2025

alc added a comment to D49442: pmap: Avoid clearing the accessed bit for wired mappings.

@alc did you have any thoughts on this patch?

Jun 17 2025, 5:40 PM

Jun 16 2025

alc accepted D45064: arm64: Create an L3 table to limit permissions.
Jun 16 2025, 4:46 PM

Jun 15 2025

alc accepted D50861: vm_map: drop simplify_entry.9.
Jun 15 2025, 9:18 PM
alc added a comment to D50861: vm_map: drop simplify_entry.9.

You should add an entry to ObsoleteFiles.inc.

Jun 15 2025, 8:48 PM

Jun 14 2025

alc accepted D50750: pctrie: simplify lookup_node .
Jun 14 2025, 7:10 PM

Jun 13 2025

alc committed rGc82662dc7123: arm pmap: fix CTASSERT.
Jun 13 2025, 9:55 PM
alc committed rG330b17e1cf5c: vm: remove pa_index from the machine-independent layer.
Jun 13 2025, 6:25 PM
alc closed D50823: vm: remove pa_index from the machine-independent layer.
Jun 13 2025, 6:25 PM
alc committed rGb7536f9593a3: arm64 pmap: Simplify pmap_demote_l{2,3}c().
Jun 13 2025, 5:33 PM

Jun 12 2025

alc requested review of D50823: vm: remove pa_index from the machine-independent layer.
Jun 12 2025, 8:41 PM
alc added inline comments to D45064: arm64: Create an L3 table to limit permissions.
Jun 12 2025, 8:24 PM

Jun 11 2025

alc committed rG797020a76406: vm: retire vm_page_lock().
Jun 11 2025, 8:22 PM
alc closed D50767: vm: retire pa_lock.
Jun 11 2025, 8:22 PM
alc accepted D45063: arm64: Reduce the kernel executable pages.
Jun 11 2025, 7:31 PM
alc accepted D45062: arm64: Use tables to find early page tables.
Jun 11 2025, 7:22 PM

Jun 10 2025

alc added a reviewer for D50767: vm: retire pa_lock: kib.
Jun 10 2025, 7:17 PM
alc updated the diff for D50767: vm: retire pa_lock.

Retire PA_LOCK_COUNT.

Jun 10 2025, 5:44 PM
alc updated the diff for D50767: vm: retire pa_lock.

Use busy style synchronization in linux emulation.

Jun 10 2025, 7:16 AM

Jun 9 2025

alc added inline comments to D50767: vm: retire pa_lock.
Jun 9 2025, 9:22 PM
alc added inline comments to D50767: vm: retire pa_lock.
Jun 9 2025, 9:19 PM
alc requested review of D50767: vm: retire pa_lock.
Jun 9 2025, 9:16 PM

Jun 8 2025

alc committed rG1fee99800a79: vm_page: Retire its listq field.
Jun 8 2025, 6:37 PM
alc closed D50515: vm_page: retire its listq field.
Jun 8 2025, 6:36 PM

Jun 7 2025

alc added a comment to D50515: vm_page: retire its listq field.
In D50515#1157527, @kib wrote:

BTW, did you considered only marking the page for free if it is on the page queue, and doing the real free when processing the batch?

Jun 7 2025, 7:37 PM

Jun 6 2025

alc accepted D50729: pctrie_lookup_node: assume parent_out != NULL.
Jun 6 2025, 6:44 PM

Jun 5 2025

alc added a comment to D50515: vm_page: retire its listq field.

@kib Do you have any comments?

Jun 5 2025, 7:21 PM
alc added a comment to D50515: vm_page: retire its listq field.

Should I bump __FreeBSD_version after this change?

Jun 5 2025, 7:21 PM

Jun 4 2025

alc committed rG51c8cd7e1a33: arm64 pmap: Eliminate an unnecessary NULL check.
Jun 4 2025, 7:11 PM

May 31 2025

alc added inline comments to D50483: Extended errors from kernel.
May 31 2025, 8:52 PM
alc accepted D50622: vm_pageout: fix pageout_flush.
May 31 2025, 5:57 PM