From patchwork Thu Jul 1 18:18:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dennis Zhou X-Patchwork-Id: 12354673 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=-19.0 required=3.0 tests=BAYES_00,INCLUDES_PATCH, INCLUDES_PULL_REQUEST,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,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 73704C11F64 for ; Thu, 1 Jul 2021 18:18:18 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 0CCDB61357 for ; Thu, 1 Jul 2021 18:18:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0CCDB61357 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 354F88D02B0; Thu, 1 Jul 2021 14:18:17 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 305B78D0001; Thu, 1 Jul 2021 14:18:17 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1A6258D02B0; Thu, 1 Jul 2021 14:18:17 -0400 (EDT) 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 EA5A78D0001 for ; Thu, 1 Jul 2021 14:18:16 -0400 (EDT) Received: from smtpin01.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id A6685181286EA for ; Thu, 1 Jul 2021 18:18:16 +0000 (UTC) X-FDA: 78314828592.01.DC4541E Received: from mail-il1-f182.google.com (mail-il1-f182.google.com [209.85.166.182]) by imf14.hostedemail.com (Postfix) with ESMTP id 5EA226001AA6 for ; Thu, 1 Jul 2021 18:18:16 +0000 (UTC) Received: by mail-il1-f182.google.com with SMTP id 3so7306160ilj.3 for ; Thu, 01 Jul 2021 11:18:16 -0700 (PDT) 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:mime-version :content-disposition; bh=RfAst8jf06jV75PDGjbAHUMMTq2o1HWk2Y22ohLeAWI=; b=Yn/1LMkemMZKpfZ7dhAQd1uca+OlVTUIZ+xoIK++Bo4eF8LgJGmbuw/b3EOjcfSvBA s029ig1zhFcJnzERkpjEWlZFUtPC516QTwJ4eIdQ7USfg+Wb2I7/qV85P+sCww4BNm6G YL40ch2GWXlbxaF5j65AwqWOkgy1n4CcHsaciuLIhc9BjgToDwJC3OHswsaYR6sZhdlX gD56/aQTYRCttYnmnL8kDgQRyLV2ex/HAhR6j9Vz3kIIjk5pBw0hs8My+5D9baleVg7s qyXclKOA9El2TwvssjgbfbFHHM8RS5v0wBD7w9zQPABGLtX6TfuxKoQNhzmyqUzQrHnY KiJQ== X-Gm-Message-State: AOAM530qMicAJTKGfsCB1+z8dHCG+vNHanEpHUvZuDYrY0fBdyRyyvq6 3dQwgOdeVA3tDHvzckwxL1Ka6QSYfpA6JQ== X-Google-Smtp-Source: ABdhPJyrQ4ADD4Uyu5RuVs6MaNMzOr1/6//DJiv68k2idk2ac/MXf70t+uVK1i/p8WheVBvPqIYo1Q== X-Received: by 2002:a92:7b0f:: with SMTP id w15mr534304ilc.150.1625163495763; Thu, 01 Jul 2021 11:18:15 -0700 (PDT) Received: from google.com (243.199.238.35.bc.googleusercontent.com. [35.238.199.243]) by smtp.gmail.com with ESMTPSA id 67sm318917iob.15.2021.07.01.11.18.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Jul 2021 11:18:15 -0700 (PDT) Date: Thu, 1 Jul 2021 18:18:14 +0000 From: Dennis Zhou To: Linus Torvalds Cc: Tejun Heo , Christoph Lameter , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [GIT PULL] percpu changes for v5.14-rc1 Message-ID: MIME-Version: 1.0 Content-Disposition: inline Authentication-Results: imf14.hostedemail.com; dkim=none; spf=pass (imf14.hostedemail.com: domain of dennisszhou@gmail.com designates 209.85.166.182 as permitted sender) smtp.mailfrom=dennisszhou@gmail.com; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=kernel.org (policy=none) X-Stat-Signature: 4pjkaekcmmm6oy369g4xc3b8s73yu5nj X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 5EA226001AA6 X-HE-Tag: 1625163496-156190 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: Hi Linus, This pull request contains: - percpu chunk depopulation - depopulate backing pages for chunks with empty pages when we exceed a global threshold without those pages. This lets us reclaim a portion of memory that would previously be lost until the full chunk would be freed (possibly never). - memcg accounting cleanup - previously separate chunks were managed for normal allocations and __GFP_ACCOUNT allocations. These are now consolidated which cleans up the code quite a bit. - a few misc clean ups for clang warnings Two notes though. First there is a small conflict in mm/memcontrol.c and I have an example merge in percpu#for-5.14-merge [1]. Second, I have an outstanding patch to do some level of batching for percpu depopulation. Oliver Wang (krobot tests) is reporting a regression only on Knights Landing cpus [2]. I am working on debugging it and hopefully will have it figured out soon. [1] https://git.kernel.org/pub/scm/linux/kernel/git/dennis/percpu.git/log/?h=for-5.14-merge [2] https://lore.kernel.org/lkml/20210630074500.GB10248@xsang-OptiPlex-9020/ Thanks, Dennis The following changes since commit d434405aaab7d0ebc516b68a8fc4100922d7f5ef: Linux 5.12-rc7 (2021-04-11 15:16:13 -0700) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/dennis/percpu.git for-5.14 for you to fetch changes up to e4d777003a43feab2e000749163e531f6c48c385: percpu: optimize locking in pcpu_balance_workfn() (2021-06-17 23:05:24 +0000) ---------------------------------------------------------------- Dennis Zhou (2): percpu: use pcpu_free_slot instead of pcpu_nr_slots - 1 percpu: initialize best_upa variable Roman Gushchin (8): percpu: fix a comment about the chunks ordering percpu: split __pcpu_balance_workfn() percpu: factor out pcpu_check_block_hint() percpu: implement partial chunk depopulation mm, memcg: mark cgroup_memory_nosocket, nokmem and noswap as __ro_after_init mm, memcg: introduce mem_cgroup_kmem_disabled() percpu: rework memcg accounting percpu: optimize locking in pcpu_balance_workfn() Wei Yongjun (1): percpu: make symbol 'pcpu_free_slot' static include/linux/memcontrol.h | 5 + mm/memcontrol.c | 11 +- mm/percpu-internal.h | 56 +------ mm/percpu-km.c | 10 +- mm/percpu-stats.c | 44 ++---- mm/percpu-vm.c | 35 ++++- mm/percpu.c | 368 +++++++++++++++++++++++++++++++++------------ 7 files changed, 343 insertions(+), 186 deletions(-)