From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pb0-f46.google.com (mail-pb0-f46.google.com [209.85.160.46]) by kanga.kvack.org (Postfix) with ESMTP id D16556B0031 for ; Wed, 18 Dec 2013 17:08:33 -0500 (EST) Received: by mail-pb0-f46.google.com with SMTP id md12so251233pbc.19 for ; Wed, 18 Dec 2013 14:08:33 -0800 (PST) Received: from mail.linuxfoundation.org (mail.linuxfoundation.org. [140.211.169.12]) by mx.google.com with ESMTP id fu1si1025153pbc.134.2013.12.18.14.08.31 for ; Wed, 18 Dec 2013 14:08:32 -0800 (PST) Date: Wed, 18 Dec 2013 14:08:30 -0800 From: Andrew Morton Subject: Re: [PATCH] mm,numa,THP: initialize hstate for THP page size Message-Id: <20131218140830.924fa0a3bab0d497db5e256c@linux-foundation.org> In-Reply-To: <20131218170314.1e57bea7@cuia.bos.redhat.com> References: <20131218170314.1e57bea7@cuia.bos.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: Rik van Riel Cc: linux-kernel@vger.kernel.org, Chao Yang , linux-mm@kvack.org, aarcange@redhat.com, mgorman@suse.de, Veaceslav Falico , Naoya Horiguchi , David Rientjes , Michel Lespinasse , Michal Hocko On Wed, 18 Dec 2013 17:03:14 -0500 Rik van Riel wrote: > When hugetlbfs is started with a non-default page size, it is > possible that no hstate is initialized for the page sized used > by transparent huge pages. > > This causes copy_huge_page to crash on a null pointer. Make > sure we always have an hpage initialized for the page sized > used by THP. > A bit more context is needed here please - so that people can decide which kernel version(s) need patching. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ig0-f180.google.com (mail-ig0-f180.google.com [209.85.213.180]) by kanga.kvack.org (Postfix) with ESMTP id 763A36B0031 for ; Wed, 18 Dec 2013 17:51:15 -0500 (EST) Received: by mail-ig0-f180.google.com with SMTP id uq1so2391949igb.1 for ; Wed, 18 Dec 2013 14:51:15 -0800 (PST) Received: from mx1.redhat.com (mx1.redhat.com. [209.132.183.28]) by mx.google.com with ESMTP id 9si1735026icd.80.2013.12.18.14.51.13 for ; Wed, 18 Dec 2013 14:51:14 -0800 (PST) Date: Wed, 18 Dec 2013 17:03:14 -0500 From: Rik van Riel Subject: [PATCH] mm,numa,THP: initialize hstate for THP page size Message-ID: <20131218170314.1e57bea7@cuia.bos.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: linux-kernel@vger.kernel.org Cc: Chao Yang , linux-mm@kvack.org, akpm@linux-foundation.org, aarcange@redhat.com, mgorman@suse.de, Veaceslav Falico , Naoya Horiguchi , David Rientjes , Michel Lespinasse , Michal Hocko When hugetlbfs is started with a non-default page size, it is possible that no hstate is initialized for the page sized used by transparent huge pages. This causes copy_huge_page to crash on a null pointer. Make sure we always have an hpage initialized for the page sized used by THP. Signed-off-by: Rik van Riel Reported-by: Chao Yang --- mm/huge_memory.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/mm/huge_memory.c b/mm/huge_memory.c index 5749bcf..583e9d3 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c @@ -624,6 +624,13 @@ static int __init hugepage_init(void) return -EINVAL; } + /* + * Make sure an hstate is initialized for our page size, + * even if hugetlbfs is using a non-default page size. + */ + if (!size_to_hstate(PMD_PAGE_SIZE)) + hugetlb_add_hstate(HUGETLB_PAGE_ORDER); + err = hugepage_init_sysfs(&hugepage_kobj); if (err) return err; -- All Rights Reversed -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ie0-f179.google.com (mail-ie0-f179.google.com [209.85.223.179]) by kanga.kvack.org (Postfix) with ESMTP id 2C5546B0036 for ; Wed, 18 Dec 2013 17:51:16 -0500 (EST) Received: by mail-ie0-f179.google.com with SMTP id x13so443069ief.38 for ; Wed, 18 Dec 2013 14:51:16 -0800 (PST) Received: from mx1.redhat.com (mx1.redhat.com. [209.132.183.28]) by mx.google.com with ESMTP id 9si1735026icd.80.2013.12.18.14.51.14 for ; Wed, 18 Dec 2013 14:51:15 -0800 (PST) Message-ID: <52B21FC7.7070905@redhat.com> Date: Wed, 18 Dec 2013 17:20:55 -0500 From: Rik van Riel MIME-Version: 1.0 Subject: Re: [PATCH] mm,numa,THP: initialize hstate for THP page size References: <20131218170314.1e57bea7@cuia.bos.redhat.com> <20131218140830.924fa0a3bab0d497db5e256c@linux-foundation.org> In-Reply-To: <20131218140830.924fa0a3bab0d497db5e256c@linux-foundation.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: Andrew Morton Cc: linux-kernel@vger.kernel.org, Chao Yang , linux-mm@kvack.org, aarcange@redhat.com, mgorman@suse.de, Veaceslav Falico , Naoya Horiguchi , David Rientjes , Michel Lespinasse , Michal Hocko On 12/18/2013 05:08 PM, Andrew Morton wrote: > On Wed, 18 Dec 2013 17:03:14 -0500 Rik van Riel wrote: > >> When hugetlbfs is started with a non-default page size, it is >> possible that no hstate is initialized for the page sized used >> by transparent huge pages. >> >> This causes copy_huge_page to crash on a null pointer. Make >> sure we always have an hstate initialized for the page sized >> used by THP. >> > > A bit more context is needed here please - so that people can decide > which kernel version(s) need patching. That is a good question. Looking at the git log, this might go back to 2008, when the hugepagesz and default_hugepagesz boot options were introduced. Of course, back then there was no way to use 2MB pages together with 1GB pages. That did not come until transparent huge pages were introduced back in 2011. It looks like the transparent huge page code avoids the bug (accidentally?) by calling copy_user_huge_page when COWing a THP, instead of copy_huge_page, this avoids iterating over hstates[]. That means it should not be possible for the bug to have been triggered until the numa balancing code got merged. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ee0-f44.google.com (mail-ee0-f44.google.com [74.125.83.44]) by kanga.kvack.org (Postfix) with ESMTP id 81CDA6B0031 for ; Thu, 19 Dec 2013 05:22:34 -0500 (EST) Received: by mail-ee0-f44.google.com with SMTP id b57so362533eek.31 for ; Thu, 19 Dec 2013 02:22:33 -0800 (PST) Received: from mx2.suse.de (cantor2.suse.de. [195.135.220.15]) by mx.google.com with ESMTPS id s42si3696518eew.14.2013.12.19.02.22.32 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 19 Dec 2013 02:22:32 -0800 (PST) Date: Thu, 19 Dec 2013 11:22:31 +0100 From: Michal Hocko Subject: Re: [PATCH] mm,numa,THP: initialize hstate for THP page size Message-ID: <20131219102231.GE10855@dhcp22.suse.cz> References: <20131218170314.1e57bea7@cuia.bos.redhat.com> <20131218140830.924fa0a3bab0d497db5e256c@linux-foundation.org> <52B21FC7.7070905@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <52B21FC7.7070905@redhat.com> Sender: owner-linux-mm@kvack.org List-ID: To: Rik van Riel , Dave Hansen Cc: Andrew Morton , linux-kernel@vger.kernel.org, Chao Yang , linux-mm@kvack.org, aarcange@redhat.com, mgorman@suse.de, Veaceslav Falico , Naoya Horiguchi , David Rientjes , Michel Lespinasse [Adding Dave and Mel] On Wed 18-12-13 17:20:55, Rik van Riel wrote: > On 12/18/2013 05:08 PM, Andrew Morton wrote: > >On Wed, 18 Dec 2013 17:03:14 -0500 Rik van Riel wrote: > > > >>When hugetlbfs is started with a non-default page size, it is > >>possible that no hstate is initialized for the page sized used > >>by transparent huge pages. > >> > >>This causes copy_huge_page to crash on a null pointer. Make > >>sure we always have an hstate initialized for the page sized > >>used by THP. > >> > > > >A bit more context is needed here please - so that people can decide > >which kernel version(s) need patching. > > That is a good question. > > Looking at the git log, this might go back to 2008, > when the hugepagesz and default_hugepagesz boot > options were introduced. > > Of course, back then there was no way to use 2MB > pages together with 1GB pages. > > That did not come until transparent huge pages were > introduced back in 2011. It looks like the transparent > huge page code avoids the bug (accidentally?) by calling > copy_user_huge_page when COWing a THP, instead of > copy_huge_page, this avoids iterating over hstates[]. > > That means it should not be possible for the bug to > have been triggered until the numa balancing code > got merged. > copy_huge_page as hugetlb specific thing. It relies on hstate which is obviously not existing for THP pages. So why do we use it for thp pages in the first place? Mel, your "mm: numa: Add THP migration for the NUMA working set scanning fault case." has added check for PageTransHuge in migrate_page_copy so it uses the shared copy_huge_page now. Dave has already tried to fix it by https://lkml.org/lkml/2013/10/28/592 but this one has been dropped later with "to-be-updated". Dave do you have an alternative for your patch? -- Michal Hocko SUSE Labs -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ig0-f173.google.com (mail-ig0-f173.google.com [209.85.213.173]) by kanga.kvack.org (Postfix) with ESMTP id 0FB776B0031 for ; Thu, 19 Dec 2013 11:00:48 -0500 (EST) Received: by mail-ig0-f173.google.com with SMTP id uq10so12354387igb.0 for ; Thu, 19 Dec 2013 08:00:47 -0800 (PST) Received: from mx1.redhat.com (mx1.redhat.com. [209.132.183.28]) by mx.google.com with ESMTP id mg9si4383961icc.63.2013.12.19.08.00.45 for ; Thu, 19 Dec 2013 08:00:47 -0800 (PST) Message-ID: <52B30E48.9070505@redhat.com> Date: Thu, 19 Dec 2013 10:18:32 -0500 From: Rik van Riel MIME-Version: 1.0 Subject: Re: [PATCH] mm,numa,THP: initialize hstate for THP page size References: <20131218170314.1e57bea7@cuia.bos.redhat.com> <20131218140830.924fa0a3bab0d497db5e256c@linux-foundation.org> <52B21FC7.7070905@redhat.com> <20131219102231.GE10855@dhcp22.suse.cz> In-Reply-To: <20131219102231.GE10855@dhcp22.suse.cz> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: Michal Hocko Cc: Dave Hansen , Andrew Morton , linux-kernel@vger.kernel.org, Chao Yang , linux-mm@kvack.org, aarcange@redhat.com, mgorman@suse.de, Veaceslav Falico , Naoya Horiguchi , David Rientjes , Michel Lespinasse On 12/19/2013 05:22 AM, Michal Hocko wrote: > [Adding Dave and Mel] > copy_huge_page as hugetlb specific thing. It relies on hstate which is > obviously not existing for THP pages. So why do we use it for thp pages > in the first place? > > Mel, your "mm: numa: Add THP migration for the NUMA working set scanning > fault case." has added check for PageTransHuge in migrate_page_copy so > it uses the shared copy_huge_page now. Dave has already tried to fix it > by https://lkml.org/lkml/2013/10/28/592 but this one has been dropped > later with "to-be-updated". > > Dave do you have an alternative for your patch? Gah, never mind me. This oops happened on a slightly older tree, that did not have Dave's patch yet... Andrew, you can drop the patch. Sorry for the noise. -- All rights reversed -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756137Ab3LRWD3 (ORCPT ); Wed, 18 Dec 2013 17:03:29 -0500 Received: from mx1.redhat.com ([209.132.183.28]:61491 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751259Ab3LRWD0 (ORCPT ); Wed, 18 Dec 2013 17:03:26 -0500 Date: Wed, 18 Dec 2013 17:03:14 -0500 From: Rik van Riel To: linux-kernel@vger.kernel.org Cc: Chao Yang , linux-mm@kvack.org, akpm@linux-foundation.org, aarcange@redhat.com, mgorman@suse.de, Veaceslav Falico , Naoya Horiguchi , David Rientjes , Michel Lespinasse , Michal Hocko Subject: [PATCH] mm,numa,THP: initialize hstate for THP page size Message-ID: <20131218170314.1e57bea7@cuia.bos.redhat.com> Organization: Red Hat, Inc Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When hugetlbfs is started with a non-default page size, it is possible that no hstate is initialized for the page sized used by transparent huge pages. This causes copy_huge_page to crash on a null pointer. Make sure we always have an hpage initialized for the page sized used by THP. Signed-off-by: Rik van Riel Reported-by: Chao Yang --- mm/huge_memory.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/mm/huge_memory.c b/mm/huge_memory.c index 5749bcf..583e9d3 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c @@ -624,6 +624,13 @@ static int __init hugepage_init(void) return -EINVAL; } + /* + * Make sure an hstate is initialized for our page size, + * even if hugetlbfs is using a non-default page size. + */ + if (!size_to_hstate(PMD_PAGE_SIZE)) + hugetlb_add_hstate(HUGETLB_PAGE_ORDER); + err = hugepage_init_sysfs(&hugepage_kobj); if (err) return err; -- All Rights Reversed From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754524Ab3LRWIe (ORCPT ); Wed, 18 Dec 2013 17:08:34 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:36972 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751942Ab3LRWIb (ORCPT ); Wed, 18 Dec 2013 17:08:31 -0500 Date: Wed, 18 Dec 2013 14:08:30 -0800 From: Andrew Morton To: Rik van Riel Cc: linux-kernel@vger.kernel.org, Chao Yang , linux-mm@kvack.org, aarcange@redhat.com, mgorman@suse.de, Veaceslav Falico , Naoya Horiguchi , David Rientjes , Michel Lespinasse , Michal Hocko Subject: Re: [PATCH] mm,numa,THP: initialize hstate for THP page size Message-Id: <20131218140830.924fa0a3bab0d497db5e256c@linux-foundation.org> In-Reply-To: <20131218170314.1e57bea7@cuia.bos.redhat.com> References: <20131218170314.1e57bea7@cuia.bos.redhat.com> X-Mailer: Sylpheed 3.2.0beta5 (GTK+ 2.24.10; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 18 Dec 2013 17:03:14 -0500 Rik van Riel wrote: > When hugetlbfs is started with a non-default page size, it is > possible that no hstate is initialized for the page sized used > by transparent huge pages. > > This causes copy_huge_page to crash on a null pointer. Make > sure we always have an hpage initialized for the page sized > used by THP. > A bit more context is needed here please - so that people can decide which kernel version(s) need patching. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932109Ab3LRWVI (ORCPT ); Wed, 18 Dec 2013 17:21:08 -0500 Received: from mx1.redhat.com ([209.132.183.28]:63752 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752155Ab3LRWVF (ORCPT ); Wed, 18 Dec 2013 17:21:05 -0500 Message-ID: <52B21FC7.7070905@redhat.com> Date: Wed, 18 Dec 2013 17:20:55 -0500 From: Rik van Riel User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: Andrew Morton CC: linux-kernel@vger.kernel.org, Chao Yang , linux-mm@kvack.org, aarcange@redhat.com, mgorman@suse.de, Veaceslav Falico , Naoya Horiguchi , David Rientjes , Michel Lespinasse , Michal Hocko Subject: Re: [PATCH] mm,numa,THP: initialize hstate for THP page size References: <20131218170314.1e57bea7@cuia.bos.redhat.com> <20131218140830.924fa0a3bab0d497db5e256c@linux-foundation.org> In-Reply-To: <20131218140830.924fa0a3bab0d497db5e256c@linux-foundation.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/18/2013 05:08 PM, Andrew Morton wrote: > On Wed, 18 Dec 2013 17:03:14 -0500 Rik van Riel wrote: > >> When hugetlbfs is started with a non-default page size, it is >> possible that no hstate is initialized for the page sized used >> by transparent huge pages. >> >> This causes copy_huge_page to crash on a null pointer. Make >> sure we always have an hstate initialized for the page sized >> used by THP. >> > > A bit more context is needed here please - so that people can decide > which kernel version(s) need patching. That is a good question. Looking at the git log, this might go back to 2008, when the hugepagesz and default_hugepagesz boot options were introduced. Of course, back then there was no way to use 2MB pages together with 1GB pages. That did not come until transparent huge pages were introduced back in 2011. It looks like the transparent huge page code avoids the bug (accidentally?) by calling copy_user_huge_page when COWing a THP, instead of copy_huge_page, this avoids iterating over hstates[]. That means it should not be possible for the bug to have been triggered until the numa balancing code got merged. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752574Ab3LSKWg (ORCPT ); Thu, 19 Dec 2013 05:22:36 -0500 Received: from cantor2.suse.de ([195.135.220.15]:47507 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751008Ab3LSKWd (ORCPT ); Thu, 19 Dec 2013 05:22:33 -0500 Date: Thu, 19 Dec 2013 11:22:31 +0100 From: Michal Hocko To: Rik van Riel , Dave Hansen Cc: Andrew Morton , linux-kernel@vger.kernel.org, Chao Yang , linux-mm@kvack.org, aarcange@redhat.com, mgorman@suse.de, Veaceslav Falico , Naoya Horiguchi , David Rientjes , Michel Lespinasse Subject: Re: [PATCH] mm,numa,THP: initialize hstate for THP page size Message-ID: <20131219102231.GE10855@dhcp22.suse.cz> References: <20131218170314.1e57bea7@cuia.bos.redhat.com> <20131218140830.924fa0a3bab0d497db5e256c@linux-foundation.org> <52B21FC7.7070905@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <52B21FC7.7070905@redhat.com> 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 [Adding Dave and Mel] On Wed 18-12-13 17:20:55, Rik van Riel wrote: > On 12/18/2013 05:08 PM, Andrew Morton wrote: > >On Wed, 18 Dec 2013 17:03:14 -0500 Rik van Riel wrote: > > > >>When hugetlbfs is started with a non-default page size, it is > >>possible that no hstate is initialized for the page sized used > >>by transparent huge pages. > >> > >>This causes copy_huge_page to crash on a null pointer. Make > >>sure we always have an hstate initialized for the page sized > >>used by THP. > >> > > > >A bit more context is needed here please - so that people can decide > >which kernel version(s) need patching. > > That is a good question. > > Looking at the git log, this might go back to 2008, > when the hugepagesz and default_hugepagesz boot > options were introduced. > > Of course, back then there was no way to use 2MB > pages together with 1GB pages. > > That did not come until transparent huge pages were > introduced back in 2011. It looks like the transparent > huge page code avoids the bug (accidentally?) by calling > copy_user_huge_page when COWing a THP, instead of > copy_huge_page, this avoids iterating over hstates[]. > > That means it should not be possible for the bug to > have been triggered until the numa balancing code > got merged. > copy_huge_page as hugetlb specific thing. It relies on hstate which is obviously not existing for THP pages. So why do we use it for thp pages in the first place? Mel, your "mm: numa: Add THP migration for the NUMA working set scanning fault case." has added check for PageTransHuge in migrate_page_copy so it uses the shared copy_huge_page now. Dave has already tried to fix it by https://lkml.org/lkml/2013/10/28/592 but this one has been dropped later with "to-be-updated". Dave do you have an alternative for your patch? -- Michal Hocko SUSE Labs From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754927Ab3LSPSn (ORCPT ); Thu, 19 Dec 2013 10:18:43 -0500 Received: from mx1.redhat.com ([209.132.183.28]:43889 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752894Ab3LSPSl (ORCPT ); Thu, 19 Dec 2013 10:18:41 -0500 Message-ID: <52B30E48.9070505@redhat.com> Date: Thu, 19 Dec 2013 10:18:32 -0500 From: Rik van Riel User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7 MIME-Version: 1.0 To: Michal Hocko CC: Dave Hansen , Andrew Morton , linux-kernel@vger.kernel.org, Chao Yang , linux-mm@kvack.org, aarcange@redhat.com, mgorman@suse.de, Veaceslav Falico , Naoya Horiguchi , David Rientjes , Michel Lespinasse Subject: Re: [PATCH] mm,numa,THP: initialize hstate for THP page size References: <20131218170314.1e57bea7@cuia.bos.redhat.com> <20131218140830.924fa0a3bab0d497db5e256c@linux-foundation.org> <52B21FC7.7070905@redhat.com> <20131219102231.GE10855@dhcp22.suse.cz> In-Reply-To: <20131219102231.GE10855@dhcp22.suse.cz> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/19/2013 05:22 AM, Michal Hocko wrote: > [Adding Dave and Mel] > copy_huge_page as hugetlb specific thing. It relies on hstate which is > obviously not existing for THP pages. So why do we use it for thp pages > in the first place? > > Mel, your "mm: numa: Add THP migration for the NUMA working set scanning > fault case." has added check for PageTransHuge in migrate_page_copy so > it uses the shared copy_huge_page now. Dave has already tried to fix it > by https://lkml.org/lkml/2013/10/28/592 but this one has been dropped > later with "to-be-updated". > > Dave do you have an alternative for your patch? Gah, never mind me. This oops happened on a slightly older tree, that did not have Dave's patch yet... Andrew, you can drop the patch. Sorry for the noise. -- All rights reversed