From patchwork Tue May 22 13:25:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roman Gushchin X-Patchwork-Id: 10418663 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 6137E60224 for ; Tue, 22 May 2018 13:28:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4FAB028CAA for ; Tue, 22 May 2018 13:28:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4419028CB3; Tue, 22 May 2018 13:28:48 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4F3DF28CAA for ; Tue, 22 May 2018 13:28:47 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 1E4726B0006; Tue, 22 May 2018 09:28:46 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 16F7E6B0007; Tue, 22 May 2018 09:28:46 -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 F29526B000A; Tue, 22 May 2018 09:28:45 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-wm0-f71.google.com (mail-wm0-f71.google.com [74.125.82.71]) by kanga.kvack.org (Postfix) with ESMTP id 94C976B0006 for ; Tue, 22 May 2018 09:28:45 -0400 (EDT) Received: by mail-wm0-f71.google.com with SMTP id t195-v6so9546776wmt.9 for ; Tue, 22 May 2018 06:28:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:dkim-signature:dkim-signature:from:to:cc:subject :date:message-id:mime-version:spamdiagnosticoutput :spamdiagnosticmetadata; bh=QyKTXyBt9xDh+zp8dApUa+hjEqwNwxYONjJfmDMliF4=; b=moXJgHHtCaJSGpkesnUq5J6pgj0YeZX3DIXIvMt67fQCC3cO0oSnHRYlg22tvsCFGb hlUFYrXETOQxgito9cqbwNHYQDV7kyO0RWQIsuRbGUVdSEEvoJR2J7tSNHvmQ2TQoSFW 7i72vngSBbScV3qJOgGDVf3KXTky5fIrM78pfo8EKfdkAmclsXIaie+c/z7Xb8E8iroU mMHhh91+fT11ZIn4JFsKzFGcrX7gqEUQau2ty9bKTnR3YoKmAfyJbgAUBKi4O7fIZLRj /jQIsWWWGuJ5eq/DPcaqn4ggUlqEWovkXFHiBgohcFoUK25W3brOeXykQObF0RxdZtd3 2kNw== X-Gm-Message-State: ALKqPwe0aCp/tZo2TGlQys+acN/XB68jnJ9f2RDBJOp3jn2vRGXC/dyc NOSjwq+xLOjsuRbVAWXow+3V1TebIiQsJCMZeuzhOe6I8DMMkfvn1vKVD/TbfAb5yhjRRCe7fma JtspwotawVs+c+4j1yy5x+ZI3VjRfIMhAxej3MMIKvX8GZuauKTKCCqx/Y1N9WwGnCA== X-Received: by 2002:a2e:918d:: with SMTP id f13-v6mr14510753ljg.24.1526995725148; Tue, 22 May 2018 06:28:45 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqobkiUOrlj2Bo1zRSjlSe2hBEp0aVWsegmffE4B++pUF2k3hqYZnT66PRaaeG1ug6Ynu39 X-Received: by 2002:a2e:918d:: with SMTP id f13-v6mr14510713ljg.24.1526995724183; Tue, 22 May 2018 06:28:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526995724; cv=none; d=google.com; s=arc-20160816; b=PhYSKDij0F9F67jek/undqKJojmH5oXVei5Yz72P43Cne38IGtywBLXVav9dU/97Qu YQcSw9CsWJieuPTI9zhgT/hKhBDtPRY4zhTHXAfaeWhW9LDwB1by5hzgqnrdTtxPhMar yKIn6qTw+lTLCXdq1QjJ4tI458sYMURwEMX4U9lDprwQLiU7mDlEc19f7EpHQy0alX85 eVnZleYQyerO93Mgp0BQ4Dx9ljbzTwp22Dt4iKJuvhbRYf8j/8JNTH6TOdMKBaFhoWPn 7dw5WKg0SxDvoyLAt2jKzRyoWCM8HsM9xHMxc5+T28vfKRV3SO/FI+sELjDNjkWqnMK7 aEJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=spamdiagnosticmetadata:spamdiagnosticoutput:mime-version:message-id :date:subject:cc:to:from:dkim-signature:dkim-signature :arc-authentication-results; bh=QyKTXyBt9xDh+zp8dApUa+hjEqwNwxYONjJfmDMliF4=; b=dhUzYZBrhxVc8R/LMtAHmKjt6gBbIBwaZuyVL2/xG9AE4r9ByD8NAdW4AHMRVpRf6d 9mKuAcwRX2IVaqMcb14X9y9OXmIUkamtDr+9wBVjnPqPBORtazQLaGtnLYDDo7tS27y2 wK4Xw1cJRKnOY5/Rw8UdMlxWSkEXY1UinPzRVnnJa1pXLAhmBWtu2KFlcSsT2UT+n3Km W8LyCPnpuZfLDDGnMOb7ZmbglZrfUdsVjbLhqrB50kSB8U7HS+TpcfRj4kC6XWixIA23 Dwgl8S8lGq73TLBQGHs+XS5YpEQLDqrvjiMHF6kfnjlTQIT92tbmn+u3QWGep/MYz402 QxqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fb.com header.s=facebook header.b=ePwM3Pyd; dkim=pass header.i=@fb.onmicrosoft.com header.s=selector1-fb-com header.b=QglqxbiD; spf=pass (google.com: domain of prvs=86801010b2=guro@fb.com designates 67.231.153.30 as permitted sender) smtp.mailfrom=prvs=86801010b2=guro@fb.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=fb.com Received: from mx0a-00082601.pphosted.com (mx0b-00082601.pphosted.com. [67.231.153.30]) by mx.google.com with ESMTPS id a68-v6si2735189lfl.184.2018.05.22.06.28.43 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 22 May 2018 06:28:44 -0700 (PDT) Received-SPF: pass (google.com: domain of prvs=86801010b2=guro@fb.com designates 67.231.153.30 as permitted sender) client-ip=67.231.153.30; Authentication-Results: mx.google.com; dkim=pass header.i=@fb.com header.s=facebook header.b=ePwM3Pyd; dkim=pass header.i=@fb.onmicrosoft.com header.s=selector1-fb-com header.b=QglqxbiD; spf=pass (google.com: domain of prvs=86801010b2=guro@fb.com designates 67.231.153.30 as permitted sender) smtp.mailfrom=prvs=86801010b2=guro@fb.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=fb.com Received: from pps.filterd (m0001255.ppops.net [127.0.0.1]) by mx0b-00082601.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w4MDQolJ032009; Tue, 22 May 2018 06:28:32 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fb.com; h=from : to : cc : subject : date : message-id : mime-version : content-type; s=facebook; bh=QyKTXyBt9xDh+zp8dApUa+hjEqwNwxYONjJfmDMliF4=; b=ePwM3PydOpTy+tacOV7lJG9hjKjdhibnTu0458D8Tc5BwqXnNQeiKzKv/EK+F3xILoFO If0F+YKvwhfPD+94IV062K9GOlFnY8HK2F+rNWvUyu91VjjOGPyPj1pPtD6mDIfmJXfo xlwHWagdiphiq682lVNhH2/5361HqWS3Edg= Received: from maileast.thefacebook.com ([199.201.65.23]) by mx0b-00082601.pphosted.com with ESMTP id 2j4ffyrkwt-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 22 May 2018 06:28:32 -0700 Received: from NAM02-BL2-obe.outbound.protection.outlook.com (192.168.183.28) by o365-in.thefacebook.com (192.168.177.33) with Microsoft SMTP Server (TLS) id 14.3.361.1; Tue, 22 May 2018 09:28:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fb.onmicrosoft.com; s=selector1-fb-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=QyKTXyBt9xDh+zp8dApUa+hjEqwNwxYONjJfmDMliF4=; b=QglqxbiD3gCGxjLZlsJ8FbBCOppuuw2ZGTAIQBBJ123NxRBjFbk14v4CMd8qE7n3U6XwHkJJmiJQ6s0a39pX5ChpGKnctrsFVL9mbHqQaa7GUxiNmZ65tc7LecfFuszWYDpif+p+D0PbdcdVwCavGT68oJpVNGuNotsBLi4Bv1I= Received: from castle.thefacebook.com (2620:10d:c092:200::1:18c7) by CO1PR15MB1077.namprd15.prod.outlook.com (2a01:111:e400:7b66::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.776.11; Tue, 22 May 2018 13:28:19 +0000 From: Roman Gushchin To: CC: , , Roman Gushchin , Johannes Weiner , Michal Hocko , Vladimir Davydov , Greg Thelen , Tejun Heo , Andrew Morton Subject: [PATCH 1/2] mm: propagate memory effective protection on setting memory.min/low Date: Tue, 22 May 2018 14:25:27 +0100 Message-ID: <20180522132528.23769-1-guro@fb.com> X-Mailer: git-send-email 2.14.3 MIME-Version: 1.0 X-Originating-IP: [2620:10d:c092:200::1:18c7] X-ClientProxiedBy: AM6PR07CA0019.eurprd07.prod.outlook.com (2603:10a6:209:2a::32) To CO1PR15MB1077.namprd15.prod.outlook.com (2a01:111:e400:7b66::7) X-MS-PublicTrafficType: Email X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193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PSqw6zrLjhrMdNrCguig8b6aDHitz7KzMylfQ2UOMwstDKx/xA4AOZsWYG+Z9hGPrqu4I/BGTAOmLaNW2R3r5KwppGY8KyM5gJ+TC0nkr4dNphfeQ8XpZ/z0W8S64u9p2sv1eWAhlG0fKIybM1bVi+5C0BM++537K9v6rA2XUejnrWe1NbdsNnmlZMVaSlf02k88KJo/Un5272FH6Kwd06RPFvl/KI5gPA4Hlj/JZfYQsUudNThdAX0YjCL9vKToKD6Hnlq8yuQgbKVNSJ0B0lNfwiue7QgcsyCu5bdKoaCQk58Hkq4Z0HKLVC6vlJB8kEcNriPU80pFvNjKLP4XSsS+9nRxhMjYEp81EZXVjPe84sFktd4iG3eVhRTszAxW6Rom1Jc8c4XcHjaZRD6QV2vcGhFC; 4:u59q2QvK6J/o7YtMcLHJzYwh6bE779ZIVVmmI7e+ZfwqGETeAyvMgSo1DVIA9yfLGCcZCn00EA/W/jbrz8fAUwmpNlw+U2LT0A/K/od+7tKturhKS+lmzBNyqF4RVVhlv4WkREUWm00eUkBZkwU5iScVITngBQpNSzKS/AnEkAThgWL72MJ0X2VFTXSPAe64Ll6cYlfJNYCNyDT/+9pzAvQTiMOOcNY447oq0JulZ7P7xtN8GFd8eY3H3SkxY9liczq7TAMiTupI8QKKeNAtm9rPrfTfh8LeKf3cyRHZR4R/MHY8L5hCRoyGwYPf/TpcS0RAis+BCVLpEPcTXYjTeCJFFQ/Q8J8WCxXOVIX8V6sq3/Y/64rt4qPxxX7jqm5EVsPGkK3mMiww/Rtd2qlF19oxMEIZe8/GB4nrx6 VxAFU= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(85827821059158)(67672495146484)(211936372134217)(153496737603132); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3002001)(3231254)(11241501184)(944501410)(52105095)(93006095)(93001095)(10201501046)(149027)(150027)(6041310)(20161123564045)(20161123562045)(20161123558120)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011)(7699016); SRVR:CO1PR15MB1077; BCL:0; PCL:0; RULEID:; SRVR:CO1PR15MB1077; X-Forefront-PRVS: 0680FADD48 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(366004)(39860400002)(396003)(39380400002)(376002)(346002)(199004)(189003)(39060400002)(46003)(5660300001)(8936002)(8676002)(105586002)(81166006)(81156014)(1076002)(6116002)(476003)(486006)(2616005)(68736007)(50466002)(36756003)(52396003)(48376002)(53416004)(4326008)(7736002)(305945005)(106356001)(50226002)(2906002)(25786009)(2351001)(478600001)(69596002)(2361001)(16586007)(54906003)(59450400001)(47776003)(6506007)(6666003)(6916009)(575784001)(53936002)(86362001)(6486002)(316002)(186003)(51416003)(52116002)(386003)(97736004)(16526019)(6512007)(42262002); DIR:OUT; SFP:1102; SCL:1; SRVR:CO1PR15MB1077; H:castle.thefacebook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: fb.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CO1PR15MB1077; 23:Vn8FuqW930/BVLZRWCc0dcgp3M1OwzLBKWyAANUxB?= =?us-ascii?Q?Q4cYIrJO5viEwViO2oGppQiYdRCAoemK+TPVn5swvO+U9yJUmCsOOtaMSw4z?= =?us-ascii?Q?vvm967y1jOPkoY/vHLXRVyfdXQ+FXzO63b4FvUF+d5hvYR3M3s9STSe629JM?= =?us-ascii?Q?WrqSlct+3SFAqfjMhjzhk8qIVmBhfVR2mL2O7LETgyhpQVg3Q5j6dNXvnFeY?= =?us-ascii?Q?VTUklJnsH+YS8EpzGaIRm5iAEhlF8Lr0ISM/lCRqe8yjv2tfINdNP+k/cbJa?= =?us-ascii?Q?4WR4Sz4w9x8wf7OmqTIpErubKa6IqfOsEJBStdgvrOwMJAKtgArgr+RR+jt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/NmHmjsNEQXkfWm+2qpKv4I+i++YF1XKoCMhtBFYf3otHqPEXbX3Wpq8tGufRY= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CO1PR15MB1077; 7:/++ugjwbuk94iWTrGtYKu+VVAV82Pitdjo/3y4SDvr99I+XmgtBMaf9lyKS2mGzGMCVklzSmynzCoES5hugmN6Ddg2sOJA4QbiiAPQpP/TRlU0OHvjChFZhRdCcyJmXh6JuYAJZC+MAjWffUUOTQ2UypZTEnL/xZ7wN9MyixpU2LVyuNl43OsyrLImaNiCJj0JAKqaIeOj7txSwWXTFqtkGlBlXc7zjEd9gxImpr995KKAZSpFC8EvbtNvV9RUMt; 20:tcQuI6+f8B0fUL81gIqupfw3JGKu6eyzDUqpUCBz4hUvVOYljMvf22qf6dJu9KcjMEPHZCZ/GjgALeZRtc9XkjdjNRjr/djZnJU7zvFGIUBwIHYDZH25qKi57eK61wpjK7bi75Yh1a0McRwD4xDu/IdBTTiOl3qxmpDnuabDT50= X-MS-Office365-Filtering-Correlation-Id: 2d9f0163-1a34-4a0e-19e1-08d5bfe7e3c0 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 May 2018 13:28:19.8723 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2d9f0163-1a34-4a0e-19e1-08d5bfe7e3c0 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 8ae927fe-1255-47a7-a2af-5f3a069daaa2 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR15MB1077 X-OriginatorOrg: fb.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2018-05-22_03:, , signatures=0 X-Proofpoint-Spam-Reason: safe X-FB-Internal: Safe 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: X-Virus-Scanned: ClamAV using ClamSMTP Explicitly propagate effective memory min/low values down by the tree. If there is the global memory pressure, it's not really necessary. Effective memory guarantees will be propagated automatically as we traverse memory cgroup tree in the reclaim path. But if there is no global memory pressure, effective memory protection still matters for local (memcg-scoped) memory pressure. So, we have to update effective limits in the subtree, if a user changes memory.min and memory.low values. Signed-off-by: Roman Gushchin Cc: Johannes Weiner Cc: Michal Hocko Cc: Vladimir Davydov Cc: Greg Thelen Cc: Tejun Heo Cc: Andrew Morton --- mm/memcontrol.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/mm/memcontrol.c b/mm/memcontrol.c index ab5673dbfc4e..b9cd0bb63759 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -5374,7 +5374,7 @@ static int memory_min_show(struct seq_file *m, void *v) static ssize_t memory_min_write(struct kernfs_open_file *of, char *buf, size_t nbytes, loff_t off) { - struct mem_cgroup *memcg = mem_cgroup_from_css(of_css(of)); + struct mem_cgroup *iter, *memcg = mem_cgroup_from_css(of_css(of)); unsigned long min; int err; @@ -5385,6 +5385,11 @@ static ssize_t memory_min_write(struct kernfs_open_file *of, page_counter_set_min(&memcg->memory, min); + rcu_read_lock(); + for_each_mem_cgroup_tree(iter, memcg) + mem_cgroup_protected(NULL, iter); + rcu_read_unlock(); + return nbytes; } @@ -5404,7 +5409,7 @@ static int memory_low_show(struct seq_file *m, void *v) static ssize_t memory_low_write(struct kernfs_open_file *of, char *buf, size_t nbytes, loff_t off) { - struct mem_cgroup *memcg = mem_cgroup_from_css(of_css(of)); + struct mem_cgroup *iter, *memcg = mem_cgroup_from_css(of_css(of)); unsigned long low; int err; @@ -5415,6 +5420,11 @@ static ssize_t memory_low_write(struct kernfs_open_file *of, page_counter_set_low(&memcg->memory, low); + rcu_read_lock(); + for_each_mem_cgroup_tree(iter, memcg) + mem_cgroup_protected(NULL, iter); + rcu_read_unlock(); + return nbytes; }