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.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=ham 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 22ECEC5519F for ; Wed, 18 Nov 2020 06:55:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AF4A32468F for ; Wed, 18 Nov 2020 06:55:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="oiKSsv9R" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726506AbgKRGz0 (ORCPT ); Wed, 18 Nov 2020 01:55:26 -0500 Received: from mail.kernel.org ([198.145.29.99]:49832 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725794AbgKRGz0 (ORCPT ); Wed, 18 Nov 2020 01:55:26 -0500 Received: from kernel.org (unknown [77.125.7.142]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6554424655; Wed, 18 Nov 2020 06:55:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1605682525; bh=ijXF7PUCZPM+SCn0c+6woTjKwc8l6BuK+EQkKzOZoH8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=oiKSsv9RDCQm1S/HmggqtrPvdJmgXqMRBK6MAHqh9Yd/MlSYNip+OwN+JVDWvyw4j PaowVWNf6v5Qw5aC1zUcALKjA0MeiiAKYuhFd5N18H92PtIsqdOsAxh4AC1cLHAVVu 7NvCS9CGGb6cKrHrwQ+X3wdidxAmVeF4uLboBzI8= Date: Wed, 18 Nov 2020 08:55:09 +0200 From: Mike Rapoport To: Shakeel Butt Cc: Roman Gushchin , Andrew Morton , Alexander Viro , Andy Lutomirski , Arnd Bergmann , Borislav Petkov , Catalin Marinas , Christopher Lameter , Dan Williams , Dave Hansen , David Hildenbrand , Elena Reshetova , "H. Peter Anvin" , Ingo Molnar , James Bottomley , "Kirill A. Shutemov" , Matthew Wilcox , Mark Rutland , Mike Rapoport , Michael Kerrisk , Palmer Dabbelt , Paul Walmsley , Peter Zijlstra , Rick Edgecombe , Shuah Khan , Thomas Gleixner , Tycho Andersen , Will Deacon , linux-api@vger.kernel.org, linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-fsdevel , Linux MM , LKML , linux-kselftest@vger.kernel.org, linux-nvdimm@lists.01.org, linux-riscv@lists.infradead.org, x86@kernel.org Subject: Re: [PATCH v9 6/9] secretmem: add memcg accounting Message-ID: <20201118065509.GK370813@kernel.org> References: <20201117162932.13649-1-rppt@kernel.org> <20201117162932.13649-7-rppt@kernel.org> <20201117193358.GB109785@carbon.dhcp.thefacebook.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-api@vger.kernel.org On Tue, Nov 17, 2020 at 12:02:01PM -0800, Shakeel Butt wrote: > On Tue, Nov 17, 2020 at 11:49 AM Roman Gushchin wrote: > > > > On Tue, Nov 17, 2020 at 06:29:29PM +0200, Mike Rapoport wrote: > > > From: Mike Rapoport > > > > > > Account memory consumed by secretmem to memcg. The accounting is updated > > > when the memory is actually allocated and freed. > > > > > > Signed-off-by: Mike Rapoport > [snip] > > > > > > +static int secretmem_account_pages(struct page *page, gfp_t gfp, int order) > > > +{ > > > + int err; > > > + > > > + err = memcg_kmem_charge_page(page, gfp, order); > > I haven't looked at the whole series but it seems like these pages > will be mapped into the userspace, so this patch has dependency on > Roman's "mm: allow mapping > accounted kernel pages to userspace" patch series. Yes, that's why I rebased the patches on top of mmotm. -- Sincerely yours, Mike.