From patchwork Sat Apr 10 18:22:35 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dennis Zhou X-Patchwork-Id: 12195805 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 3DFA2C433ED for ; Sat, 10 Apr 2021 18:22:40 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id BF88A61108 for ; Sat, 10 Apr 2021 18:22:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BF88A61108 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 11E928E0002; Sat, 10 Apr 2021 14:22:39 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 0A49C8E0001; Sat, 10 Apr 2021 14:22:39 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id EB0878E0002; Sat, 10 Apr 2021 14:22:38 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0045.hostedemail.com [216.40.44.45]) by kanga.kvack.org (Postfix) with ESMTP id C5CCD8E0001 for ; Sat, 10 Apr 2021 14:22:38 -0400 (EDT) Received: from smtpin18.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 723F49416 for ; Sat, 10 Apr 2021 18:22:38 +0000 (UTC) X-FDA: 78017277996.18.AF4665C Received: from mail-io1-f45.google.com (mail-io1-f45.google.com [209.85.166.45]) by imf17.hostedemail.com (Postfix) with ESMTP id 30F5040002C8 for ; Sat, 10 Apr 2021 18:22:36 +0000 (UTC) Received: by mail-io1-f45.google.com with SMTP id f15so505680iob.5 for ; Sat, 10 Apr 2021 11:22:37 -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=Byz/Sc22eLv5OrE3COYJ5OikDlNUAwwd8T2iK8Gi2u4=; b=KaH0acnkmZJt1XFTWoRTA3ysuHPLDuBI0zZOTe5Mq01y/NGXHv7PMONyX/dYNBDA9m M3ZY7uc6X4ZjLmmlSOj3e67+FbBIavpK9zW6jVHktEvBT+gWrt15CNGvIb3XxCtH2Tek Rc1C6KUooj+PZHrQZzZDE3H2PIX0/KIOuwf2vxoSNpR3fUDfxUDvrKL1FABKMZoaYa1c 9H2Dm83VL+o6ecgSfX3LlZEEWJFtDljm69uwMkL5k5ERUFyGZUb0fd3vJ6yY7u3XgvrY YTZVZq2wU9uA7mR3y/Y+7UgqHZ/ZL9L7gu8+GHvITBb6yMpMaWfDB3MLCLeK3rPCPDZT s+RA== X-Gm-Message-State: AOAM532VNzV6YQKIdD7JRR/3UrXTlhIjSFm3cZ3Ei6LJLoYA4sO1IS14 Oc5/2yuhZgg1chs/AzXm6NA= X-Google-Smtp-Source: ABdhPJwQiUBpl3ntjXx+9mtQ5U7RER/yw5mFR+uR/u1yf0x4DTbMlUUN4KM5c7+dO6XkEMLihJpnpA== X-Received: by 2002:a05:6602:179e:: with SMTP id y30mr2649047iox.130.1618078957570; Sat, 10 Apr 2021 11:22:37 -0700 (PDT) Received: from google.com (243.199.238.35.bc.googleusercontent.com. [35.238.199.243]) by smtp.gmail.com with ESMTPSA id o6sm2977907ioa.21.2021.04.10.11.22.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 10 Apr 2021 11:22:37 -0700 (PDT) Date: Sat, 10 Apr 2021 18:22:35 +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.12-rc7 Message-ID: MIME-Version: 1.0 Content-Disposition: inline X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 30F5040002C8 X-Stat-Signature: uwheadj5n3dr47g83d9pffsr78wz4ta4 Received-SPF: none (gmail.com>: No applicable sender policy available) receiver=imf17; identity=mailfrom; envelope-from=""; helo=mail-io1-f45.google.com; client-ip=209.85.166.45 X-HE-DKIM-Result: none/none X-HE-Tag: 1618078956-169089 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 a fix for sporadically failing atomic percpu allocations. I only caught it recently while I was reviewing a new series [1] and simultaneously saw reports by btrfs in xfstests [2] and [3]. In v5.9, memcg accounting was extended to percpu done by adding a second type of chunk. I missed an interaction with the free page float count used to ensure we can support atomic allocations. If 1 type of chunk has no free pages, but the other has enough to satisfy the free page float requirement, we will not repopulate the free pages for the former type of chunk. This led to sporadically failing atomic allocations. [1] https://lore.kernel.org/linux-mm/20210324190626.564297-1-guro@fb.com/ [2] https://lore.kernel.org/linux-mm/20210401185158.3275.409509F4@e16-tech.com/ [3] https://lore.kernel.org/linux-mm/CAL3q7H5RNBjCi708GH7jnczAOe0BLnacT9C+OBgA-Dx9jhB6SQ@mail.gmail.com/ Thanks, Dennis The following changes since commit e49d033bddf5b565044e2abe4241353959bc9120: Linux 5.12-rc6 (2021-04-04 14:15:36 -0700) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/dennis/percpu.git for-5.12-fixes for you to fetch changes up to 0760fa3d8f7fceeea508b98899f1c826e10ffe78: percpu: make pcpu_nr_empty_pop_pages per chunk type (2021-04-09 13:58:38 +0000) ---------------------------------------------------------------- Roman Gushchin (1): percpu: make pcpu_nr_empty_pop_pages per chunk type mm/percpu-internal.h | 2 +- mm/percpu-stats.c | 9 +++++++-- mm/percpu.c | 14 +++++++------- 3 files changed, 15 insertions(+), 10 deletions(-)