Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2378462pxb; Tue, 9 Mar 2021 00:32:27 -0800 (PST) X-Google-Smtp-Source: ABdhPJzVayvSWHTFPIknvfMPrKVZOKR5yKQONVAErpY6rDmSgKbN8mWd67p/aIj+ksCVGDOY0HYP X-Received: by 2002:a17:906:58d6:: with SMTP id e22mr18864523ejs.112.1615278747172; Tue, 09 Mar 2021 00:32:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615278747; cv=none; d=google.com; s=arc-20160816; b=VUEbUL0x8TqNrqM+XRuDiHYBAEfz6bZ6/LoUNsiAFHlUzarR0uZZPUnIxNFWf07LW0 k0Ibnri30byFZmKhpe1W/uCszTnbQB2GCBCnG7Nb9yAh6eKiBpsAxl0HV+sHWqZ2I0XO n/IQEPnFtQ2Jp570WS82WAb0vfgnmfqmlzE2j2OROGh+La5NLlJIth1/DJFxQf96wL70 vQYilx7UR+vMW0wfhQ0/9RCapPW35uHtur0bttP6+4T1XgUSh5mHcp5tDkFCH2eMG6RE Epb+TCQChu4Wl3z0nVsRajUkC4fnY7eHNz9nhgrhCzmyO64r/P35JLDHwFk/mAPNsEBh /3jw== 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=3x2XIxgfjhorUHBLN/3kYdSw0pyeuC2U9t99e69VR1w=; b=o6mxzX8CIPdE+WhKZctZbLePqpgckFQAgyU3R/77uwcxlCdxQ3Y+iwwOR3QxIeeA/s v7AaxONq9Bhrp0GkNtPLlYPYNsk9LD2qUo5hTlm9TmReHoSbEVkQFNScc/zcTqC4kC1h y3dF3Uy7T+H5L6GiqFqHRKn3785U1daFzn6Fw8jdZi+2CvDtzNGZ2V9iHt1DmovxYRzu TWCKtpBTFRaufD3wwJNCJnpvka4eTVVYVL/6OpsaqyRMx0f+FonZwgFVQdcbcsNGNxQ0 aR/xfgDktzWxucDCfRnllqAl00+zbf5fhlUarEJIKBJxovdB4Rnm0Hd4Yc6MuW/ZpFLH 10EA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=jmaB5EvS; 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; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j23si8335383eje.581.2021.03.09.00.32.04; Tue, 09 Mar 2021 00:32:27 -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=@suse.com header.s=susede1 header.b=jmaB5EvS; 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; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229637AbhCII24 (ORCPT + 99 others); Tue, 9 Mar 2021 03:28:56 -0500 Received: from mx2.suse.de ([195.135.220.15]:52840 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229599AbhCII21 (ORCPT ); Tue, 9 Mar 2021 03:28:27 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1615278506; h=from:from:reply-to: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=3x2XIxgfjhorUHBLN/3kYdSw0pyeuC2U9t99e69VR1w=; b=jmaB5EvS92fVBGydJx9tEuTD4FFNFj7e1/KPP/oloRMuYh2bIpLMnh9RfULVCVLroGmG3Z SEZDDURwZkUKThd6R7QG8bnL1U309iJtXXI2GUdJWlN+/eisoY2CmIN6/Lxt5/UrITScle ux1yizLdAs64IycXDmP2S61KfU+JyxI= Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 617CEAC24; Tue, 9 Mar 2021 08:28:26 +0000 (UTC) Date: Tue, 9 Mar 2021 09:28:25 +0100 From: Michal Hocko To: "Singh, Balbir" Cc: Zhou Guanghui , linux-kernel@vger.kernel.org, linux-mm@kvack.org, akpm@linux-foundation.org, hannes@cmpxchg.org, hughd@google.com, kirill.shutemov@linux.intel.com, npiggin@gmail.com, ziy@nvidia.com, wangkefeng.wang@huawei.com, guohanjun@huawei.com, dingtianhong@huawei.com, chenweilong@huawei.com, rui.xiang@huawei.com Subject: Re: [PATCH v2 1/2] mm/memcg: rename mem_cgroup_split_huge_fixup to split_page_memcg Message-ID: References: <20210304074053.65527-1-zhouguanghui1@huawei.com> <20210304074053.65527-2-zhouguanghui1@huawei.com> <3ad50842-881f-eb88-a14d-0b6c70ce33d2@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3ad50842-881f-eb88-a14d-0b6c70ce33d2@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue 09-03-21 09:37:29, Balbir Singh wrote: > On 4/3/21 6:40 pm, Zhou Guanghui wrote: [...] > > -#ifdef CONFIG_TRANSPARENT_HUGEPAGE > > /* > > - * Because page_memcg(head) is not set on compound tails, set it now. > > + * Because page_memcg(head) is not set on tails, set it now. > > */ > > -void mem_cgroup_split_huge_fixup(struct page *head) > > +void split_page_memcg(struct page *head, unsigned int nr) > > { > > Do we need input validation on nr? Can nr be aribtrary or can we enforce > > VM_BUG_ON(!is_power_of_2(nr)); In practice this will be power of 2 but why should we bother to sanitze that? -- Michal Hocko SUSE Labs