From patchwork Mon Nov 30 21:25:39 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shakeel Butt X-Patchwork-Id: 11941369 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.6 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_INVALID,DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT 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 4898FC83013 for ; Mon, 30 Nov 2020 21:25:58 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 7FD3721D7F for ; Mon, 30 Nov 2020 21:25:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="hdS37evH" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7FD3721D7F 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 A2E2F6B0036; Mon, 30 Nov 2020 16:25:56 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 9B8D08D0002; Mon, 30 Nov 2020 16:25:56 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 880198D0001; Mon, 30 Nov 2020 16:25:56 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0242.hostedemail.com [216.40.44.242]) by kanga.kvack.org (Postfix) with ESMTP id 6CD676B0036 for ; Mon, 30 Nov 2020 16:25:56 -0500 (EST) Received: from smtpin14.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 25E5E1EE6 for ; Mon, 30 Nov 2020 21:25:56 +0000 (UTC) X-FDA: 77542367112.14.cord73_330c7a3273a5 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin14.hostedemail.com (Postfix) with ESMTP id E8F8E1822987A for ; Mon, 30 Nov 2020 21:25:55 +0000 (UTC) X-HE-Tag: cord73_330c7a3273a5 X-Filterd-Recvd-Size: 3807 Received: from mail-vs1-f73.google.com (mail-vs1-f73.google.com [209.85.217.73]) by imf18.hostedemail.com (Postfix) with ESMTP for ; Mon, 30 Nov 2020 21:25:55 +0000 (UTC) Received: by mail-vs1-f73.google.com with SMTP id b15so3179332vso.9 for ; Mon, 30 Nov 2020 13:25:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=sender:date:message-id:mime-version:subject:from:to:cc; bh=1AhVkXOhR2TzNH+ZXV3TQQWYQmTiMRd6bP6O/1CZpuM=; b=hdS37evH95STMC1FCXnH1rBusR8KNThCfQdU2yBgD6GdnQjNNiCBi71dut6kQSKJ76 IqLNiSE192eFpj/ZYUc07be3aeNRSHl79g+TcTAUjv5p9B6HGlQiE/g3Zss55/nnwq7y sIfyDFLze4P7utdf4xAvLq2y+WHmeGa8diXx2764WsYXzn6KGIHByMq7CSl6humc2Rpb q/X72Se9LnYtSjo6/h6KrnxKPqz2UmxQbxFzewJUQvUKU83jQq42tL2W1dm0M8wiT/hV zCvdjj3p9ELE8zlHKWVIqy9BT3t4FnbItx4+BvVPAFqeDluVaS7QgFHXqAzD2utvhwd7 CnhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:message-id:mime-version:subject:from :to:cc; bh=1AhVkXOhR2TzNH+ZXV3TQQWYQmTiMRd6bP6O/1CZpuM=; b=DrYyiAQjqAsrViq4PLovxH9tO+JgGjw1WlirCTXfBci+mrtF3TvxVdBLHzrE+8tRRZ hXIky2Gp0rQhG44t0lD4CRQBE2SZn2CVgZ4eUVV577mP6kaaK9k5l5HXfae1/qEJX1Ab NzFW+xetrWMOqID/2aZ+GzFZFc3cWSWThaQ0562QGXWX/D1HuETo/L2S9udI5D2n21cL nF0ONTXppHaHIYE4dzdr1SR/T/UWYPQLDstkkZAhHBll3/UQCuaPR5+icR2YuM/kvAYP pXJBCShaqZNgDblB7iPxsNcM0kGC6BFtPkH7a1UVYAfSuwZJiuwcpi251xTD8GeUy/W2 9HQQ== X-Gm-Message-State: AOAM5336Wrf1yEcwklVG9FLKDfTbdTMVmkh0zKqE2dVjyXA499BP38qc fIA9IAGUr614FYyKcDtZ6K25+1sSB/t+ew== X-Google-Smtp-Source: ABdhPJyqzEUpeoSQftF1IG3b5nCuc1YiEIetXPA/6CAkF3P/VKxbwRspiFP04boyFI4A8ChM97hwhIHywIdnOQ== X-Received: from shakeelb.svl.corp.google.com ([100.116.77.44]) (user=shakeelb job=sendgmr) by 2002:a67:fad2:: with SMTP id g18mr18303835vsq.45.1606771554436; Mon, 30 Nov 2020 13:25:54 -0800 (PST) Date: Mon, 30 Nov 2020 13:25:39 -0800 Message-Id: <20201130212541.2781790-1-shakeelb@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.29.2.454.gaff20da3a2-goog Subject: [PATCH v2 0/2] memcg: add pagetable comsumption to memory.stat From: Shakeel Butt To: Roman Gushchin , Johannes Weiner , Michal Hocko Cc: Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Shakeel Butt 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: Many workloads consumes significant amount of memory in pagetables. One specific use-case is the user space network driver which mmaps the application memory to provide zero copy transfer. This driver can consume a large amount memory in page tables. This patch series exposes the pagetable comsumption for each memory cgroup. Shakeel Butt (2): mm: move lruvec stats update functions to vmstat.h mm: memcontrol: account pagetables per node Documentation/admin-guide/cgroup-v2.rst | 3 + arch/nds32/mm/mm-nds32.c | 6 +- drivers/base/node.c | 2 +- fs/proc/meminfo.c | 2 +- include/linux/memcontrol.h | 112 ------------------------ include/linux/mm.h | 11 ++- include/linux/mmzone.h | 2 +- include/linux/vmstat.h | 104 ++++++++++++++++++++++ mm/memcontrol.c | 19 ++++ mm/page_alloc.c | 6 +- 10 files changed, 142 insertions(+), 125 deletions(-)