From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751547AbdKTQRw (ORCPT ); Mon, 20 Nov 2017 11:17:52 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:52886 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751358AbdKTQRu (ORCPT ); Mon, 20 Nov 2017 11:17:50 -0500 Date: Mon, 20 Nov 2017 16:17:29 +0000 From: Andrea Reale To: linux-kernel@vger.kernel.org, zi.yan@cs.rutgers.edu, n-horiguchi@ah.jp.nec.com Cc: akpm@linux-foundation.org, jglisse@redhat.com, realean2@ie.ibm.com Subject: [PATCH 0/1] mm/migrate: do not call prep_transhuge_page if !thp_migration_supported MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) X-TM-AS-GCONF: 00 x-cbid: 17112016-0020-0000-0000-000003CE855F X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17112016-0021-0000-0000-00004263CD67 Message-Id: X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-11-20_09:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1711200218 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi all, While working on a second round of patches to introduce memory hotplug / hot remove to arm64 (original attempt at [1]), and trying to rebase them on 4.14, I stumbled in some problematic behaviour during page migration when offlining for hot remove, whereas target pages for migration where found in a bad state. I believe that this behaviour may be originating from commit 8135d8926c08 ("mm: memory_hotplug: memory hotremove supports thp migration") and it is triggered when migrating pages for builds that have no ARCH_ENABLE_THP_MIGRATION but have thp support on (arm64, in my case). Specifically, my understanding is that prep_transhuge_page should not be called in linux/migrate.h:new_page_nodemask if !thp_migration_supported because, in that case, new_page would not be a thp. A tiny patch follows, showing what I mean. Please, let me know if my understanding is bogus. Best regards, Andrea [1] https://lkml.org/lkml/2017/4/11/536 Andrea Reale (1): mm/migrate: do not call prep_transhuge_page if !thp_migration_supported include/linux/migrate.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.7.4