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=-3.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS 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 33F1CC33CB6 for ; Thu, 16 Jan 2020 17:24:56 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id D85BD2468C for ; Thu, 16 Jan 2020 17:24:55 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=cmpxchg-org.20150623.gappssmtp.com header.i=@cmpxchg-org.20150623.gappssmtp.com header.b="T/c/Nc6b" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D85BD2468C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=cmpxchg.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 6ED2A8E0087; Thu, 16 Jan 2020 12:24:55 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 69E058E003F; Thu, 16 Jan 2020 12:24:55 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5B4028E0087; Thu, 16 Jan 2020 12:24:55 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0230.hostedemail.com [216.40.44.230]) by kanga.kvack.org (Postfix) with ESMTP id 4478A8E003F for ; Thu, 16 Jan 2020 12:24:55 -0500 (EST) Received: from smtpin22.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with SMTP id 09209180AD817 for ; Thu, 16 Jan 2020 17:24:55 +0000 (UTC) X-FDA: 76384172550.22.key09_47f2567d5db04 X-HE-Tag: key09_47f2567d5db04 X-Filterd-Recvd-Size: 3654 Received: from mail-qt1-f196.google.com (mail-qt1-f196.google.com [209.85.160.196]) by imf43.hostedemail.com (Postfix) with ESMTP for ; Thu, 16 Jan 2020 17:24:54 +0000 (UTC) Received: by mail-qt1-f196.google.com with SMTP id e25so8159221qtr.13 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=N756anWYWRyQuKQgbpsDolJsoadi46ncNPMhxl8sT4zcS/XXWs6K/1tzGkHVH6qyJT /172I9NA1IldLpT63UgYLNo2XcGUDReRYmiRmLSUqjkEwwzdVZo4RfrVhaLa8ZKtpPkp ECHCW5tYpIi85Z/dWcsriclhuCXX6zdqYY3SgAaVpZSh3jIY/u43yB5YSYegy4Or3Xrb YfqRSmpNrBr9RwT+HTs+jaqMgiq23NKvpZqlS3pN5h4kbKGkXLaC7h4lADRHlGjtixLe I6VdcwGL193lu5m8t7Wg97OttFyKH6YCWjNttvKypbP1BYFycQLjB6cWkU0pETYsEx/G topw== X-Gm-Message-State: APjAAAVPTxiGjp9A57HYHJtHNGXWV0+F3Z/h7ad5yovG/krMH8ZoZCf9 XHSSVOCRnlm4e9S9fk2yT4rL4g== X-Google-Smtp-Source: APXvYqxxqV46E3xnhe2R/O4tw7/YVw+xjh9fYHOBoymWRu1GkQeW5Hkm+Nfw9QCWg2PhbIGK3pBGbg== 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> 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 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