From patchwork Mon Jul 13 11:04:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Down X-Patchwork-Id: 11659459 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 5E7E213B6 for ; Mon, 13 Jul 2020 11:05:01 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 2A48920773 for ; Mon, 13 Jul 2020 11:05:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=chrisdown.name header.i=@chrisdown.name header.b="RqGITRMK" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2A48920773 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chrisdown.name Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id EF2418D0002; Mon, 13 Jul 2020 07:04:59 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id EA15C8D0001; Mon, 13 Jul 2020 07:04:59 -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 D90668D0002; Mon, 13 Jul 2020 07:04:59 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0034.hostedemail.com [216.40.44.34]) by kanga.kvack.org (Postfix) with ESMTP id BF53F8D0001 for ; Mon, 13 Jul 2020 07:04:59 -0400 (EDT) Received: from smtpin24.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 5E4681F0A for ; Mon, 13 Jul 2020 11:04:59 +0000 (UTC) X-FDA: 77032770318.24.sink65_211225826ee7 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin24.hostedemail.com (Postfix) with ESMTP id 2C1A61A4A0 for ; Mon, 13 Jul 2020 11:04:59 +0000 (UTC) X-Spam-Summary: 1,0,0,4dff2ab9cdc2afd3,d41d8cd98f00b204,chris@chrisdown.name,,RULES_HIT:41:355:379:988:989:1260:1277:1312:1313:1314:1345:1437:1516:1518:1519:1534:1539:1593:1594:1595:1596:1711:1730:1747:1777:1792:2393:2559:2562:2897:3138:3139:3140:3141:3142:3352:3865:3867:3868:3870:3871:4250:4605:5007:6261:6653:7903:10004:10400:11232:11658:11914:12043:12291:12297:12517:12519:12683:12895:13069:13149:13230:13311:13357:13439:13895:14096:14097:14394:21080:21444:21451:21627:30045:30054:30070,0,RBL:209.85.208.68:@chrisdown.name:.lbl8.mailshell.net-66.201.201.201 62.14.0.100;04yrenxkxedmpkzgdc7kphk5gdariopfe3fc8k9dptnxis1b3ksabtb57cmzrpa.ggpcw5ytffxcubgc71qpso9oous7xqt75t4m7ooef56knagwum916dxy7ef9dsw.g-lbl8.mailshell.net-223.238.255.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:25,LUA_SUMMARY:none X-HE-Tag: sink65_211225826ee7 X-Filterd-Recvd-Size: 3482 Received: from mail-ed1-f68.google.com (mail-ed1-f68.google.com [209.85.208.68]) by imf24.hostedemail.com (Postfix) with ESMTP for ; Mon, 13 Jul 2020 11:04:58 +0000 (UTC) Received: by mail-ed1-f68.google.com with SMTP id a8so13160972edy.1 for ; Mon, 13 Jul 2020 04:04:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chrisdown.name; s=google; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :user-agent; bh=nN3m2m7pEWJxxgE22EVhuHKcD4TrCFPuvsPIp3KGX9k=; b=RqGITRMKNmMiYRdu6+vlFczkTYWFJp1c6+1yOC3ohAOzxc8vpAusqQEaQ0E2axiD3D QON4GHysm7Te5zUXV4Lz0GiISjc4xgU5T3b391ZpRcwJGbZ1amHXgAgqFQDjhLNJfgyG eX0sdzLY1TPzVvZ6Y5DHPyyoWITelQBhUSBaE= 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:user-agent; bh=nN3m2m7pEWJxxgE22EVhuHKcD4TrCFPuvsPIp3KGX9k=; b=NrlhyhShbtvIeF0oOPQo6G2+zaL/9V0jpsfHz3lfiTsbn9cMcSpTfkh3TBYfXrP3Y/ TupvFoFc1pV6ey4mtwtcJZ1hi4/6OmYHHLZ0eBomWzivr6VWOLGT0jIN+jN4SWo75H83 tmd/JpMEKUs1UtqBwnLXKgrlXXohUBOIi3gn6fM+uD2Xtv7Id7K78aKEy5o3ClaXH4yX JKtXk9jIItjBSUQ3YM0ZRu21b74Uj3FZOj45FvHLQ0tiAXybC7jZ75H/NmmkncYIa3eI AJJMM3pFYuYNDEWeOPlbBMWB9YV+nPwFppXSAckSh5YjVEBPLjK0HhkXts8uLbIVPYCu FxhA== X-Gm-Message-State: AOAM533aCaE9m3PT+NhfsHsQpF6wO5cR72a7FijmE9X4Hc05yod/lKwn SuYlTaIQYGV87UU/hqJ0Zz1gQw== X-Google-Smtp-Source: ABdhPJxJ/mazTAbJfCnV5ZLs6gKzw7Mb01cM+wDRYPldnGl3iBlU+mkR/ggy29bNiaIxfIFLSI4DFw== X-Received: by 2002:a50:b5e3:: with SMTP id a90mr50641671ede.381.1594638297371; Mon, 13 Jul 2020 04:04:57 -0700 (PDT) Received: from localhost ([2620:10d:c093:400::5:ef88]) by smtp.gmail.com with ESMTPSA id j21sm11395375edq.20.2020.07.13.04.04.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jul 2020 04:04:56 -0700 (PDT) Date: Mon, 13 Jul 2020 12:04:56 +0100 From: Chris Down To: Andrew Morton Cc: Johannes Weiner , Michal Hocko , Roman Gushchin , Yafang Shao , linux-mm@kvack.org, cgroups@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v4 0/2] mm, memcg: memory.{low,min} reclaim fix & cleanup Message-ID: MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.14.5 (2020-06-23) X-Rspamd-Queue-Id: 2C1A61A4A0 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam03 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. Changes in v4: - Fix premature OOM when checking protection on root memcg. Thanks Naresh and Michal for helping debug. 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 | 95 ++++++++++++++++++++++++++++++++------ mm/memcontrol.c | 36 ++++++--------- mm/vmscan.c | 20 +++----- 3 files changed, 103 insertions(+), 48 deletions(-)