Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: David Carlier <devnexen@gmail.com>
To: baohua@kernel.org
Cc: jiangwenxiaomi@gmail.com, dev.jain@arm.com, david@kernel.org,
	urezki@gmail.com, linux-mm@kvack.org,
	linux-arm-kernel@lists.infradead.org,
	David Carlier <devnexen@gmail.com>
Subject: Re: [PATCH v7 2/7] arm64/vmalloc: Allow arch_vmap_pte_range_map_size to batch multiple CONT_PTE
Date: Tue, 21 Jul 2026 19:17:29 +0100	[thread overview]
Message-ID: <20260721181729.305137-1-devnexen@gmail.com> (raw)
In-Reply-To: <20260715120813.3609949-3-jiangwen6@xiaomi.com>

Barry, Wen - the returned span is capped at PMD_SIZE >> 1 but only
checked for CONT_PTE_SIZE alignment. In the batched vmap() path pages
are only contiguous within a naturally aligned block, so when a PMD
boundary splits a batch the next region starts mid block and the span
runs past the contiguous run - set_huge_pte_at() maps the wrong pages,
tail of the array left unmapped, no warning.

What do you think of clamping the span to the pfn physical alignment,
like 8xx does:

	while (!IS_ALIGNED(PFN_PHYS(pfn), size))
		size >>= 1;

Cheers.


  reply	other threads:[~2026-07-21 18:18 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-15 12:08 [PATCH v7 0/7] mm/vmalloc: Speed up ioremap, vmalloc and vmap with contiguous memory Wen Jiang
2026-07-15 12:08 ` [PATCH v7 1/7] arm64/hugetlb: Extend batching of multiple CONT_PTE in a single PTE setup Wen Jiang
2026-07-20  8:16   ` David Hildenbrand (Arm)
2026-07-21  5:31     ` Barry Song
2026-07-15 12:08 ` [PATCH v7 2/7] arm64/vmalloc: Allow arch_vmap_pte_range_map_size to batch multiple CONT_PTE Wen Jiang
2026-07-21 18:17   ` David Carlier [this message]
2026-07-15 12:08 ` [PATCH v7 3/7] mm/vmalloc: Extract vmap_set_ptes() to consolidate PTE mapping logic Wen Jiang
2026-07-15 12:08 ` [PATCH v7 4/7] mm/vmalloc: Extend page table walk to support larger page_shift sizes and eliminate page table rewalk Wen Jiang
2026-07-15 12:08 ` [PATCH v7 5/7] mm/vmalloc: Extract vm_shift() to consolidate mapping shift selection Wen Jiang
2026-07-16 10:12   ` David Hildenbrand (Arm)
2026-07-20  7:50   ` Dev Jain
2026-07-15 12:08 ` [PATCH v7 6/7] mm/vmalloc: map contiguous pages in batches for vmap() if possible Wen Jiang
2026-07-16 10:57   ` David Hildenbrand (Arm)
2026-07-20  7:50     ` Dev Jain
2026-07-20 16:20       ` Wen Jiang
2026-07-15 12:08 ` [PATCH v7 7/7] mm/vmalloc: align vm_area so vmap() can batch mappings Wen Jiang
2026-07-15 18:37 ` [PATCH v7 0/7] mm/vmalloc: Speed up ioremap, vmalloc and vmap with contiguous memory Andrew Morton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260721181729.305137-1-devnexen@gmail.com \
    --to=devnexen@gmail.com \
    --cc=baohua@kernel.org \
    --cc=david@kernel.org \
    --cc=dev.jain@arm.com \
    --cc=jiangwenxiaomi@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-mm@kvack.org \
    --cc=urezki@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox