From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3257CC433F5 for ; Tue, 12 Apr 2022 09:37:12 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6E50E6B0078; Tue, 12 Apr 2022 05:37:11 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 6937A6B007D; Tue, 12 Apr 2022 05:37:11 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 55AD16B007E; Tue, 12 Apr 2022 05:37:11 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.25]) by kanga.kvack.org (Postfix) with ESMTP id 4535E6B0078 for ; Tue, 12 Apr 2022 05:37:11 -0400 (EDT) Received: from smtpin18.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay12.hostedemail.com (Postfix) with ESMTP id 0CB031202F1 for ; Tue, 12 Apr 2022 09:37:11 +0000 (UTC) X-FDA: 79347723462.18.0633E28 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by imf24.hostedemail.com (Postfix) with ESMTP id 2C1B418000A for ; Tue, 12 Apr 2022 09:37:09 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id F343D1F858; Tue, 12 Apr 2022 09:37:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1649756229; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Acl+0kkqyfmCUx2Q/P6xZ2ciXymcjfnhIA0pF3kbs78=; b=V82mBxbDz1XpzhOJbo+q5NDo7RWsgZG44QY+MoYm/qxNVP7Q93eSNVSkNAdWkD8ccpARek JEraM47mYtuJf+na1BSpCrnrROCQZPtm6vioyy6wuS3RcruBg534gKlG9cx/Bz+WzFNkid 5GuiT2j2RSBWsuKHHahWgghq6KlwQQY= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1649756229; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Acl+0kkqyfmCUx2Q/P6xZ2ciXymcjfnhIA0pF3kbs78=; b=6wKAJct1hLrby0ylhI1ziIkKNEG8+UWgjgWdDIk2MWdODeHqX2weJju5Jz19Rl/nRjoBub F52zkDM0rMRq6QAg== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 95F6613A99; Tue, 12 Apr 2022 09:37:08 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id EnvvI0RIVWLqMAAAMHmgww (envelope-from ); Tue, 12 Apr 2022 09:37:08 +0000 Message-ID: <742adeb1-0fa3-a2c8-1c90-ebcdb1e82022@suse.cz> Date: Tue, 12 Apr 2022 11:37:08 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: [PATCH v3 10/16] mm/huge_memory: remove outdated VM_WARN_ON_ONCE_PAGE from unmap_page() Content-Language: en-US To: David Hildenbrand , linux-kernel@vger.kernel.org Cc: Andrew Morton , Hugh Dickins , Linus Torvalds , David Rientjes , Shakeel Butt , John Hubbard , Jason Gunthorpe , Mike Kravetz , Mike Rapoport , Yang Shi , "Kirill A . Shutemov" , Matthew Wilcox , Jann Horn , Michal Hocko , Nadav Amit , Rik van Riel , Roman Gushchin , Andrea Arcangeli , Peter Xu , Donald Dutile , Christoph Hellwig , Oleg Nesterov , Jan Kara , Liang Zhang , Pedro Gomes , Oded Gabbay , linux-mm@kvack.org References: <20220329160440.193848-1-david@redhat.com> <20220329160440.193848-11-david@redhat.com> From: Vlastimil Babka In-Reply-To: <20220329160440.193848-11-david@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 2C1B418000A X-Stat-Signature: uiui3ipb5zseoxq8xbj39ctr49aixcau Authentication-Results: imf24.hostedemail.com; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=V82mBxbD; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=6wKAJct1; dmarc=none; spf=pass (imf24.hostedemail.com: domain of vbabka@suse.cz designates 195.135.220.29 as permitted sender) smtp.mailfrom=vbabka@suse.cz X-Rspam-User: X-HE-Tag: 1649756229-38232 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 3/29/22 18:04, David Hildenbrand wrote: > We can already theoretically fail to unmap (still having page_mapped()) in > case arch_unmap_one() fails, which can happen on sparc. Failures to > unmap are handled gracefully, just as if there are other references on > the target page: freezing the refcount in split_huge_page_to_list() > will fail if still mapped and we'll simply remap. > > In commit 504e070dc08f ("mm: thp: replace DEBUG_VM BUG with VM_WARN when > unmap fails for split") we already converted to VM_WARN_ON_ONCE_PAGE, > let's get rid of it completely now. > > This is a preparation for making try_to_migrate() fail on anonymous pages > with GUP pins, which will make this VM_WARN_ON_ONCE_PAGE trigger more > frequently. > > Reported-by: Yang Shi > Reviewed-by: Yang Shi > Signed-off-by: David Hildenbrand Acked-by: Vlastimil Babka > --- > mm/huge_memory.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/mm/huge_memory.c b/mm/huge_memory.c > index dd16819c5edc..70298431e128 100644 > --- a/mm/huge_memory.c > +++ b/mm/huge_memory.c > @@ -2241,8 +2241,6 @@ static void unmap_page(struct page *page) > try_to_migrate(folio, ttu_flags); > else > try_to_unmap(folio, ttu_flags | TTU_IGNORE_MLOCK); > - > - VM_WARN_ON_ONCE_PAGE(page_mapped(page), page); > } > > static void remap_page(struct folio *folio, unsigned long nr)