Page MenuHomeFreeBSD

alc (Alan Cox)
User

Projects

User Details

User Since
Dec 14 2014, 5:52 AM (560 w, 4 d)

Recent Activity

Wed, Sep 3

alc accepted D52190: arm64: Add a multiple TLBI workaround.
Wed, Sep 3, 6:10 PM

Tue, Sep 2

alc accepted D52348: vm/vm_fault.c: rename vm_fault_hold_pages_e() to vm_fault_hold_pages().
Tue, Sep 2, 10:20 PM

Mon, Sep 1

alc added inline comments to D52183: arm64: Create a TLBI invalidate for the kernel.
Mon, Sep 1, 5:39 PM
alc added a comment to D52190: arm64: Add a multiple TLBI workaround.

In principle, I am okay with this change. However, I do have some questions.

Mon, Sep 1, 5:06 PM

Fri, Aug 29

alc added a comment to D51474: vm_fault: try to only sbusy valid page that is not writeable.

I have been following this, but have not given it a careful reading. I should be able to do so over the weekend.

Fri, Aug 29, 5:15 PM

Thu, Aug 28

alc accepted D52224: vm_fault.c: rename vm_fault_quick_hold_pages_e() to vm_fault_hold_pages_e().
Thu, Aug 28, 5:56 PM
alc added inline comments to D52186: arm64: Cleanup enabling the MMU.
Thu, Aug 28, 5:07 PM
alc accepted D52188: arm64: Clean up HW DBM errata detection.
Thu, Aug 28, 4:55 PM
alc added a comment to D52165: vm_fault: improve interface for vm_fault_quick_hold_pages().
In D52165#1191863, @imp wrote:

Generally I like it, but the name is very long and specific for the logical concept of 'map this into the physical for I/O and keep it there'. But I have no better name, so I'll just grouse because I never could remember the order of the verbs when I was writing the nvme mapping code.

Thu, Aug 28, 4:48 PM
alc accepted D52184: arm64: Replace cpu_tlb_flushID in initarm.
Thu, Aug 28, 4:11 PM
alc accepted D52185: arm64: Remove cpu_tlb_flushID now it's unused.
Thu, Aug 28, 4:08 PM

Sat, Aug 16

alc accepted D51929: amd64: re-enable la57.
Sat, Aug 16, 7:11 PM

Aug 10 2025

alc committed rGd88f8a306cfe: pmap_demote_{l2,pde}: never invalidate wired mappings (authored by alc).
pmap_demote_{l2,pde}: never invalidate wired mappings
Aug 10 2025, 11:24 PM
alc committed rGf406b54c806a: pmap_enter_{l2,pde}: correct the handling of an error case (authored by alc).
pmap_enter_{l2,pde}: correct the handling of an error case
Aug 10 2025, 11:24 PM
alc committed rGc0e04a22331e: arm64 pmap: do not panic when unable to insert PTP into trie (authored by alc).
arm64 pmap: do not panic when unable to insert PTP into trie
Aug 10 2025, 11:24 PM
alc committed rGb84a0aa00881: amd64 pmap: simplify recent changes to pmap_enter_pde() (authored by alc).
amd64 pmap: simplify recent changes to pmap_enter_pde()
Aug 10 2025, 12:43 AM

Aug 9 2025

alc committed rG9810fb151938: amd64 pmap: convert panics to KASSERTs (authored by alc).
amd64 pmap: convert panics to KASSERTs
Aug 9 2025, 9:10 PM
alc committed rG84df9c02785b: amd64 pmap: fix mismerge (authored by alc).
amd64 pmap: fix mismerge
Aug 9 2025, 8:38 PM
alc committed rG702224d7e082: amd64 pmap: preallocate another page table page in pmap_demote_DMAP() (authored by alc).
amd64 pmap: preallocate another page table page in pmap_demote_DMAP()
Aug 9 2025, 8:08 PM

Aug 2 2025

alc committed rG6fb848f2ff91: amd64 pmap: Use INVPCID_CTXGLOB on Ryzen processors (authored by alc).
amd64 pmap: Use INVPCID_CTXGLOB on Ryzen processors
Aug 2 2025, 5:15 PM
alc closed D51565: amd64 pmap: enable the use of INVPCID_CTXGLOB on AMD Ryzen processors.
Aug 2 2025, 5:15 PM
alc accepted D51692: vm_page: Clear VM_ALLOC_NOCREAT in vm_page_grab_pflags().
Aug 2 2025, 2:48 AM

Jul 30 2025

alc accepted D51636: swapongeom: destroy consumer in case swaponsomething failed.
Jul 30 2025, 5:23 PM

Jul 29 2025

alc accepted D51618: sys_swapon: reject too small devices.
Jul 29 2025, 7:56 PM

Jul 27 2025

alc added inline comments to D51565: amd64 pmap: enable the use of INVPCID_CTXGLOB on AMD Ryzen processors.
Jul 27 2025, 9:16 PM
alc updated the diff for D51565: amd64 pmap: enable the use of INVPCID_CTXGLOB on AMD Ryzen processors.

Eliminate unnecessary indirection.

Jul 27 2025, 9:06 PM
alc added inline comments to D51565: amd64 pmap: enable the use of INVPCID_CTXGLOB on AMD Ryzen processors.
Jul 27 2025, 4:55 PM

Jul 26 2025

alc added inline comments to D51565: amd64 pmap: enable the use of INVPCID_CTXGLOB on AMD Ryzen processors.
Jul 26 2025, 9:09 PM
alc requested review of D51565: amd64 pmap: enable the use of INVPCID_CTXGLOB on AMD Ryzen processors.
Jul 26 2025, 9:05 PM

Jul 25 2025

alc added inline comments to D49442: pmap: Avoid clearing the accessed bit for wired mappings.
Jul 25 2025, 8:05 PM
alc added a comment to D49442: pmap: Avoid clearing the accessed bit for wired mappings.
In D49442#1163641, @alc wrote:

I'm really on the fence about this. I could make a respectable argument for either approach.

Perhaps it's reasonable to simply implement both approaches? The patch in review makes some sense on its own, independent of the bug which motivated it: I can't see any practical reason for madvise(DONTNEED or FREE) to have any side effects on wired mappings. On the other hand, it seems sensible to modify the demotion path to handle this case, since we have no rule which says that wired mappings must have PG_A set, so this case could arise again in the future.

Jul 25 2025, 8:01 PM

Jul 23 2025

alc committed rG7502c1f27082: pmap_demote_{l2,pde}: never invalidate wired mappings (authored by alc).
pmap_demote_{l2,pde}: never invalidate wired mappings
Jul 23 2025, 6:03 PM
alc closed D51431: pmap_demote_{l2,pde}: never invalidate wired mappings.
Jul 23 2025, 6:03 PM
alc added a comment to D51431: pmap_demote_{l2,pde}: never invalidate wired mappings.

I believe this makes D49442 unnecessary, at least as far as fixing the bug is concerned.

Jul 23 2025, 5:58 PM

Jul 20 2025

alc requested review of D51431: pmap_demote_{l2,pde}: never invalidate wired mappings.
Jul 20 2025, 12:37 AM
alc accepted D51364: LA57: move large map out of kernel pml4.
Jul 20 2025, 12:16 AM

Jul 19 2025

alc added a comment to D51345: amd64/pmap: Remove !SMP TLB invalidation routines.
In D51345#1173585, @kib wrote:
In D51345#1172943, @kib wrote:

I am curious how does the patch build.
For instance, pmap_invalidate_page() calls smp_masked_invlpg(), which is provided by amd64/mp_machdep.c. And mp_machdep.c is 'optional smp' in files.amd64.

Oops, yes. This was from a larger patch series which entirely removes the SMP option for amd64. With just this patch, a nooptions SMP kernel cannot build.

It is enough to #ifdef SMP the calls to smp_masked_*() in each of the SMP invalidation functions.

What do you think of this goal overall? My belief is that !SMP amd64 kernels are not used very much and are not worth the maintenance overhead. With the complete patch series, all of sys/amd64 simply ignores the SMP option. If you think it's the right direction, I'll post the remaining patches.

I stated publicly more than once that I would like to remove UP at all, and not only for x86. But the discussion never ignited. In other words, I fully support removing as much #ifdef SMPs as we can.

Rather than fix this commit, I propose going further: https://reviews.freebsd.org/D51403

I brought up removal of !SMP support for amd64 last year at bsdcan and there was no objection. I am not sure about the importance of !SMP in general, e.g., maybe it is somewhat important to support it for embedded arm devices. But for amd64 I think there is no reasonable objection to its removal. GENERIC with nooptions SMP is broken in multiple ways and has been for a while.

Jul 19 2025, 7:18 PM
alc added inline comments to D51364: LA57: move large map out of kernel pml4.
Jul 19 2025, 6:50 PM

Jul 18 2025

alc accepted D51364: LA57: move large map out of kernel pml4.
Jul 18 2025, 5:48 PM
alc accepted D51406: arm64: Add ADDR_IS_USER.
Jul 18 2025, 5:22 PM

Jul 17 2025

alc committed rG5a846c48f209: pmap_enter_{l2,pde}: correct the handling of an error case (authored by alc).
pmap_enter_{l2,pde}: correct the handling of an error case
Jul 17 2025, 11:34 PM
alc closed D51353: pmap_enter_{l2,pde}: correct the handling of an error case.
Jul 17 2025, 11:34 PM
alc added a comment to D51353: pmap_enter_{l2,pde}: correct the handling of an error case.

I have two related observations:

Jul 17 2025, 7:13 PM

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() (authored by alc).
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 (authored by alc).
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 (authored by alc).
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() (authored by alc).
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 (authored by alc).
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