From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752555AbbIPC5G (ORCPT ); Tue, 15 Sep 2015 22:57:06 -0400 Received: from TYO202.gate.nec.co.jp ([210.143.35.52]:57778 "EHLO tyo202.gate.nec.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751960AbbIPC5F convert rfc822-to-8bit (ORCPT ); Tue, 15 Sep 2015 22:57:05 -0400 From: Naoya Horiguchi To: Andrew Morton CC: Michal Hocko , Andi Kleen , "Hugh Dickins" , "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH v1] mm: migrate: hugetlb: putback destination hugepage to active list Thread-Topic: [PATCH v1] mm: migrate: hugetlb: putback destination hugepage to active list Thread-Index: AQHQ8BWSNPQN4LHDJkSjsU9eUK3icZ493sIA Date: Wed, 16 Sep 2015 02:53:46 +0000 Message-ID: <20150916025344.GA18550@hori1.linux.bs1.fc.nec.co.jp> References: <20150812000336.GB32192@hori1.linux.bs1.fc.nec.co.jp> <1442362850-23261-1-git-send-email-n-horiguchi@ah.jp.nec.com> In-Reply-To: <1442362850-23261-1-git-send-email-n-horiguchi@ah.jp.nec.com> Accept-Language: ja-JP, en-US Content-Language: ja-JP X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.128.101.2] Content-Type: text/plain; charset="iso-2022-jp" Content-ID: <505BE543B0BD5E43864715FEE6EE4947@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 my bad, this patch is totally unrelated to the thread the previous email replied to. I just mishandled my script wrapping git-send-email, sorry. But just resending patch seems to be noisy, so I want this to be reviewed on this email. If it's inconvenient or uncommon way of submission, please let me know and I'll resend in a new thread. Thanks, Naoya Horiguchi On Wed, Sep 16, 2015 at 12:21:04AM +0000, Naoya Horiguchi wrote: > Since commit bcc54222309c ("mm: hugetlb: introduce page_huge_active") > each hugetlb page maintains its active flag to avoid a race condition between > multiple calls of isolate_huge_page(), but current kernel doesn't set the flag > on a hugepage allocated by migration because the proper putback routine isn't > called. This means that users could still encounter the race referred to by > bcc54222309c in this special case, so this patch fixes it. > > Fixes: bcc54222309c ("mm: hugetlb: introduce page_huge_active") > Signed-off-by: Naoya Horiguchi > Cc: #4.1 > --- > mm/migrate.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git v4.3-rc1/mm/migrate.c v4.3-rc1_patched/mm/migrate.c > index c3cb566af3e2..7452a00bbb50 100644 > --- v4.3-rc1/mm/migrate.c > +++ v4.3-rc1_patched/mm/migrate.c > @@ -1075,7 +1075,7 @@ static int unmap_and_move_huge_page(new_page_t get_new_page, > if (rc != MIGRATEPAGE_SUCCESS && put_new_page) > put_new_page(new_hpage, private); > else > - put_page(new_hpage); > + putback_active_hugepage(new_hpage); > > if (result) { > if (rc) > -- > 2.4.3 > > -- > 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