Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754744AbbGPCdL (ORCPT ); Wed, 15 Jul 2015 22:33:11 -0400 Received: from one.firstfloor.org ([193.170.194.197]:36067 "EHLO one.firstfloor.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753544AbbGPCdK (ORCPT ); Wed, 15 Jul 2015 22:33:10 -0400 Date: Thu, 16 Jul 2015 04:33:07 +0200 From: Andi Kleen To: Naoya Horiguchi Cc: Andrew Morton , Andi Kleen , Dean Nelson , Tony Luck , "Kirill A. Shutemov" , Hugh Dickins , "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" , Naoya Horiguchi Subject: Re: [PATCH v1 3/4] mm/memory-failure: give up error handling for non-tail-refcounted thp Message-ID: <20150716023307.GF1747@two.firstfloor.org> References: <1437010894-10262-1-git-send-email-n-horiguchi@ah.jp.nec.com> <1437010894-10262-4-git-send-email-n-horiguchi@ah.jp.nec.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1437010894-10262-4-git-send-email-n-horiguchi@ah.jp.nec.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 Content-Length: 863 Lines: 24 > @@ -909,6 +909,15 @@ int get_hwpoison_page(struct page *page) > * directly for tail pages. > */ > if (PageTransHuge(head)) { > + /* > + * Non anonymous thp exists only in allocation/free time. We > + * can't handle such a case correctly, so let's give it up. > + * This should be better than triggering BUG_ON when kernel > + * tries to touch a "partially handled" page. > + */ > + if (!PageAnon(head)) > + return 0; Please print a message for this case. In the future there will be likely more non anonymous THP pages from Kirill's large page cache work (so eventually we'll need it) -Andi -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/