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 827C1C433F5 for ; Mon, 3 Oct 2022 15:08:41 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id EF35E6B0071; Mon, 3 Oct 2022 11:08:40 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id EA2838E0002; Mon, 3 Oct 2022 11:08:40 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D6AD78E0001; Mon, 3 Oct 2022 11:08:40 -0400 (EDT) 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 C7AAD6B0071 for ; Mon, 3 Oct 2022 11:08:40 -0400 (EDT) Received: from smtpin18.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 988A81A0B6E for ; Mon, 3 Oct 2022 15:08:40 +0000 (UTC) X-FDA: 79979970000.18.8584455 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by imf24.hostedemail.com (Postfix) with ESMTP id 483A918001B for ; Mon, 3 Oct 2022 15:08:39 +0000 (UTC) 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 D54AA21982; Mon, 3 Oct 2022 15:08:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1664809717; 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=aytUdXlGSVAVAW293DkhDivkGR0N7fkvULdwZOjcsOA=; b=n/FrNF6zgz6jZFmZnlJOWIbrGzQYXL6yM0mJ/jc+QIH1ww+yX9V1b8JfTsKpXG0QyYRZmf gIWbP1pq/MTUlu8K1wfZh8MsW1LfrK7LvQVeKNgMVX51MimhtIJL5YlF+de/kXp+5BF+0J Pnl3KLp1HBlbjwAkHetW094SQIHonQM= 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 A974C13522; Mon, 3 Oct 2022 15:08:37 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id O/oGKPX6OmN5dgAAMHmgww (envelope-from ); Mon, 03 Oct 2022 15:08:37 +0000 Date: Mon, 3 Oct 2022 17:08:36 +0200 From: Michal =?iso-8859-1?Q?Koutn=FD?= To: Dave Chinner Cc: cgroups@vger.kernel.org, linux-mm@kvack.org, linux-xfs@vger.kernel.org Subject: Re: [PATCH] memcg: calling reclaim_high(GFP_KERNEL) in GFP_NOFS context deadlocks Message-ID: References: <20220929215440.1967887-1-david@fromorbit.com> <20220929222006.GI3600936@dread.disaster.area> <20220930220834.GK3600936@dread.disaster.area> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="OOHJpowuF7rqPJPU" Content-Disposition: inline In-Reply-To: <20220930220834.GK3600936@dread.disaster.area> ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1664809719; 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=aytUdXlGSVAVAW293DkhDivkGR0N7fkvULdwZOjcsOA=; b=Xxe6IymEA9GgRW+qMhJnMfUw1KyaZEwRLUOoTGEC452f8F2TFdW/cK1rEQddKidRXAN8Oj dHynJTpaeDIrh5egL/cW94mbbjJplJpztVfzW/cB12lWfsheMjffwZhM1fY+xYLEwA4N08 05+51tNlSRiEcUhjicUkePR88mP2Q/A= ARC-Authentication-Results: i=1; imf24.hostedemail.com; dkim=pass header.d=suse.com header.s=susede1 header.b="n/FrNF6z"; spf=pass (imf24.hostedemail.com: domain of mkoutny@suse.com designates 195.135.220.28 as permitted sender) smtp.mailfrom=mkoutny@suse.com; dmarc=pass (policy=quarantine) header.from=suse.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1664809719; a=rsa-sha256; cv=none; b=4RARJrQySbH5xXtqQL7kvclBefKynnz1wrBmrbPt73F79//1X2RBm9JYixAb8PZlhuyQIc woV4pD5hHCsiYxGCJqYYzXtpLwsQXqhUpTaOEiTy07Q1MWJxPxkQ08sPQL/PO98EnfHJQX lqEiRj8tGgGER3yAgZFQg/wO7/G5SjY= X-Rspamd-Queue-Id: 483A918001B Authentication-Results: imf24.hostedemail.com; dkim=pass header.d=suse.com header.s=susede1 header.b="n/FrNF6z"; spf=pass (imf24.hostedemail.com: domain of mkoutny@suse.com designates 195.135.220.28 as permitted sender) smtp.mailfrom=mkoutny@suse.com; dmarc=pass (policy=quarantine) header.from=suse.com X-Rspamd-Server: rspam06 X-Rspam-User: X-Stat-Signature: 7rsc6tsyokg149o53be6j5tb497m7ygu X-HE-Tag: 1664809719-770005 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: --OOHJpowuF7rqPJPU Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sat, Oct 01, 2022 at 08:08:34AM +1000, Dave Chinner wrote: > You might be right in that c9afe31ec443 exposed the issue, but it's > not the root cause. I think c9afe31ec443 just a case of a > new caller of mem_cgroup_handle_over_high() stepping on the landmine > left by b3ff92916af3 adding an unconditional GFP_KERNEL direct > reclaim deep in the guts of the memcg code. It's specific of the memory.high induced reclaim that it happens out of sensitive paths (as was with exit to usermode or workqueue), so there'd be no explicit flags to pass through, hence the unconditional GFP_KERNEL. > So what's the real root cause of the issue - the commit that stepped > on the landmine, or the commit that placed the landmine? My preference here is slighty on the newer commit but feel free to reference both. > Either way, if anyone backports b3ff92916af3 or has a kernel with > b3ff92916af3 and not c9afe31ec443, they still need to know > about the landmine in b3ff92916af3.... To be on the same page -- having just b3ff92916af3 won't lead to the described cycle when FS code reclaims without GFP_NOFS? (IOW, how would the fix look like fix without c9afe31ec443?) Thanks, Michal --OOHJpowuF7rqPJPU Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- iHUEARYKAB0WIQTrXXag4J0QvXXBmkMkDQmsBEOquQUCYzr68gAKCRAkDQmsBEOq uShAAP4nCUb/8BBe0G5NPxDTfRtDkhqnQSLtUqP1SheQihbQ8AEA08BzlyOuRTWH DwghMoqgqag9V2P98YpcCDpA2R/KvwA= =/1mZ -----END PGP SIGNATURE----- --OOHJpowuF7rqPJPU--