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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CF376C433F5 for ; Wed, 13 Apr 2022 12:26:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235521AbiDMM2t (ORCPT ); Wed, 13 Apr 2022 08:28:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35372 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235535AbiDMM2p (ORCPT ); Wed, 13 Apr 2022 08:28:45 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4E92C5DA3A for ; Wed, 13 Apr 2022 05:26:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=bWS+cFnyEmbmqc6rZj6HU0wroameTU2nroSVRaqfs/E=; b=SUdi2YLNNEAnDrA3xDEKJqL4th CdmHx5JXh0io1LMw0ZZm+yQG+xPrKvHz5aJA314m19WCYYRN+0tVKIUad7VCdXdc9rRVldNJb94u3 AJ4efEN9X/GXelavnYvERM5zU5Mt/9Pcq4uq7kY67ZK6BADU19fTr8POGgXknRg+mq4YbgnNNb6zi zVKbG7fqaqXR4f6uLiBH09bFGV1HQqXUm2fFF+F0NgEyBb7d7iAsoylAgA9r0ZFodrZCEX6oIrZiW 4IVdiQerlDkrwwQl58j9eRRpokBwTNMF7fYxXpNXTN0L/V5nLZX9xFwhkyUv8cQK+0iNZF9gdLRrv FXeEzsng==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nec4U-00EFTA-Fn; Wed, 13 Apr 2022 12:26:06 +0000 Date: Wed, 13 Apr 2022 13:26:06 +0100 From: Matthew Wilcox To: David Hildenbrand Cc: Vlastimil Babka , linux-kernel@vger.kernel.org, Andrew Morton , Hugh Dickins , Linus Torvalds , David Rientjes , Shakeel Butt , John Hubbard , Jason Gunthorpe , Mike Kravetz , Mike Rapoport , Yang Shi , "Kirill A . Shutemov" , 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 Subject: Re: [PATCH v3 08/16] mm/rmap: drop "compound" parameter from page_add_new_anon_rmap() Message-ID: References: <20220329160440.193848-1-david@redhat.com> <20220329160440.193848-9-david@redhat.com> <4cb92b41-95e1-1666-321e-96ff9e6095bb@suse.cz> <368902ab-8d3f-5d62-581e-1ff930bcefa0@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <368902ab-8d3f-5d62-581e-1ff930bcefa0@redhat.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 12, 2022 at 11:37:09AM +0200, David Hildenbrand wrote: > On 12.04.22 10:47, Vlastimil Babka wrote: > > There's a VM_BUG_ON_PAGE(PageTransCompound(page), page); later in a > > !compound branch. Since compound is now determined by the same check, could > > be deleted. > > Yes, eventually we could get rid of both VM_BUG_ON_PAGE() on both > branches and add a single VM_BUG_ON_PAGE(PageTail(page), page) check on > the compound branch. (we could also make sure that we're not given a > hugetlb page) As a rule of thumb, if you find yourself wanting to add VM_BUG_ON_PAGE(PageTail(page), page), you probably want to change the interface to take a folio.