Received: by 10.213.65.68 with SMTP id h4csp529135imn; Fri, 6 Apr 2018 04:45:03 -0700 (PDT) X-Google-Smtp-Source: AIpwx4///3zDMBHWTPWS46/WQXLNDGFfim93/ujuEGOYFlNTjgBr7en/gRo34G0f5c504rgeT53p X-Received: by 2002:a17:902:122:: with SMTP id 31-v6mr27488951plb.280.1523015103762; Fri, 06 Apr 2018 04:45:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523015103; cv=none; d=google.com; s=arc-20160816; b=EUs4Fp8gIAEEfzmtedOfqTI4S0IuR98/8LfT9yCRKdDh+C+DdjoPBq2ITmhUhtNZjt J2QzEl+vkGmwC10cFjuZnlgto2lDKLMbtXgcNTa84nxCIqTe3PgmsGuybdYRSLAu0/GV 8TQuWIBzhuDXkAq5warLmBFesRbI5VzmUNwP7JkCxd7Su0wXGXZV9JaopDYVXFWwtwCE 1mqoCWmULg2YNgoBXnixbAK/lWUuTcOvL9Z0ZkKn/V5oYIMxGw5z94gkGLPB2m105A+w aSa8krCgwHof+rFMpbpV3PmNBeU468LZ9i1qrslB0l3867R9SIyiRx0hiHewJ+jAcMrs ihwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature:arc-authentication-results; bh=OYOzoZrk1tk7wc9FagKhLLqx6tD6UTLgbGn6rrLt1F8=; b=G0Z3a5HBFFfM/xcgC4NhAEWO7iORTsB9VhNVpUhK2D2R17aG4p3+Gzch6PoC/OfR4c 1SABafsrw9H7OgZn29OkFwkmP5WjQWXj+HkV2n80yjzTR56CHdq8WFfXWQQq9fNAdmyV Kk/i8K7zajIRtdJogwFs2lc9EuJ80wdtb+lAQDVR2tXvzWMG8V15jAbCPOCfv2yKCXbm Jfnnrem7+LP+tXDIyB3CR8DHGW+h7Bbj/OFzYN+M8M6obwpLLKHE5XGKo34SYEOkU7l7 3Y/VAasdNHvduK+rQAqMGiIwB9mbYOE0eCJmlP3w5vqeje2+9wbu/m4hN6c6nVpB5rPD BneQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=selector1 header.b=XCh0UXAy; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=virtuozzo.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j8si7122401pgt.582.2018.04.06.04.44.49; Fri, 06 Apr 2018 04:45:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=selector1 header.b=XCh0UXAy; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=virtuozzo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752464AbeDFLn0 (ORCPT + 99 others); Fri, 6 Apr 2018 07:43:26 -0400 Received: from mail-ve1eur01on0133.outbound.protection.outlook.com ([104.47.1.133]:37808 "EHLO EUR01-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752370AbeDFLnY (ORCPT ); Fri, 6 Apr 2018 07:43:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=virtuozzo.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=OYOzoZrk1tk7wc9FagKhLLqx6tD6UTLgbGn6rrLt1F8=; b=XCh0UXAyQxEwHO826PPhQ47WbhyeR58NzbL1wWAyRqVUKGgoaCvsuOUatfH5eaVUZa0DHarP8gT2uToJOkchz/UA3NqYuMH5oYi37U8urIPCk8qLDZDJToo8d1TeKlkl+X4eFQ9RRciaQ3MIHpfVrDE4HKIhPpuJkOQrHf4CU84= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=aryabinin@virtuozzo.com; Received: from [172.16.25.12] (195.214.232.6) by AM0PR08MB3249.eurprd08.prod.outlook.com (2603:10a6:208:5e::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.653.12; Fri, 6 Apr 2018 11:43:19 +0000 Subject: Re: [PATCH v2 4/4] mm/vmscan: Don't mess with pgdat->flags in memcg reclaim. To: Shakeel Butt Cc: Andrew Morton , Mel Gorman , Tejun Heo , Johannes Weiner , Michal Hocko , Steven Rostedt , Linux MM , LKML , Cgroups References: <20180323152029.11084-1-aryabinin@virtuozzo.com> <20180323152029.11084-5-aryabinin@virtuozzo.com> From: Andrey Ryabinin Message-ID: <72db1bfb-aa79-3764-54fd-2c7ddbd07bea@virtuozzo.com> Date: Fri, 6 Apr 2018 14:44:09 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [195.214.232.6] X-ClientProxiedBy: HE1P190CA0036.EURP190.PROD.OUTLOOK.COM (2603:10a6:7:52::25) To AM0PR08MB3249.eurprd08.prod.outlook.com (2603:10a6:208:5e::18) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 8b29b041-4898-4b4d-7110-08d59bb39872 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(5600026)(4604075)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020);SRVR:AM0PR08MB3249; X-Microsoft-Exchange-Diagnostics: 1;AM0PR08MB3249;3:69YWI7cBANNFzHMoj8g4ym9rYp699GWnVfv382DwuFqQkvmfSGvMWnedJEJdHu3sCV7I5GRjf2C53+idQVmqDlf21ixcA1a9gMll5TMVSDYjVvEdywq9Ejk+yg2m7R6Ms1crJPLb4G+oEWZk+BeS5/kJBoQqFlHm2HSxGcLSJbJ3SGapQrv1BhlCf/UCN8DL0vgqGqNR8Xd7MbpxBlPF6rRX/ryhax8pISnoB1S9MlCp7Fzg91cOWifbrPWb9RdQ;25:ctB0IyfNr7qnJu4FPD+YPBj5ns1ilXaQYl/0xqpXTbZ1JP8bavvhzcAAtqUgS6rH6sghMgV8OmKT2SCibi+jVyReYSyEm4NjmFa0letBdG9XesxdMxYG0PPsTib91++Fpl3FNaWT6mWWzzymOyYHAjlm807qkRG8/l/dBck6YGc5I64S4pZDjIvKbIEkkiXGTf58tzCvB49M+n9fK+EbxDM8pvveQB/XbZYhVTK1VOasqYXUog7JpZeh4R/IFVQ+a87dBh9yczkkuxEDWhFLPkcPQ4lJ7dDShe5aknRcQLr1ZlBAhfiRCpQfB58+cnQ8sB4i6wF3wExPNvkxEDP0ng==;31:el/ZI8Xhv/30Ho2vPLh982dHqcwmqxzECMWWw9gP8Q+8/P2P4vnJ4wQFiiPj9Rf+1nDAys214DEqME0UaXKYfi5lk/HbG21fnUO+fr56qDfSqzxJR0KxIwYGeiJYa+D246WgmWssOMxROW6Y37ni85ZGFaPxC82BJRvZi1x2qahsXVWPo26o3zA364uphxdXR1jMIN+ruVRrTTm340doUR2iBJ4aug93Za9WuuMkfug= X-MS-TrafficTypeDiagnostic: AM0PR08MB3249: X-Microsoft-Exchange-Diagnostics: 1;AM0PR08MB3249;20:m/MhcyNbLqd56PdUbZRzNhhwRwoPA/dKMxaUwxJryjwCCJqOrXKVggNb2bwkf8JFVr7WAQgxayYoBI3fJ7HWHbmQdKjxHOL4DhOLrMBl6NHnjcZGrngPrm7ZaHFH8kgZ3PMZwgpR57VJa+brtI7+A4OnSeCgxZPGLDbPWfhifVCIb0+zr54bRr+3hokW33wBCkkXRDv9AEiXWnS1DGnWHrUpuLibj9bI8hunH8OsuprSeqMuPIpR1aZ3maYhubrOYpznbib0XVh7aM7bZkz9sk6QxeHoRE/GuozEX2RzWFpNKoixkrqoNnuoRH7d7Or1wcSrmPIqNxlESNunswDnz4gQXhBmVTYMStcw3s+nYQkHxepScVoLBooKnVPuV11MVn3Sz4+smagvdMtrFGfjo0TxQm94LLCJf9RzDJZ55bZk0bu+DWjLsvlf03qHqxIJ5VuZC+zWxpG6RFssQetqoOIH/5cwz4K1VYwm/eOMSMgcAnkyILBK0X027yXGmGAc;4:QK4f50uwak0qVyv3Tp+uqY0ItXY/e2Pu/GO2RCI/queyWiHPhpTZbp4Pip+DBjNi48BPOy6LFvztxyR/D6Ut2DXSIZ+JTR44AXc+O1Rlu7Xt1Ip6ws8sqpV6c916DXTbgshqWAull5p/IxYEMRKG2uPEyrOEEwd+INIiQZ4t8f+L0y80/AqZTgTk4jEeeSHSCAmckfneYFj6g4/Ar8SgZGZT6xBr3hV4Fz64j00aEoMl9W3BD6eduG60qHuX3CGtkVnjH/ZpFu74vvkK4Ulan0km4AVOKJ6NrP2l1OCUm09xTsJC1FJ6fgTftZmB5OnT X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(788757137089); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040522)(2401047)(5005006)(8121501046)(3231221)(944501327)(52105095)(3002001)(10201501046)(93006095)(93001095)(6041310)(20161123562045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123560045)(6072148)(201708071742011);SRVR:AM0PR08MB3249;BCL:0;PCL:0;RULEID:;SRVR:AM0PR08MB3249; X-Forefront-PRVS: 0634F37BFF X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(6049001)(39840400004)(39380400002)(346002)(396003)(376002)(366004)(199004)(189003)(2486003)(52146003)(23676004)(105586002)(53546011)(64126003)(97736004)(65826007)(6486002)(76176011)(52116002)(55236004)(68736007)(386003)(50466002)(106356001)(65806001)(65956001)(47776003)(66066001)(6246003)(7736002)(31686004)(305945005)(5660300001)(36756003)(7416002)(6916009)(6666003)(53936002)(229853002)(478600001)(476003)(230700001)(26005)(2616005)(3846002)(6116002)(25786009)(4326008)(77096007)(186003)(446003)(11346002)(956004)(2906002)(31696002)(81156014)(58126008)(54906003)(16576012)(486006)(16526019)(316002)(8676002)(81166006)(86362001)(8936002);DIR:OUT;SFP:1102;SCL:1;SRVR:AM0PR08MB3249;H:[172.16.25.12];FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; Received-SPF: None (protection.outlook.com: virtuozzo.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtBTTBQUjA4TUIzMjQ5OzIzOnVCVVVVQkFyVnZzaFQ1Vmc0a29iRGZ6Y3lN?= =?utf-8?B?QXgvQldQUkR2Mk5NVWxsNlBiRTd3UUJjcy92WlJyeVcxWjNvRGtaWUNGRGVp?= =?utf-8?B?dkluZEh1OVU4TXlBcnAyd0dSZTJJUVVQdmEzdU9Qa3lITTl6ekU3dkkvK0Fs?= =?utf-8?B?T2FzbU8wbG4rbUYxZmNvRlZKMTR6dXVMTTJ2U0VvaWtUQURYbklKZGJrSFp2?= =?utf-8?B?MkhFd2xGUG1kbHBxOFJVUE5GRVlpNTVXaGx6elhtYVBlL3Z2Z2xNZG11dG54?= =?utf-8?B?NHdVYjhXYW9RRStTWmRpNjF1ZklnTDJoMCtBOHl1Qm4yY2JOc243S3dFWGp5?= =?utf-8?B?WGRZL3hOZDFBaTQ4ZTJRcEVRTjdsT0ZqaDZCVW1YZFAzQ0hQZnFGbmNtUUV1?= =?utf-8?B?N0RvR3RnZm9HRm0vSWo2b3BZUHNFcjFMVm80YVBvUVlHTEEvbzJYL3AzKzFu?= =?utf-8?B?UXcyTk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E3pHC2k8mxVg5XyaPP/DKlQmapEC/0uXJWZ7fWl++Mmmn6YAnyohuUnUu3/4w61h0tSJk6XKQQbPLOZCVyqEZco1ZfKwv+ck= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Apr 2018 11:43:19.4716 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8b29b041-4898-4b4d-7110-08d59bb39872 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB3249 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04/06/2018 05:13 AM, Shakeel Butt wrote: > On Fri, Mar 23, 2018 at 8:20 AM, Andrey Ryabinin > wrote: >> memcg reclaim may alter pgdat->flags based on the state of LRU lists >> in cgroup and its children. PGDAT_WRITEBACK may force kswapd to sleep >> congested_wait(), PGDAT_DIRTY may force kswapd to writeback filesystem >> pages. But the worst here is PGDAT_CONGESTED, since it may force all >> direct reclaims to stall in wait_iff_congested(). Note that only kswapd >> have powers to clear any of these bits. This might just never happen if >> cgroup limits configured that way. So all direct reclaims will stall >> as long as we have some congested bdi in the system. >> >> Leave all pgdat->flags manipulations to kswapd. kswapd scans the whole >> pgdat, only kswapd can clear pgdat->flags once node is balance, thus >> it's reasonable to leave all decisions about node state to kswapd. > > What about global reclaimers? Is the assumption that when global > reclaimers hit such condition, kswapd will be running and correctly > set PGDAT_CONGESTED? > The reason I moved this under if(current_is_kswapd()) is because only kswapd can clear these flags. I'm less worried about the case when PGDAT_CONGESTED falsely not set, and more worried about the case when it falsely set. If direct reclaimer sets PGDAT_CONGESTED, do we have guarantee that, after congestion problem is sorted, kswapd ill be woken up and clear the flag? It seems like there is no such guarantee. E.g. direct reclaimers may eventually balance pgdat and kswapd simply won't wake up (see wakeup_kswapd()). >> static inline bool bdi_cap_synchronous_io(struct backing_dev_info *bdi) >> { >> diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h >> index 4525b4404a9e..44422e1d3def 100644 >> --- a/include/linux/memcontrol.h >> +++ b/include/linux/memcontrol.h >> @@ -190,6 +190,8 @@ struct mem_cgroup { >> /* vmpressure notifications */ >> struct vmpressure vmpressure; >> >> + unsigned long flags; >> + > > nit(you can ignore it): The name 'flags' is too general IMO. Something > more specific would be helpful. > > Question: Does this 'flags' has any hierarchical meaning? Does > congested parent means all descendents are congested? It's the same as with pgdat->flags. Cgroup (or pgdat) is congested if at least one cgroup in the hierarchy (in pgdat) is congested and the rest are all either also congested or don't have any file pages to reclaim (nr_file_taken == 0). > Question: Should this 'flags' be per-node? Is it ok for a congested > memcg to call wait_iff_congested for all nodes? > Yes, it should be per-node. I'll try to replace ->flags with 'bool congested' in struct mem_cgroup_per_node.