lkml.org 
[lkml]   [2019]   [Oct]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/4] mm/migrate: Defer allocating new page until needed
On Wed, Oct 16, 2019 at 03:11:51PM -0700, Dave Hansen wrote:
>
> From: Keith Busch <keith.busch@intel.com>
>
> Migrating pages had been allocating the new page before it was actually
> needed. Subsequent operations may still fail, which would have to handle
> cleaning up the newly allocated page when it was never used.
>
> Defer allocating the page until we are actually ready to make use of
> it, after locking the original page. This simplifies error handling,
> but should not have any functional change in behavior. This is just
> refactoring page migration so the main part can more easily be reused
> by other code.

Well, the functional change I see is that now we allocate a new page under
page lock of old page.

It *should* be fine, but it has to be call out in the commit message.

--
Kirill A. Shutemov

\
 
 \ /
  Last update: 2019-10-17 13:28    [W:0.197 / U:0.344 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site