lkml.org 
[lkml]   [2020]   [Jul]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCHv2] mm: Fix warning in move_normal_pmd()
On Wed, Jul 15, 2020 at 04:18:44PM -0700, Linus Torvalds wrote:
> On Wed, Jul 15, 2020 at 4:04 PM Linus Torvalds
> <torvalds@linux-foundation.org> wrote:
> >
> > It *might* be as simple as this incremental thing on top
>
> No, it needs to be
>
> + if (*old_addr + *len < old->vm_end)
> + return;
>
> in try_to_align_end(), of course.

Okay, this should work, but I'm not convinced that it gives much: number
of cases covered by the optimization not going to be high.

It can also lead to performance regression: for small mremap() if only one
side of the range got aligned and there's no PMD_SIZE range to move,
kernel will still iterate over PTEs, but it would need to handle more
pte_none()s than without the patch.

--
Kirill A. Shutemov

\
 
 \ /
  Last update: 2020-07-16 15:17    [W:0.081 / U:0.104 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site