Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp2239299pxp; Mon, 21 Mar 2022 14:40:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzBnvrCKEZ7PuLrI3lsj4+yQlm0L7JDVcu20CqFnfP1ah9ZFiU1pD7NjTl9RAJVv+Cz2/N9 X-Received: by 2002:aa7:88c1:0:b0:4fa:7031:895a with SMTP id k1-20020aa788c1000000b004fa7031895amr18680820pff.22.1647898855364; Mon, 21 Mar 2022 14:40:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647898855; cv=none; d=google.com; s=arc-20160816; b=T/0Pn6m8+AjJjxG362YuVWAlc2A+D80/8NLkKkoTyUtZxQfsqsuyrUahK9yiZ0tTCc 74fE5hUyKXhfjzT6KRiiCurWxicyAp4K5ofKlCk++2XaJ/FUxHQ5j7KL6IAlesFRqFqR SAUDhMXTlwnxLDX37/0Lspw7EO7dSZbGSv/TYroh/Gbt0mkadn5zNHfQAQi4vynx5tMa 5LnTAi+GHniXE13PQArKeG8z/mz8CVX1UP/uAZDBJpnXmsUuVVTXBcnIEPLmSvLEYbkp NFmpESq3l34Cvvm0OLRwHH+r53lJyAB7fWpw4cx067wnedTqqmKnTWUipM+5XCaSS1NR bArw== 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:dkim-signature:date; bh=/f628apkMpQsjSicVFzN0gWVenPYv3XtQ9ROsVjz1zw=; b=pZNstEuKWrJNGAOhdnCt3neATlEALXAoI0g8QR3LmUE0jWCJWeU69fYuAkJfNkcStm ezpVLpfmyHv4tHv11nnprFWGwlFdfd4hD/jPydU37jwQSAl05seSeffMCgu6zgLsJjS1 b24Q7o6PWo4tU+LCi7/B1zeSmZ8an6fdmFc0GNhc2jFrz6CT84eMtOS0mWA2cGHqixLN CMCKpcOSob0MpbniTohi2kuetVo7GjZ6xZHeQ6dFnGLSWy+xeTfaJWka7QIkdFf7FgUO 226ZQJ1XLarD/I216LnGSXARvLORP0igCX50fxLqoBte+ECurapviWQdGZjiujZxR/rp mAWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=NLKvTkWV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id q1-20020a056a00150100b004fa3a8dffbbsi10449225pfu.114.2022.03.21.14.40.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Mar 2022 14:40:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=NLKvTkWV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 33F1B1EA2A7; Mon, 21 Mar 2022 14:14:07 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352361AbiCUS6u (ORCPT + 99 others); Mon, 21 Mar 2022 14:58:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50142 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350600AbiCUS6t (ORCPT ); Mon, 21 Mar 2022 14:58:49 -0400 Received: from out2.migadu.com (out2.migadu.com [IPv6:2001:41d0:2:aacc::]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AE31018C0D0; Mon, 21 Mar 2022 11:57:22 -0700 (PDT) Date: Mon, 21 Mar 2022 11:57:11 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1647889038; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=/f628apkMpQsjSicVFzN0gWVenPYv3XtQ9ROsVjz1zw=; b=NLKvTkWVtIcr90tfxAO2XU/dNqfJbG6SpakXGsYu4nUm1t+IsyQ57Teq3ybpNZQL1sahsQ CbjbE+jOO3LR4Tu4y76Yxkw+BX+9uIhZFxOV6+BGKrEJiE7ReVDr5g7ZEjQGn7ivkPzlYF G7Y2bm7vKrmhEixspnA5N6snIVmDdDE= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Roman Gushchin To: Zi Yan Cc: Matthew Wilcox , linux-mm@kvack.org, Shuah Khan , Yang Shi , Miaohe Lin , Hugh Dickins , "Kirill A . Shutemov" , linux-kernel@vger.kernel.org, cgroups@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: Re: [RFC PATCH 1/5] mm: memcg: make memcg huge page split support any order split. Message-ID: References: <20220321142128.2471199-1-zi.yan@sent.com> <20220321142128.2471199-2-zi.yan@sent.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220321142128.2471199-2-zi.yan@sent.com> X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: linux.dev X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 21, 2022 at 10:21:24AM -0400, Zi Yan wrote: > From: Zi Yan > > It sets memcg information for the pages after the split. A new parameter > new_order is added to tell the new page order, always 0 for now. It > prepares for upcoming changes to support split huge page to any lower > order. > > Signed-off-by: Zi Yan > --- > include/linux/memcontrol.h | 2 +- > mm/huge_memory.c | 2 +- > mm/memcontrol.c | 10 +++++----- > mm/page_alloc.c | 2 +- > 4 files changed, 8 insertions(+), 8 deletions(-) > > diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h > index 89b14729d59f..e71189454bf0 100644 > --- a/include/linux/memcontrol.h > +++ b/include/linux/memcontrol.h > @@ -1116,7 +1116,7 @@ static inline void memcg_memory_event_mm(struct mm_struct *mm, > rcu_read_unlock(); > } > > -void split_page_memcg(struct page *head, unsigned int nr); > +void split_page_memcg(struct page *head, unsigned int nr, unsigned int new_order); It looks a bit inconsistent, can't we switch to use either nr or order for both arguments? The latter is preferable. Other than that, the patch looks good to me. Thanks!