lkml.org 
[lkml]   [2022]   [Oct]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2] hugetlb: don't delete vma_lock in hugetlb MADV_DONTNEED processing
From
Date
On Oct 30, 2022, at 11:43 AM, Peter Xu <peterx@redhat.com> wrote:

> The loop comes from 7e027b14d53e ("vm: simplify unmap_vmas() calling
> convention", 2012-05-06), where zap_page_range() was used to replace a call
> to unmap_vmas() because the patch wanted to eliminate the zap details
> pointer for unmap_vmas(), which makes sense.
>
> I didn't check the old code, but from what I can tell (and also as Mike
> pointed out) I don't think zap_page_range() in the lastest code base is
> ever used on multi-vma at all. Otherwise the mmu notifier is already
> broken - see mmu_notifier_range_init() where the vma pointer is also part
> of the notification.
>
> Perhaps we should just remove the loop?

There is already zap_page_range_single() that does exactly that. Just need
to export it.

\
 
 \ /
  Last update: 2022-10-30 19:54    [W:0.310 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site