From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.4 required=3.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7B143C33CA4 for ; Sat, 11 Jan 2020 00:27:32 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 33FCF2082E for ; Sat, 11 Jan 2020 00:27:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="eNIbu+Un" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 33FCF2082E Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id D9D3E8E0005; Fri, 10 Jan 2020 19:27:31 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id D4DC58E0001; Fri, 10 Jan 2020 19:27:31 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C62C18E0005; Fri, 10 Jan 2020 19:27:31 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0217.hostedemail.com [216.40.44.217]) by kanga.kvack.org (Postfix) with ESMTP id B18618E0001 for ; Fri, 10 Jan 2020 19:27:31 -0500 (EST) Received: from smtpin01.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 2B5088248041 for ; Sat, 11 Jan 2020 00:27:31 +0000 (UTC) X-FDA: 76363464702.01.nail21_4198c377a1431 X-HE-Tag: nail21_4198c377a1431 X-Filterd-Recvd-Size: 3361 Received: from mail-oi1-f195.google.com (mail-oi1-f195.google.com [209.85.167.195]) by imf34.hostedemail.com (Postfix) with ESMTP for ; Sat, 11 Jan 2020 00:27:30 +0000 (UTC) Received: by mail-oi1-f195.google.com with SMTP id k4so3519660oik.2 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=BCfbWL4t0EupYAAJwSGGex+Qn7VY6TP6Kg9qGaAQhWBP2A91BXxPLtx5Kxm8ccTmmB g5uUu9Lu7rYB+/jQz5+BW5mFZKHQJNBw88PtgmNOF6po+VCOuiLZ9I46bHuArWE3wvq8 KBMY4ROvWDplXxjVPE31m1nqT9yj+dFqSNqhBlDr5gcPOcHXaTucw4GhXsqEZBsoy2Md KoTJt+uSOuDXjmiuRJlGzgkoLDsLy/BdIRqAaqTtz69obuHfoeyugz7pt4cVvLppBPKZ AUURzPN6jFujHfX22PohhKjbUjkTpQIrdgpjC/sfABS4e9vFqVtthCSt2fMtWc6DcKiw FFfg== X-Gm-Message-State: APjAAAWLsOGjMpCeo1cLyF76zApJSH2CdGj+3BpQfB15aPVXResATBFv C+osQI+wNXz2zWgyCdkOLvXPqbESe3xrV+rEk9uk7A== X-Google-Smtp-Source: APXvYqy/sWM+PzWK65Xe3fa0nvjGpP9Am72o94boWr2hCvr9F/yRRVdZ9q2K21iU+B5tIUrcFRhzpKsCc5K9wGyojPY= 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" X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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