mirror of
https://github.com/torvalds/linux.git
synced 2026-09-13 06:17:27 +02:00
mm/mprotect: drop 'sub' from batching context
Shorten the name of page_anon_exclusive_sub_batch by dropping the "sub-batch" context - the function itself doesn't need this context. Similarly, drop "sub" from sub_batch_idx, it is unnecessary and the usage is clear enough. Link: https://lore.kernel.org/20260623125723.2503832-3-dev.jain@arm.com Signed-off-by: Dev Jain <dev.jain@arm.com> Reviewed-by: Lance Yang <lance.yang@linux.dev> Reviewed-by: Pedro Falcato <pfalcato@suse.de> Reviewed-by: Lorenzo Stoakes <ljs@kernel.org> Acked-by: David Hildenbrand (Arm) <david@kernel.org> Reviewed-by: Barry Song <baohua@kernel.org> Cc: Anshuman Khandual <anshuman.khandual@arm.com> Cc: Baoquan He <baoquan.he@linux.dev> Cc: Chris Li <chrisl@kernel.org> Cc: Jann Horn <jannh@google.com> Cc: Kairui Song <kasong@tencent.com> Cc: Kemeng Shi <shikemeng@huaweicloud.com> Cc: Liam R. Howlett <liam@infradead.org> Cc: Nhat Pham <nphamcs@gmail.com> Cc: Ryan Roberts <ryan.roberts@arm.com> Cc: Vlastimil Babka <vbabka@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
parent
3ade884239
commit
8a28b50d6f
|
|
@ -143,7 +143,7 @@ static __always_inline void prot_commit_flush_ptes(struct vm_area_struct *vma,
|
|||
* !PageAnonExclusive() pages, starting from start_idx. Caller must enforce
|
||||
* that the ptes point to consecutive pages of the same anon large folio.
|
||||
*/
|
||||
static __always_inline int page_anon_exclusive_sub_batch(int start_idx, int max_len,
|
||||
static __always_inline int page_anon_exclusive_batch(int start_idx, int max_len,
|
||||
struct page *first_page, bool expected_anon_exclusive)
|
||||
{
|
||||
int idx;
|
||||
|
|
@ -174,16 +174,16 @@ static __always_inline void commit_anon_folio_batch(struct vm_area_struct *vma,
|
|||
pte_t oldpte, pte_t ptent, int nr_ptes, struct mmu_gather *tlb)
|
||||
{
|
||||
bool expected_anon_exclusive;
|
||||
int sub_batch_idx = 0;
|
||||
int batch_idx = 0;
|
||||
int len;
|
||||
|
||||
while (nr_ptes) {
|
||||
expected_anon_exclusive = PageAnonExclusive(first_page + sub_batch_idx);
|
||||
len = page_anon_exclusive_sub_batch(sub_batch_idx, nr_ptes,
|
||||
expected_anon_exclusive = PageAnonExclusive(first_page + batch_idx);
|
||||
len = page_anon_exclusive_batch(batch_idx, nr_ptes,
|
||||
first_page, expected_anon_exclusive);
|
||||
prot_commit_flush_ptes(vma, addr, ptep, oldpte, ptent, len,
|
||||
sub_batch_idx, expected_anon_exclusive, tlb);
|
||||
sub_batch_idx += len;
|
||||
batch_idx, expected_anon_exclusive, tlb);
|
||||
batch_idx += len;
|
||||
nr_ptes -= len;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user