Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp8098133ybl; Thu, 16 Jan 2020 10:34:31 -0800 (PST) X-Google-Smtp-Source: APXvYqw6peMQyqakyUuZ2NVvVSsf1EsXE2ZZi3kx7BUs2e4vyQYYRBbtDcw4t51vVzrUGisP8Ojc X-Received: by 2002:a05:6830:2147:: with SMTP id r7mr3225580otd.94.1579199671369; Thu, 16 Jan 2020 10:34:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579199671; cv=none; d=google.com; s=arc-20160816; b=qyxx5itX/kRNedorQdIts5pGsE6c8hr6Lqw0n5SoGvRqivVgCScdHJwSk9GnTjVSIp wv4Qy+lxf+eZJtbRBR6mDndOFvekl80PltafDLxBintLtnsUwQmjFNeBHOMNflhl8UrD wiQclH+fM9L6hRBPEKTfJ/89auIr7K/jIT26NQzoT6U7cnSgoWkaS0INUTLivsZNFscr 6Ih/0ChShvGPia4jivDrUdg5aKeRVwnHOZ1WVR9rhWICHOPDQJT3YZHAAUOivM4yza6F inUmkzk5CTuXSrce05+qsDWpRmfC+v3iORY12n6mUV+JmSPl07JjVkfeKu0vdMguHDJB 1S2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=qPrmqLJiP71VA0NeSCTEgrXiIHb5kLqqrkQ2JxiPGho=; b=PThovVbfI5wqyrrEnZKcXn8n3aCmp8ZIc9YmEcB6uyLM1CmsukQyrOFiNkyxvZz3LG uOr6LnoSAyyoHQ2rKZBG1zFJwS6wIcnA6ZrX9M9ByDkpdo/EylZQhQ7Nj2459aNzI9GN U/76IWy+KuAlU72L8Uo/RldyFAD4GGsLo0vz0fPYM6P8cu9m/GvjCB7dc/h6gkRLsJMV oqT6ytjLkU07NbXJJJCQN6c6tRg60kaPZdixaJmOTPQ2GPcJdzVrQgEZal2mv7Zx/zGX aTMMoU0W4Gajfbe9diJhkm147eKczvp9eft+Xz+E0dZ+nAbRh2GxP2/IlskpxN5LciFh M2Gw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cmpxchg-org.20150623.gappssmtp.com header.s=20150623 header.b="T/c/Nc6b"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=cmpxchg.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z62si11849544oiz.271.2020.01.16.10.34.19; Thu, 16 Jan 2020 10:34:31 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@cmpxchg-org.20150623.gappssmtp.com header.s=20150623 header.b="T/c/Nc6b"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=cmpxchg.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2392017AbgAPSdA (ORCPT + 99 others); Thu, 16 Jan 2020 13:33:00 -0500 Received: from mail-qt1-f196.google.com ([209.85.160.196]:42717 "EHLO mail-qt1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2403840AbgAPRYy (ORCPT ); Thu, 16 Jan 2020 12:24:54 -0500 Received: by mail-qt1-f196.google.com with SMTP id j5so19467835qtq.9 for ; Thu, 16 Jan 2020 09:24:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cmpxchg-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=qPrmqLJiP71VA0NeSCTEgrXiIHb5kLqqrkQ2JxiPGho=; b=T/c/Nc6bCUmuGGYnx1mXNg/wgMTrK3EvK5NFy5avi9BI9aT7kuWce6IxNfrkIpAWW0 iR3P24nqtNcVGBXiyJ7MI5JseF7tB3k1jcbrdsGZUMVibmkTIybMqOZWo6qQ753qpTYO c5ZGa85I+xjZMTgsSS6UjvhAsHpENoK10hL1sSkGFhJUwfcA6VBwxyoe/uAxOPPOKJkf 8vQW2xc4GCrqjGKMcMFDphepzX+SXVRJUpH8V6vMXJx8rF7kAgHgyz+wyV3KLFbILyYu 20Y+pBa88uStAUTQLjOTMRgIBIB3dXfcwBZS0tWfKMEzcJamwSP7Xt/HQSCa3rF3oIJw H6OQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=qPrmqLJiP71VA0NeSCTEgrXiIHb5kLqqrkQ2JxiPGho=; b=nWlgXFmA5ko7vtvBqAgT3Nul0GIunjGNbCsmg2Vhq+rQEsWRajFtwBwBuKueYChMr5 owzQaY9XkwEce8/MHvAy6+ZVxR8l3u9mXoIvKzIYPBe7Shj6LGw8kHXgXau9ur1hxeM6 GnQRlEhmkFyimYaLFVYsByeRQh636x+aFarLKsXPOV3KompePjLP3ex6fmSskbqUtrHr 5KDCQ0Z/q7l6ah8qOPh3cc+dRLstOFXR9Uk1w6otb4Ff3uzDXaNrd5XpephpPeUus00I Z7xvINMneVi8bZ8GLI9lVRqdmf2zrNRVRvY+mn5Cg0/NEmRxK2/Ey7XFcbrkfPgsKqCA FoNQ== X-Gm-Message-State: APjAAAXftsSQ7h4o8eoBDQU+zKtwb4OCPSZaZYgUl/prfPhLae1atWt/ rqm5Z8GJ/UAE+yCwACcN01EDsg== X-Received: by 2002:aed:24ec:: with SMTP id u41mr3553692qtc.220.1579195493467; Thu, 16 Jan 2020 09:24:53 -0800 (PST) Received: from localhost ([2620:10d:c091:500::ae73]) by smtp.gmail.com with ESMTPSA id g18sm10401144qki.13.2020.01.16.09.24.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Jan 2020 09:24:52 -0800 (PST) Date: Thu, 16 Jan 2020 12:24:51 -0500 From: Johannes Weiner To: Roman Gushchin Cc: linux-mm@kvack.org, Andrew Morton , Michal Hocko , Shakeel Butt , Vladimir Davydov , linux-kernel@vger.kernel.org, kernel-team@fb.com Subject: Re: [PATCH v2 4/6] mm: kmem: switch to nr_pages in (__)memcg_kmem_charge_memcg() Message-ID: <20200116172451.GD57074@cmpxchg.org> References: <20200109202659.752357-1-guro@fb.com> <20200109202659.752357-5-guro@fb.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200109202659.752357-5-guro@fb.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 09, 2020 at 12:26:57PM -0800, Roman Gushchin wrote: > These functions are charging the given number of kernel pages to the > given memory cgroup. The number doesn't have to be a power of two. > Let's make them to take the unsigned int nr_pages as an argument > instead of the page order. > > It makes them look consistent with the corresponding uncharge > functions and functions like: mem_cgroup_charge_skmem(memcg, nr_pages). > > Signed-off-by: Roman Gushchin Acked-by: Johannes Weiner