Page MenuHomeFreeBSD

alc (Alan Cox)
User

Projects

User Details

User Since
Dec 14 2014, 5:52 AM (387 w, 3 d)

Recent Activity

Apr 14 2022

alc accepted D34909: vm: Move the "vm_wait in early boot" assertion to the proper place.
Apr 14 2022, 4:18 PM

Apr 13 2022

alc accepted D34887: vm_phys_init: Quiet unused but set warnings about npages..
Apr 13 2022, 7:49 AM

Apr 5 2022

alc accepted D34568: Move the arm64 DMAP creation to C.
Apr 5 2022, 4:55 PM

Mar 28 2022

alc added a comment to D33947: Change free space search to avoid duplicate search.

vm_phys_alloc_seg_contig() will ignore runs of pages that aren't contained in the range [seg->start, seg->end], so doesn't this change potentially cause us to skip over eligible runs?

Mar 28 2022, 6:28 PM
alc added a comment to D33947: Change free space search to avoid duplicate search.

Peter, can you please test this?

Mar 28 2022, 5:36 PM
alc accepted D33947: Change free space search to avoid duplicate search.

I do, however, think that this deserves explanation in the form of a comment.

Mar 28 2022, 5:34 PM

Mar 25 2022

alc added a comment to D34568: Move the arm64 DMAP creation to C.

Andrew, I'll give this patch a final look over the weekend.

Mar 25 2022, 6:28 AM

Mar 19 2022

alc added inline comments to D34568: Move the arm64 DMAP creation to C.
Mar 19 2022, 5:19 PM
alc added inline comments to D34568: Move the arm64 DMAP creation to C.
Mar 19 2022, 4:46 PM

Mar 18 2022

alc accepted D34568: Move the arm64 DMAP creation to C.
Mar 18 2022, 6:04 PM

Mar 16 2022

alc added inline comments to D34568: Move the arm64 DMAP creation to C.
Mar 16 2022, 5:26 PM

Mar 15 2022

alc accepted D34516: Fix arm64 TLB invalidation with non-4k pages.
Mar 15 2022, 4:55 PM

Mar 14 2022

alc accepted D34517: Fix calculating l0index in _pmap_alloc_l3 on arm64.
Mar 14 2022, 5:40 PM
alc added inline comments to D34516: Fix arm64 TLB invalidation with non-4k pages.
Mar 14 2022, 5:39 PM

Feb 18 2022

alc added inline comments to D34272: riscv: Add various pmap definitions needed to support SV48 mode.
Feb 18 2022, 5:38 AM
alc added inline comments to D34274: riscv: Add a sysentvec for the SV48 user ABI.
Feb 18 2022, 5:35 AM
alc accepted D34271: riscv: Use generic CSR macros for writing SATP.
Feb 18 2022, 5:18 AM

Feb 16 2022

alc accepted D34270: riscv: Rename struct pmap's pm_l1 field to pm_top.
Feb 16 2022, 5:12 PM

Feb 15 2022

alc accepted D34267: riscv: Fix another race in pmap_pinit().
Feb 15 2022, 8:07 AM

Jan 31 2022

alc accepted D34089: Introduce sys/kassert.h.
Jan 31 2022, 6:06 PM

Jan 28 2022

alc accepted D34070: Make <vm/vm_extern.h> more self-contained..

Hmm. At first this didn't make sense to me. The "assertions" were written this way so that systm.h wouldn't have to be included, but the prototype for panic() is provided by systm.h. So, this code might as well have used KASSERT all along.

Jan 28 2022, 8:10 AM

Jan 27 2022

alc accepted D33735: Add arm64 CnP support.

I'm quite surprised to see this feature supported by the Graviton 2. I would only have expected to see this feature on micro-architectures that implement SMT/hyperthreading. In fact, the last paragraph of https://developer.arm.com/documentation/101811/0101/Address-spaces-in-AArch64 essentially says so. I wonder if it's simply a NOP on Graviton 2.

Jan 27 2022, 5:57 AM

Jan 20 2022

alc added inline comments to D33924: vm_pageout_scans: correct detection of active object.
Jan 20 2022, 12:16 AM

Jan 19 2022

alc accepted D33945: add seg->start check before block-walking in vm_phys_alloc_seg_contig.
Jan 19 2022, 6:40 AM

Jan 18 2022

alc accepted D33870: phys_alloc_seg_contig: don't allocate past seg->end.
Jan 18 2022, 6:05 PM
alc added inline comments to D33870: phys_alloc_seg_contig: don't allocate past seg->end.
Jan 18 2022, 9:42 AM

Jan 11 2022

alc accepted D33811: vm_pageout: Group sysctl variables together with sysctl definitions.
Jan 11 2022, 12:26 AM
alc accepted D33809: swap_pager: uma_zcreate() doesn't fail.
Jan 11 2022, 12:12 AM

Jan 9 2022

alc accepted D33725: Add invariants that check validity of alignment, boundary parameters.
Jan 9 2022, 10:20 PM

Jan 8 2022

alc added a comment to D33786: amd64: micro-optimize vptopte()/vtopde() further.

I'll take a look at this tomorrow.

Jan 8 2022, 6:00 AM
alc added a comment to D33776: amd64 pmap: simplify vtopte() and vtopde().

Here is the start of pmap_qenter(). Note the right shift followed by left shift:

Jan 8 2022, 4:43 AM

Jan 7 2022

alc added inline comments to D33776: amd64 pmap: simplify vtopte() and vtopde().
Jan 7 2022, 1:23 AM
alc added a comment to D33778: amd64 pmap: preset A and M bits for pmap_qenter() mappings.

As an aside, I just verified that arm64 is already setting the equivalent bits.

Jan 7 2022, 12:36 AM
alc accepted D33778: amd64 pmap: preset A and M bits for pmap_qenter() mappings.
Jan 7 2022, 12:05 AM

Jan 6 2022

alc accepted D33778: amd64 pmap: preset A and M bits for pmap_qenter() mappings.
Jan 6 2022, 11:48 PM

Jan 3 2022

alc committed R10:4ccd6c137f5b: arm64: Implement final level only TLB invalidations (authored by alc).
arm64: Implement final level only TLB invalidations
Jan 3 2022, 7:19 PM
alc closed D33705: arm64: Eliminate unnecessary "page walk cache" invalidations.
Jan 3 2022, 7:19 PM

Jan 1 2022

alc added a comment to D33705: arm64: Eliminate unnecessary "page walk cache" invalidations.

@andrew didn't you have a patch for implementing CnP support? If so, could you please post it?

Jan 1 2022, 8:24 PM
alc updated the diff for D33705: arm64: Eliminate unnecessary "page walk cache" invalidations.

Add comments at the head of pmap_invalidate_{all,page,range}(). In particular, document pmap_invalidate_all() as always invalidating all intermediate-level entries.

Jan 1 2022, 7:16 PM

Dec 31 2021

alc added inline comments to D33705: arm64: Eliminate unnecessary "page walk cache" invalidations.
Dec 31 2021, 8:03 PM
alc updated the diff for D33705: arm64: Eliminate unnecessary "page walk cache" invalidations.

Implement Mark's suggested optimization plus a related optimization to handling a singleton valid range as the last mapping in the PTP. Please check the logic carefully.

Dec 31 2021, 7:56 PM
alc added inline comments to D33705: arm64: Eliminate unnecessary "page walk cache" invalidations.
Dec 31 2021, 6:38 PM
alc added a comment to D33705: arm64: Eliminate unnecessary "page walk cache" invalidations.
In D33705#761849, @kib wrote:

Does arm64 use recursive mapping?

Dec 31 2021, 7:35 AM
alc requested review of D33705: arm64: Eliminate unnecessary "page walk cache" invalidations.
Dec 31 2021, 12:01 AM

Dec 29 2021

alc committed R10:24b82aa0c543: arm64: Simplify pmap_ts_referenced (authored by alc).
arm64: Simplify pmap_ts_referenced
Dec 29 2021, 12:03 AM

Dec 28 2021

alc committed R10:3c2ee7b28cfd: arm64: Enhance pmap_pte_exists()'s error reporting (authored by alc).
arm64: Enhance pmap_pte_exists()'s error reporting
Dec 28 2021, 11:47 PM
alc committed R10:e161dfa91897: Fix pmap_is_prefaultable() on arm64 and riscv (authored by alc).
Fix pmap_is_prefaultable() on arm64 and riscv
Dec 28 2021, 1:19 AM
alc closed D33659: Fix pmap_is_prefaultable() on arm64 and riscv.
Dec 28 2021, 1:18 AM

Dec 27 2021

alc committed R10:03f9cc89e1f5: arm64: Fix "set-but-not-used" warnings in the pmap (authored by alc).
arm64: Fix "set-but-not-used" warnings in the pmap
Dec 27 2021, 5:50 PM

Dec 26 2021

alc accepted D33656: Change page alignment behavior of boundary==0 in vm_reserv_reclaim_contig.
Dec 26 2021, 5:36 PM
alc requested review of D33659: Fix pmap_is_prefaultable() on arm64 and riscv.
Dec 26 2021, 7:37 AM

Dec 24 2021

alc accepted D33653: Move a comment.
Dec 24 2021, 10:08 PM
alc added inline comments to D33645: Fix an accounting error from 9b0c0769b2b2e1d6c917c0799f2a0.
Dec 24 2021, 7:05 PM
alc accepted D33644: alloc memory from reservation before breaking it.
Dec 24 2021, 6:57 PM
alc added a reviewer for D33644: alloc memory from reservation before breaking it: markj.
Dec 24 2021, 6:11 PM
alc added inline comments to D33644: alloc memory from reservation before breaking it.
Dec 24 2021, 6:11 PM
alc added a reviewer for D33645: Fix an accounting error from 9b0c0769b2b2e1d6c917c0799f2a0: markj.
Dec 24 2021, 8:45 AM
alc accepted D33645: Fix an accounting error from 9b0c0769b2b2e1d6c917c0799f2a0.
Dec 24 2021, 8:44 AM
alc added inline comments to D33644: alloc memory from reservation before breaking it.
Dec 24 2021, 5:41 AM
alc closed D33597: arm64: Introduce and use pmap_pte_exists().
Dec 24 2021, 4:58 AM
alc committed R10:b7ec0d268b73: arm64: Introduce and use pmap_pte_exists() (authored by alc).
arm64: Introduce and use pmap_pte_exists()
Dec 24 2021, 4:58 AM

Dec 23 2021

alc added a comment to D33597: arm64: Introduce and use pmap_pte_exists().
In D33597#759863, @kib wrote:
In D33597#759857, @alc wrote:

Should we introduce analogous functions on amd64 and riscv?

For amd64, which function would it replace? We typically use the step-walk style functions, like pmap_pdpde_to_pde(), pmap_pde_to_pte(), in amd64 pmap, which both makes explicit level argument not useful (and IMO even quite inconvenient to use), and minimizes full-walk functions use (pmap_pte() as is is used twice) . Also we access resulting paging element right away, which means that we panic on NULL accesses without explicit asserts.

Dec 23 2021, 7:19 PM
alc added a comment to D33597: arm64: Introduce and use pmap_pte_exists().

Should we introduce analogous functions on amd64 and riscv?

Dec 23 2021, 6:35 PM
alc updated the test plan for D33597: arm64: Introduce and use pmap_pte_exists().
Dec 23 2021, 8:19 AM
alc updated the diff for D33597: arm64: Introduce and use pmap_pte_exists().

Update comment. Add level KASSERT.

Dec 23 2021, 1:33 AM
alc added inline comments to D33597: arm64: Introduce and use pmap_pte_exists().
Dec 23 2021, 1:15 AM

Dec 22 2021

alc added inline comments to D33597: arm64: Introduce and use pmap_pte_exists().
Dec 22 2021, 8:47 PM
alc added inline comments to D33597: arm64: Introduce and use pmap_pte_exists().
Dec 22 2021, 8:42 PM
alc added inline comments to D33597: arm64: Introduce and use pmap_pte_exists().
Dec 22 2021, 8:35 PM
alc added inline comments to D33597: arm64: Introduce and use pmap_pte_exists().
Dec 22 2021, 6:58 PM
alc added a comment to D33597: arm64: Introduce and use pmap_pte_exists().

As an aside, while reviewing all of the callers to pmap_pte(), I noticed that pmap_is_prefaultable() is incorrectly implemented. It is going to return FALSE when it should return TRUE, and occasionally the opposite.

Dec 22 2021, 6:49 PM
alc added reviewers for D33597: arm64: Introduce and use pmap_pte_exists(): kib, markj.
Dec 22 2021, 6:44 PM
alc updated the diff for D33597: arm64: Introduce and use pmap_pte_exists().
Dec 22 2021, 6:40 PM

Dec 21 2021

alc accepted D33459: Don't fail changing props for unmapped DMAP memory.
Dec 21 2021, 4:58 AM
alc added a comment to D33509: Always check the return value of the arm64 pmap_pte.

See https://reviews.freebsd.org/D33597 for the pmap_pte_exists() prototype.

Dec 21 2021, 12:39 AM
alc updated the test plan for D33597: arm64: Introduce and use pmap_pte_exists().
Dec 21 2021, 12:36 AM
alc requested review of D33597: arm64: Introduce and use pmap_pte_exists().
Dec 21 2021, 12:35 AM
alc added a comment to D33509: Always check the return value of the arm64 pmap_pte.
In D33509#757401, @kib wrote:

May be, it makes sense to add something like pmap_pte_exists() function that asserts that L3 page exists, and use it instead of repeated KASSERT().

Dec 21 2021, 12:29 AM

Dec 20 2021

alc added a comment to D33583: Start the arm64 pmap_pte at level 0.

I'm confused. I don't see how this change makes any functional difference. The original code set *level == 0 and returned NULL when the L0 entry was not L0_TABLE, and only under those circumstances.

Dec 20 2021, 5:46 PM
alc added inline comments to D33312: Use bitstrings for reservation popmaps.
Dec 20 2021, 12:42 AM

Dec 16 2021

alc added inline comments to D33509: Always check the return value of the arm64 pmap_pte.
Dec 16 2021, 10:47 PM
alc added inline comments to D33509: Always check the return value of the arm64 pmap_pte.
Dec 16 2021, 10:44 PM
alc accepted D33344: Fix alignment issues in vm_reserv_reclaim_contig.
Dec 16 2021, 6:08 PM
alc added inline comments to D33459: Don't fail changing props for unmapped DMAP memory.
Dec 16 2021, 4:59 PM

Dec 15 2021

alc added inline comments to D33459: Don't fail changing props for unmapped DMAP memory.
Dec 15 2021, 6:56 PM
alc added a comment to D33344: Fix alignment issues in vm_reserv_reclaim_contig.

In the commit message, I would somehow explain that the consequence of the bug was only that the wrong reservations might be broken, not that unaligned or inappropriately boundary crossing memory would be returned by contigmalloc(), et al.

Dec 15 2021, 6:21 PM

Dec 14 2021

alc accepted D33416: vm_fault: Fix vm_fault_populate()'s handling of VM_FAULT_WIRE.
Dec 14 2021, 6:22 PM
alc added inline comments to D33416: vm_fault: Fix vm_fault_populate()'s handling of VM_FAULT_WIRE.
Dec 14 2021, 8:46 AM

Dec 13 2021

alc added inline comments to D33344: Fix alignment issues in vm_reserv_reclaim_contig.
Dec 13 2021, 10:43 PM

Dec 12 2021

alc added inline comments to D33344: Fix alignment issues in vm_reserv_reclaim_contig.
Dec 12 2021, 6:52 PM
alc added inline comments to D33344: Fix alignment issues in vm_reserv_reclaim_contig.
Dec 12 2021, 6:19 PM

Dec 11 2021

alc added inline comments to D33344: Fix alignment issues in vm_reserv_reclaim_contig.
Dec 11 2021, 11:36 PM

Dec 6 2021

alc committed R10:4c57d6d55516: amd64/pmap: fix user page table page accounting (authored by alc).
amd64/pmap: fix user page table page accounting
Dec 6 2021, 1:16 AM
alc closed D33276: amd64: fix user pt_page accounting.
Dec 6 2021, 1:16 AM

Dec 5 2021

alc updated the test plan for D33276: amd64: fix user pt_page accounting.
Dec 5 2021, 11:22 PM
alc requested review of D33276: amd64: fix user pt_page accounting.
Dec 5 2021, 6:50 PM

Dec 4 2021

alc added a comment to D33165: swapoff(8): add -f.

I think that's all I have to say.

Dec 4 2021, 8:41 PM

Dec 3 2021

alc added inline comments to D33165: swapoff(8): add -f.
Dec 3 2021, 8:02 AM
alc accepted D33167: Expand comment explaining reasons for automatic swapoff on shutdown.
Dec 3 2021, 7:26 AM

Nov 29 2021

alc added a comment to D33147: Make swapoff more robust, when using swap into file.

Individually, the updated comments make perfect sense from a purely localized standpoint, that is, they explain what is happening in that place. However, if I put myself in the place of a first-time reader of this code, the question that I would ask that isn't explained by either the old or updated comments is why any data is paged in at shutdown time.

Nov 29 2021, 6:12 PM