Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1330666ybl; Fri, 10 Jan 2020 16:29:36 -0800 (PST) X-Google-Smtp-Source: APXvYqwAgAis/xbq2IS9WXVaFnduHPxIuLSmpIarF/buoJzPCXFb+HltTh3u90kvcY9A35QnwjMT X-Received: by 2002:a9d:7d85:: with SMTP id j5mr5030560otn.86.1578702576520; Fri, 10 Jan 2020 16:29:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578702576; cv=none; d=google.com; s=arc-20160816; b=rQnw2Zzd3t9RdSncaPkYOK5P1jkK3xsFcbbZxavQ5irasJ0bK8EBd8Ioba2DamBCWa 5Vkgmae4sLWgOJFRXsx/kNJ2m7NfFxkfY00s3llSOOby4fA+dF68oGDYGYpJjwP1yGQ5 J5gfZdmqfXGjAaB0pHNEkX9p8c1LuQ3Zt7+S9OAwstHWexwEvXdjQfEAn5zhdc7WYOHm Hyv3dZazmHW/IIbH3bGk+K9CwPV1T481t/fEpiEj2udwvIs87xdXiaB+c/ADwWdkft2Z TrikqzNYX8hidBGEulfGrd4jy1ayex8hW9MivhXDvBxdYPZg2g4OiQi3QqUssbHGK+px hfrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=y/gZ8+YmCdyaB0LsPIOJsTXh1S5MOPke76VouPArXYA=; b=q//jvXMZuiOSIhfoNSPjeEYQ9r4O7GEcLTjw+DBFUPyGTBTE0XXsBKL8jXiGKrK8C6 b0Woq9uf2K30FaqUVbZqeT6PIJq1pOLX1h0WlD2Pj0yb3phvjVoqUixKutzrduWaZ6ne dx+S/fQeiulQ/JhXHeAp6nJuP/yqx4CgKZloKZDtAeBHbD9acRpZ7ZugqlFP6qIgMP7m uPKYCR8GCK7XV7IiJR+Du3M9oUmoHq2QrAkIdwsEKkU29OuicR/aefGqNVzU1cYpgUYI J3MAW/Tna1xLbb/Q2kHeAdWSat/Dn62I8rfP7o7l2mqh094lhFis3osGgyMn/Qgc8OKQ MUFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=eNIbu+Un; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c26si2663640otf.288.2020.01.10.16.29.25; Fri, 10 Jan 2020 16:29:36 -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=@google.com header.s=20161025 header.b=eNIbu+Un; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727812AbgAKA1b (ORCPT + 99 others); Fri, 10 Jan 2020 19:27:31 -0500 Received: from mail-oi1-f193.google.com ([209.85.167.193]:46059 "EHLO mail-oi1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727544AbgAKA1b (ORCPT ); Fri, 10 Jan 2020 19:27:31 -0500 Received: by mail-oi1-f193.google.com with SMTP id n16so3457423oie.12 for ; Fri, 10 Jan 2020 16:27:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=y/gZ8+YmCdyaB0LsPIOJsTXh1S5MOPke76VouPArXYA=; b=eNIbu+Unv7jQV7eEVof+W8r6x+EpEkEP6HLMuArZHYFk5IZey1lNEbYorTiYznFfXW Dhv3A0MBWzjg32jPzZweiSelZ6T1m5ddK5Q4m6ib6fay71vH8KZ+UG2pD1ip+GhqwQkb Abm0uDVdav4i4C2XgNGGk7Ql8cQCW0uTWxBJles36SDz2C+jlSWR4enz0F+snPKPRVm4 BdJXMA2DubS6zajxK/K8wwUlf2fTjbInuIa/VyNGuv+6aT0+E/u/MTEPKM1wQOabaL7h Lcf5Bd/waIaxQclCtVN8rkx3lLkvJVWXWjwZDyqqckvjJ3N2j7ZhvqQzUlUY8rFyi3tf Fgtw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=y/gZ8+YmCdyaB0LsPIOJsTXh1S5MOPke76VouPArXYA=; b=j1O4/1MdJ8IH+Qvgc78N50evHxGLpWxHMtF/m3UKcPQdXP8z3j+Rk/X9yrxmSr4Wgr pQfdTYhVC0qXIyrAE1zXBvNKQzEhxirB7ioyDul6adf9/LzA/ljhwY5kdnK5HbSzjpU2 7J3RkDAABU45a/qMul0P3tWuK+FP7hyvUkKkl32s1VVL2ovQwkSsyuc+9pKkYpfbB/01 Yt4xrDk+TgJqTYd3neCOxVxQMWyC3GUy0eQ3r4FbpuVl4QpkzXZhSGl7P5eIG2gfFx74 RkoYqC+GifJSFfTXVQFJWHJWHogF7hPZnOLj4Oiu3eN3gijvxtU74olOE/6iBedo0aKo w4WA== X-Gm-Message-State: APjAAAWk6ek7LvBVq2EJbtJbcbM6FZqcv87yfDs/HIWt8tNjs394Z7lP hWkiRmYCFa/pl61LKT9IzTBBuvZxe/VXmcHG+o+FWQ== X-Received: by 2002:a05:6808:30d:: with SMTP id i13mr4249051oie.144.1578702449833; Fri, 10 Jan 2020 16:27:29 -0800 (PST) MIME-Version: 1.0 References: <20200109202659.752357-1-guro@fb.com> <20200109202659.752357-5-guro@fb.com> In-Reply-To: <20200109202659.752357-5-guro@fb.com> From: Shakeel Butt Date: Fri, 10 Jan 2020 16:27:18 -0800 Message-ID: Subject: Re: [PATCH v2 4/6] mm: kmem: switch to nr_pages in (__)memcg_kmem_charge_memcg() To: Roman Gushchin Cc: Linux MM , Andrew Morton , Michal Hocko , Johannes Weiner , Vladimir Davydov , LKML , Kernel Team Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 9, 2020 at 12:27 PM 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 Reviewed-by: Shakeel Butt