From patchwork Tue May 5 08:41:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yafang Shao X-Patchwork-Id: 11528423 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 958F5912 for ; Tue, 5 May 2020 08:42:14 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 625502068E for ; Tue, 5 May 2020 08:42:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="W8I+ypz+" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 625502068E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 70BD28E00A0; Tue, 5 May 2020 04:42:13 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 6953A8E0058; Tue, 5 May 2020 04:42:13 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 535D88E00A0; Tue, 5 May 2020 04:42:13 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0226.hostedemail.com [216.40.44.226]) by kanga.kvack.org (Postfix) with ESMTP id 34FE58E0058 for ; Tue, 5 May 2020 04:42:13 -0400 (EDT) Received: from smtpin16.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id D87F7824934B for ; Tue, 5 May 2020 08:42:12 +0000 (UTC) X-FDA: 76782023304.16.hat02_134c1eb20bb41 X-Spam-Summary: 2,0,0,4878e947c17db813,d41d8cd98f00b204,laoar.shao@gmail.com,,RULES_HIT:41:355:379:541:800:973:988:989:1260:1345:1437:1534:1539:1711:1714:1730:1747:1777:1792:2393:2559:2562:2897:3138:3139:3140:3141:3142:3351:3865:3867:3868:3870:3871:4605:5007:6261:6653:7903:9163:9413:10004:11658:11914:12043:12291:12297:12517:12519:12683:12895:13069:13149:13230:13311:13357:14181:14384:14394:14687:14721:21080:21444:21451:21627:21666:30045:30054,0,RBL:209.85.216.67:@gmail.com:.lbl8.mailshell.net-66.100.201.100 62.50.0.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fp,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:23,LUA_SUMMARY:none X-HE-Tag: hat02_134c1eb20bb41 X-Filterd-Recvd-Size: 3418 Received: from mail-pj1-f67.google.com (mail-pj1-f67.google.com [209.85.216.67]) by imf17.hostedemail.com (Postfix) with ESMTP for ; Tue, 5 May 2020 08:42:12 +0000 (UTC) Received: by mail-pj1-f67.google.com with SMTP id e6so713519pjt.4 for ; Tue, 05 May 2020 01:42:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=3Y0v2e1Lb5wtzzcdYvvYnMyMMtu+m1Dmqf+0QoZUhSA=; b=W8I+ypz+cgycacfqwemetGRj30vIPDplypv2/Xw57pculAjHckI9bGny/k3mNTwZSw mWH6WTxtwICdRj5L6uZO4Ldj3URk8KnAGufc8LmnraYmECPwDY+K5xkPJ2MOFth3h7Pu NoJpF3Mg1ycdxynBawfjuBzhVfLqsMoeYA697UtPbu928uNV+lREnMfVTogtTXyZCGqz 3rDrKnQbd8Ugaf+vPfa3bOHr4iVK19wF39eyEes0GzcOqz/H2DLBfjVkvPb7a/ASr0/i 4Axs85+ravwposSptCnI0lJITCWWR+uCwK2ridpnaWSCpSsaxraQ0c/VXCWJmIj1UuOC Qqjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=3Y0v2e1Lb5wtzzcdYvvYnMyMMtu+m1Dmqf+0QoZUhSA=; b=C529MGcbYVRKJYA6lpeHnONmGWX9G1HYIjN+3o7K+OKby186MCTF0YT+tv61uezfD/ eNf7FVZHOvC+iMyPg1lSVeNCLTnsBrLwR5fK9cbiOW1dFt/cW3STMrRSfykrzJwkSAIA eOJk7SCTIkOeHfxDwjQTJw6BI3XQfZxWKHxLQjsC0lc7TvlBa9+SYbzBc8TewJ0fb6G9 QGR8oxdY9s6O5GSG1d5GGe0krrEY1xwQGpsSbfmK72/uKkv4hD/6hVb+Cjib7wuWHP39 yvYKFtDBziS/CPgpgi1jiKMDTTyWtSSSbSjRfs4W2hGwZkZiZeM5OV+ta73zsBoH6Tzh UEeA== X-Gm-Message-State: AGi0PuYfwkiSRcafQy6IeYzGXx2/x7khGDM7UtL//8ujMkN3cGKTDGJA RwStmK2/ZnLGAYsRvuxOSZ0= X-Google-Smtp-Source: APiQypJe86ksUq/JAGwIY1F0YkpbSYUnxzodqwNL6d+yuiHFDb2CMphwQrg9xwf5ognUlD3wIGaeUQ== X-Received: by 2002:a17:902:b114:: with SMTP id q20mr1885097plr.120.1588668131523; Tue, 05 May 2020 01:42:11 -0700 (PDT) Received: from localhost.localdomain ([203.100.54.194]) by smtp.gmail.com with ESMTPSA id p190sm1443802pfp.207.2020.05.05.01.42.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 May 2020 01:42:10 -0700 (PDT) From: Yafang Shao To: akpm@linux-foundation.org Cc: mhocko@kernel.org, hannes@cmpxchg.org, chris@chrisdown.name, guro@fb.com, linux-mm@kvack.org, cgroups@vger.kernel.org, linux-kernel@vger.kernel.org, Yafang Shao Subject: [PATCH v3 0/2] mm: memcontrol: memory.{low,min} reclaim fix & cleanup Date: Tue, 5 May 2020 04:41:25 -0400 Message-Id: <20200505084127.12923-1-laoar.shao@gmail.com> X-Mailer: git-send-email 2.18.1 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: This series contains a fix for a edge case in my earlier protection calculation patches, and a patch to make the area overall a little more robust to hopefully help avoid this in future. [chris@chrisdown.name: commit log above] Changes since v2: commit log improved by Michal. Chris Down (1): mm, memcg: Decouple e{low,min} state mutations from protection checks Yafang Shao (1): mm, memcg: Avoid stale protection values when cgroup is above protection include/linux/memcontrol.h | 85 ++++++++++++++++++++++++++++++++------ mm/memcontrol.c | 36 +++++++--------- mm/vmscan.c | 20 +++------ 3 files changed, 93 insertions(+), 48 deletions(-)