From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751939AbcELC64 (ORCPT ); Wed, 11 May 2016 22:58:56 -0400 Received: from LGEAMRELO11.lge.com ([156.147.23.51]:58449 "EHLO lgeamrelo11.lge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751530AbcELC6z (ORCPT ); Wed, 11 May 2016 22:58:55 -0400 X-Original-SENDERIP: 156.147.1.126 X-Original-MAILFROM: iamjoonsoo.kim@lge.com X-Original-SENDERIP: 10.177.222.138 X-Original-MAILFROM: iamjoonsoo.kim@lge.com Date: Thu, 12 May 2016 11:58:58 +0900 From: Joonsoo Kim To: Vlastimil Babka Cc: Andrew Morton , mgorman@techsingularity.net, Minchan Kim , Alexander Potapenko , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 3/6] mm/page_owner: copy last_migrate_reason in copy_page_owner() Message-ID: <20160512025858.GC8215@js1304-P5Q-DELUXE> References: <1462252984-8524-1-git-send-email-iamjoonsoo.kim@lge.com> <1462252984-8524-4-git-send-email-iamjoonsoo.kim@lge.com> <5731FA88.2060701@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5731FA88.2060701@suse.cz> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 10, 2016 at 05:13:12PM +0200, Vlastimil Babka wrote: > On 05/03/2016 07:23 AM, js1304@gmail.com wrote: > >From: Joonsoo Kim > > > >Currently, copy_page_owner() doesn't copy all the owner information. > >It skips last_migrate_reason because copy_page_owner() is used for > >migration and it will be properly set soon. But, following patch > >will use copy_page_owner() and this skip will cause the problem that > >allocated page has uninitialied last_migrate_reason. To prevent it, > >this patch also copy last_migrate_reason in copy_page_owner(). > > Hmm it's a corner case, but if the "new" page was dumped e.g. due to > a bug during the migration, is the copied migrate reason from the > "old" page actually meaningful? I'd say it might be misleading and > it's simpler to just make sure it's initialized to -1. Hmm... if it is the case, other fields are also misleading. I think that we can tolerate this corner case and keeping function semantic as function name suggests is better practice. Thanks.