From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5FCE4C4332F for ; Wed, 14 Dec 2022 09:45:06 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C2C3A8E0003; Wed, 14 Dec 2022 04:45:05 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id BDB4A8E0002; Wed, 14 Dec 2022 04:45:05 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AA3518E0003; Wed, 14 Dec 2022 04:45:05 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 97F298E0002 for ; Wed, 14 Dec 2022 04:45:05 -0500 (EST) Received: from smtpin19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 7242AAB47F for ; Wed, 14 Dec 2022 09:45:05 +0000 (UTC) X-FDA: 80240428170.19.32AA3E7 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by imf18.hostedemail.com (Postfix) with ESMTP id CBFD91C0009 for ; Wed, 14 Dec 2022 09:45:03 +0000 (UTC) Authentication-Results: imf18.hostedemail.com; dkim=pass header.d=suse.com header.s=susede1 header.b=vKKFHJq2; spf=pass (imf18.hostedemail.com: domain of mhocko@suse.com designates 195.135.220.28 as permitted sender) smtp.mailfrom=mhocko@suse.com; dmarc=pass (policy=quarantine) header.from=suse.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1671011104; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=TSHBBGLgxRKBQUkS4kyHoe7XeZEUdZOiGeNsPiE4bYM=; b=oerpa+SW3xZx0YRifGZffBvxOmk/tPrd46V2HRSlJTeYIXzk3RIf7azIH5bKRtcV0ial0r tt7iatIJvSr3Mvvecr0Uavg4Gv/DxLYAu9r6iW3E3Jrpo+ktZ1vYxyn6CN7oFP1ZU7KvF/ mm6/p2Gq1KpBa9wgvoGwzMG/hqrL8/8= ARC-Authentication-Results: i=1; imf18.hostedemail.com; dkim=pass header.d=suse.com header.s=susede1 header.b=vKKFHJq2; spf=pass (imf18.hostedemail.com: domain of mhocko@suse.com designates 195.135.220.28 as permitted sender) smtp.mailfrom=mhocko@suse.com; dmarc=pass (policy=quarantine) header.from=suse.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1671011104; a=rsa-sha256; cv=none; b=ntlI8jKW6YBpgB28SBgQ4kSgfw3/v/SrUeax5L0YeNaws6PcpJm1yV2JFYEFMGNFYTJCWS y9+kDRLRgFlxCiftK3r9flDO+RfiQSQfRvl422nh7CrEC5E3dh/w5eJ0yUdHmql8yzqOiD wWt/1iuVU9EIsAUmQ0NSYMq9ezNrt5Y= Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 8E287220E9; Wed, 14 Dec 2022 09:45:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1671011102; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=TSHBBGLgxRKBQUkS4kyHoe7XeZEUdZOiGeNsPiE4bYM=; b=vKKFHJq2c/Q7tXmESWMSFdTZWgMsaREN3rPU1/qtK1r2uP3W4HX8cQ09/MNpje5UWowhE9 hbfwXukmB0NKFDLqfUQBBxDyvnx46LEhdhcZ6aH7QqdeKqIpkvWt+hKLHdxUHhdpj8IExt pnw0Yg7LSpqBvw95RjF6Al4D0guaYws= Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 72EB6138F6; Wed, 14 Dec 2022 09:45:02 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id /pYyGR6bmWNVCQAAMHmgww (envelope-from ); Wed, 14 Dec 2022 09:45:02 +0000 Date: Wed, 14 Dec 2022 10:45:01 +0100 From: Michal Hocko To: Dave Hansen Cc: "Huang, Ying" , Yang Shi , Wei Xu , Johannes Weiner , Andrew Morton , linux-mm@kvack.org, LKML Subject: Re: memcg reclaim demotion wrt. isolation Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspam-User: X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: CBFD91C0009 X-Stat-Signature: 5k46oo8xyh6zabrz3wq7ppax4pzfdsmr X-HE-Tag: 1671011103-657033 X-HE-Meta: U2FsdGVkX18odvoTZnA5UnqrbMtTISsOP3UPuLW6M3osTMRe/NHJ3vneqBSRX7LMY6w31mfaGfZqXunIiCX3dsh9PF3uishhbwHhYnV7R+yDuWw5I4lXb8e6USiQucgTMTPGTl3bb6rVXu6R/LoTe4R76iR6HEKfYP74R+PhiCERXXr2gibGB4utZa1wrWrcFFxgNiFUR/k+1UI+qooTLVWZQflgZkQVRPvaoyib+MSZrfp66IjrbHh8gfZeURS9DD4JeY2+RamjDcIfIjw0hquGH/nTspLH6H1sVRlHytb6Vk4B4ct+Vvgvt/gDDybvwWreoisfwXENJOur3Ioj+voGbAqFDqQDp4tsHFU8CifXQ9iWae17jslCbZw9YvX6MOadgc8hcGbcdYyp9Td9LxrCC0hff6DQy6rE/TZ1OnmcmClNW5WEnxN5PVMEhAR1fg4H8J0prwJXAxBr/h3G7uoY9kxIYd0uIC+14C71GosoMWc+zhSLEQcK8DW3QjoibCQa0NefEYIj5tXop4/0Q+H8oaequwJDaV6IbxvmeTN04+Iri37dVC5iEBpPk8ZUSRcys3wgIt5mKOOKxP9pwhVVlP6yfpG21KOlzHwpMO17tgmgnealbrYFq2BuMmrFSXTeZQoUxJUkp3sSMYvuLinORSyPvTO8O1SaiXj+BDL+CS/h7xG1KIbOVl5fK9wcndURGsj6hqqD4Ct74VdLneZKs9pzYX47Ygh1oJE9Bw8l+J08uIlaVxcUqftPHycET8+IGNL6NZ/AwEKZ7BaRFYRzIdaB2l0TXvyTNJ/v3fLPyGz9YKgC/ifYO6R9chQuYT9k3c7FWCZYVcaCRqfwO1n6yLWLzmHhoselgTA8bko= 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: On Tue 13-12-22 14:26:42, Dave Hansen wrote: > On 12/13/22 07:41, Michal Hocko wrote: > > This makes sense but I suspect that this wasn't intended also for > > memcg triggered reclaim. This would mean that a memory pressure in one > > hierarchy could trigger paging out pages of a different hierarchy if the > > demotion target is close to full. > > > > I haven't really checked at the current kswapd wake up checks but I > > suspect that kswapd would back off in most cases so this shouldn't > > really cause any big problems. But I guess it would be better to simply > > not wake kswapd up for the memcg reclaim. What do you think? > > You're right that this wasn't really considering memcg-based reclaim. > The entire original idea was that demotion allocations should fail fast, > but it would be nice if they could kick kswapd so they would > *eventually* succeed and just just fail fast forever. > > Before we go trying to patch anything, I'd be really interested what it > does in practice. How much does it actually wake up kswapd? Does > kswapd cause any collateral damage? I haven't seen any real problem so far. I was just trying to wrap my head around consenquences of discussed memory.demote memcg interface [1]. See my reply to Johannes about specific concerns. [1] http://lkml.kernel.org/r/87k02volwe.fsf@yhuang6-desk2.ccr.corp.intel.com -- Michal Hocko SUSE Labs