Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp4167295pxb; Tue, 17 Nov 2020 13:09:16 -0800 (PST) X-Google-Smtp-Source: ABdhPJykm7X4EmQhGRZmBFMRz8nvqYSRvC998brG+D8nBzo8tbeYXioUYmhopbLUdVzfmGKLqj2w X-Received: by 2002:a50:875d:: with SMTP id 29mr3741648edv.172.1605647356402; Tue, 17 Nov 2020 13:09:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605647356; cv=none; d=google.com; s=arc-20160816; b=gEve1A+xsGiX00Dx+BYhWFJF7HaD1GbPKgNlIOS5y5J6Az27u+zhAPOVciTn2RSRO/ D8vr6kLlJI4vf5kRL51uZBkSB9Inmdeq8c2suPQtIgbcxz0oui5VPgR3B09pi+zAkJ3d uMYgH44xNzdfSOiPGQzSjRg2rn3bk7EpVNIeAX5B/Idq2+m62vByEOZWlTE/yaCLubLb hTeJHWKqPdqnWDmCQBv7ThlTP443wilAQo6AuSRrrnWZGiR3smcV98yW8i5PfmcrdIgx wwsFEokGWVr0s9pB2IMPMQJuzrAhdxTCAd/eRtLOHHfSKvY9WXcyHZu8W8ArMT7PMDKC w3oQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=RFeeohkz2Cx/D+vXLKhH0do1RFDw2pXSfBePcdf6Zq8=; b=NuC1KeOxD3RQbW0HSpzFcsPOFwSiKkhvdxWvhk8SqiAKKWflaW4Cvc/KQrT2Mc1fwD 06N5iqM8ImBh3Osks5lOIoXR2SJiSmDECSee1/Q2RtJgfaKrxP+6QsJY8Wj4i9/Y/5sN stHOAeT/fA6PJpJ35+81vd64sByC8sLXDIoImJaYHfG6wAnH8JXzTpkP1Gv7X/V/9NMc BuAmnfqgARPcDH0FnRnamVBaWyBLMLPRO9bysFNxt+H8xgWp42xLJsNNxzT4ZbLQf1fi hWwdclrKrS+hBNTkGO5RZsZPUzqw0Aqs03pMRF6rnHqSoetnqbCgM+AFqepK+qLYGv6V xmFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=M+do9ccI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ho39si12629810ejc.745.2020.11.17.13.08.51; Tue, 17 Nov 2020 13:09:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=M+do9ccI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726809AbgKQVFo (ORCPT + 99 others); Tue, 17 Nov 2020 16:05:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47096 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726136AbgKQVFn (ORCPT ); Tue, 17 Nov 2020 16:05:43 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9D33FC0613CF; Tue, 17 Nov 2020 13:05:43 -0800 (PST) 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=RFeeohkz2Cx/D+vXLKhH0do1RFDw2pXSfBePcdf6Zq8=; b=M+do9ccIfreRYCvuhFX2i+cV+S Q4YXBNQDOrGUz2802V6jQ7B4IwsEKpIwiGzPwqn6UNsf8fGsARnKy+Os3eMXHnZhfsBAoSrdoriUj OcgC9DcoW6OQSsfceAFW4j10Kh0wf18h2ch+LCzNK3Hhkh3kuCeo8Ggvo6R7c9BckJWW77w7qfgtr iwr5kKaNZNpjDuybJBqrISx/L1aelBIYJEpkbH6Iuccvc2Jxy9dFJd3pOgpk1+WM9D8cblhsh68Lu WhQ2KhsOdIbCjxE+c+PZgdS40amPZJKFE6e0EIgrJGuCnFAOGFdh2ibu91sV9rfHam7wBpSDM9s+9 1YkvGVHg==; Received: from willy by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1kf8AO-0003JG-DG; Tue, 17 Nov 2020 21:05:32 +0000 Date: Tue, 17 Nov 2020 21:05:32 +0000 From: Matthew Wilcox To: Roman Gushchin Cc: Zi Yan , linux-mm@kvack.org, "Kirill A . Shutemov" , Andrew Morton , linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, 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. Message-ID: <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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201114013801.GA3069806@carbon.dhcp.thefacebook.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 order.[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 order > > 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 did! mm/page_owner: change split_page_owner to take a count The implementation of split_page_owner() prefers a count rather than 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.