Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756142AbcK2HxO convert rfc822-to-8bit (ORCPT ); Tue, 29 Nov 2016 02:53:14 -0500 Received: from TYO201.gate.nec.co.jp ([210.143.35.51]:60936 "EHLO tyo201.gate.nec.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753284AbcK2HxG (ORCPT ); Tue, 29 Nov 2016 02:53:06 -0500 From: Naoya Horiguchi To: Michal Hocko CC: "linux-mm@kvack.org" , "Kirill A. Shutemov" , Hugh Dickins , "Andrew Morton" , Dave Hansen , Andrea Arcangeli , Mel Gorman , Vlastimil Babka , "Pavel Emelyanov" , Zi Yan , Balbir Singh , "linux-kernel@vger.kernel.org" , Naoya Horiguchi Subject: Re: [PATCH v2 04/12] mm: thp: introduce CONFIG_ARCH_ENABLE_THP_MIGRATION Thread-Topic: [PATCH v2 04/12] mm: thp: introduce CONFIG_ARCH_ENABLE_THP_MIGRATION Thread-Index: AQHSOU807s/AHkLIAEyyqET6YZn3OqDt/AoAgAEk3gA= Date: Tue, 29 Nov 2016 07:50:06 +0000 Message-ID: <20161129075006.GA15582@hori1.linux.bs1.fc.nec.co.jp> References: <1478561517-4317-1-git-send-email-n-horiguchi@ah.jp.nec.com> <1478561517-4317-5-git-send-email-n-horiguchi@ah.jp.nec.com> <20161128142154.GM14788@dhcp22.suse.cz> In-Reply-To: <20161128142154.GM14788@dhcp22.suse.cz> Accept-Language: en-US, ja-JP Content-Language: ja-JP X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.128.101.15] Content-Type: text/plain; charset="iso-2022-jp" Content-ID: <9CCFE8352436764EA483008D45B714F4@gisp.nec.co.jp> Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1036 Lines: 22 On Mon, Nov 28, 2016 at 03:21:54PM +0100, Michal Hocko wrote: > On Tue 08-11-16 08:31:49, Naoya Horiguchi wrote: > > Introduces CONFIG_ARCH_ENABLE_THP_MIGRATION to limit thp migration > > functionality to x86_64, which should be safer at the first step. > > Please make sure to describe why this has to be arch specific and what > are arches supposed to provide in order to enable this option. OK, the below will be added in the future version: Thp migration is an arch-specific feature because it depends on the arch-dependent behavior of non-present format of page table entry. What you need to enable this option in other archs are: - to define arch-specific transformation functions like __pmd_to_swp_entry() and __swp_entry_to_pmd(), - to make sure that arch-specific page table walking code can properly handle !pmd_present case (gup_pmd_range() is a good example), - (if your archs enables CONFIG_HAVE_ARCH_SOFT_DIRTY,) to define soft dirty routines like pmd_swp_mksoft_dirty. Thanks, Naoya Horiguchi