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 X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 77B49C63798 for ; Tue, 17 Nov 2020 21:12:16 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id D803324199 for ; Tue, 17 Nov 2020 21:12:15 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=nvidia.com header.i=@nvidia.com header.b="TcmRVMpN" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D803324199 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nvidia.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 497846B0036; Tue, 17 Nov 2020 16:12:15 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 448A06B005C; Tue, 17 Nov 2020 16:12:15 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2C2986B0068; Tue, 17 Nov 2020 16:12:15 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0051.hostedemail.com [216.40.44.51]) by kanga.kvack.org (Postfix) with ESMTP id F2EE96B0036 for ; Tue, 17 Nov 2020 16:12:14 -0500 (EST) Received: from smtpin16.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 8B0393631 for ; Tue, 17 Nov 2020 21:12:14 +0000 (UTC) X-FDA: 77495158188.16.hill75_321639a27334 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin16.hostedemail.com (Postfix) with ESMTP id 686C9100E690C for ; Tue, 17 Nov 2020 21:12:14 +0000 (UTC) X-HE-Tag: hill75_321639a27334 X-Filterd-Recvd-Size: 5394 Received: from hqnvemgate24.nvidia.com (hqnvemgate24.nvidia.com [216.228.121.143]) by imf33.hostedemail.com (Postfix) with ESMTP for ; Tue, 17 Nov 2020 21:12:13 +0000 (UTC) Received: from hqmail.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate24.nvidia.com (using TLS: TLSv1.2, AES256-SHA) id ; Tue, 17 Nov 2020 13:12:22 -0800 Received: from [10.2.160.29] (10.124.1.5) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Tue, 17 Nov 2020 21:12:06 +0000 From: Zi Yan To: Matthew Wilcox CC: Roman Gushchin , , "Kirill A . Shutemov" , Andrew Morton , , , Yang Shi , Michal Hocko , John Hubbard , Ralph Campbell , David Nellans Subject: Re: [RFC PATCH 3/6] mm: page_owner: add support for splitting to any order in split page_owner. Date: Tue, 17 Nov 2020 16:12:03 -0500 X-Mailer: MailMate (1.13.2r5673) Message-ID: <3E32BC50-700F-471E-89FD-35414610B84E@nvidia.com> In-Reply-To: <20201117210532.GX29991@casper.infradead.org> References: <20201111204008.21332-1-zi.yan@sent.com> <20201111204008.21332-4-zi.yan@sent.com> <20201114001505.GA3047204@carbon.dhcp.thefacebook.com> <20201114013801.GA3069806@carbon.dhcp.thefacebook.com> <20201117210532.GX29991@casper.infradead.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=_MailMate_6ED5853A-954C-4A59-A97B-624560A842DC_="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Originating-IP: [10.124.1.5] X-ClientProxiedBy: HQMAIL111.nvidia.com (172.20.187.18) To HQMAIL107.nvidia.com (172.20.187.13) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1605647542; bh=64ZjmSxGb8MyZ3UfPriBNWjeYtQYIH36eeoMM2kPilA=; h=From:To:CC:Subject:Date:X-Mailer:Message-ID:In-Reply-To: References:MIME-Version:Content-Type:X-Originating-IP: X-ClientProxiedBy; b=TcmRVMpNSIktWPyybX14aE24EuOExJXE+mwuer9UoVFqeNXEjZE1+JbaFzkl4QGxk o1/QnQawQ0JDFCDsSBM0B5PnsNMeX/u36KK/PHsGVplQPiLiSl8deG9bPpqG6RongU nTN8XCnn/1hwx318BlbVZJbLGa5ahodj3VWMpPIO2ssMSeigUikq0Tp7IG7QJiRW6S h5MOo+ggnWjamE2Ho9f+nkFomPcNqORDIH2/kNMHror66MKFNL8jfczVaScY8EZq3u ihbAwus1VX5aYsm9Z8Ihs/NrGDzMngJjDWqkjbe5U0Lae/muGJ5i62jAj+Oxm61VVl jO7F5BXPZiguw== 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: --=_MailMate_6ED5853A-954C-4A59-A97B-624560A842DC_= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On 17 Nov 2020, at 16:05, Matthew Wilcox wrote: > On Fri, Nov 13, 2020 at 05:38:01PM -0800, Roman Gushchin wrote: >> On Fri, Nov 13, 2020 at 08:08:58PM -0500, Zi Yan wrote: >>> Matthew recently converted split_page_owner to take nr instead of ord= er.[1] >>> But I am not >>> sure why, since it seems to me that two call sites (__split_huge_page= in >>> mm/huge_memory.c and split_page in mm/page_alloc.c) can pass the orde= r >>> information. >> >> Yeah, I'm not sure why too. Maybe Matthew has some input here? >> You can also pass new_nr, but IMO orders look so much better here. > > If only I'd written that information in the changelog ... oh wait, I di= d! > > mm/page_owner: change split_page_owner to take a count > > The implementation of split_page_owner() prefers a count rather tha= n the > old order of the page. When we support a variable size THP, we won= 't > have the order at this point, but we will have the number of pages.= > So change the interface to what the caller and callee would prefer.= There are two callers, split_page in mm/page_alloc.c and __split_huge_pag= e in mm/huge_memory.c. The former has the page order. The latter has the page = order information before __split_huge_page_tail is called, so we can do old_order =3D thp_order(head) instead of nr =3D thp_nr_page(head) and use= old_order. What am I missing there? Thanks. =E2=80=94 Best Regards, Yan Zi --=_MailMate_6ED5853A-954C-4A59-A97B-624560A842DC_= Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJDBAEBCgAtFiEEh7yFAW3gwjwQ4C9anbJR82th+ooFAl+0PKMPHHppeUBudmlk aWEuY29tAAoJEJ2yUfNrYfqKOR0QAKRcSZsmJeAgfo2cCv8MH/fo4aZ1Sjnu6YXo 30nKjYrVRJfrKwy5EZDObhz30InCvQBgV5rVwhleWlpstFYhy92otQVGh/i6R4US PTtm/CwyVISKU9NqlEN8UM1rvpg6OU8/cbvlUKuKPn8UXH0SWy0bu/tY6JAqfFlk nMfSohWDzU2OKxehLOvnTWRNFX8iGU10GjP5xYmwJGAMunUGlJzm9xFPO05XQvmb TW+khRXyBWUur97Uc68a+hvAbWPkKvAtL65LDmiJGX24FgE3i1TpkeHCaGaEyk/y XEs3aq/BoCVpcc/sEut38PovBjVZ4gSLrDX0rcFAFpxcqvyrGWUcSf7aS9+lhry0 7z4N3bZtm8UGQsNUWFE350tyOBdCiPe+jbi8ghZWEamkmFoaoFSc3iHhPyO6fXcK 8TXaYnQ6yXMP7womnp5p8qheC5vx2JpNLaq9bxPmfxaPdRUAUU+CR3uoHap4i4LG aDl+1aZYS7RGwZ1IfZLmu4OWOtQ3drj9U43C3K2dwhEKiSm8OdBWaW54WfUN6OEP 0kBoqpH3AGZ5BqU0vFNABqU9KL/iZtzskk7/j5o38J1XdgkNj7EZJQVtqXIXyI4K zRD/WKkwlT1RB7mdsXNnRbgMRmBxJDsBZa9rcrRSy+IqIP35w1AB8SnoJhM1rzVq XDoWNj7A =Mn3h -----END PGP SIGNATURE----- --=_MailMate_6ED5853A-954C-4A59-A97B-624560A842DC_=--