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 8FD9DE77188 for ; Fri, 20 Dec 2024 12:15:49 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D49406B007B; Fri, 20 Dec 2024 07:15:48 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id CD1266B0083; Fri, 20 Dec 2024 07:15:48 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B23596B0085; Fri, 20 Dec 2024 07:15:48 -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 8D4B86B007B for ; Fri, 20 Dec 2024 07:15:48 -0500 (EST) Received: from smtpin02.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 349B91A09F7 for ; Fri, 20 Dec 2024 12:15:48 +0000 (UTC) X-FDA: 82915233156.02.A903FEA Received: from fhigh-b7-smtp.messagingengine.com (fhigh-b7-smtp.messagingengine.com [202.12.124.158]) by imf20.hostedemail.com (Postfix) with ESMTP id 4AE3F1C0011 for ; Fri, 20 Dec 2024 12:15:10 +0000 (UTC) Authentication-Results: imf20.hostedemail.com; dkim=pass header.d=fastmail.fm header.s=fm2 header.b="Y59c+By/"; dkim=pass header.d=messagingengine.com header.s=fm1 header.b="Q deoGky"; spf=pass (imf20.hostedemail.com: domain of bernd.schubert@fastmail.fm designates 202.12.124.158 as permitted sender) smtp.mailfrom=bernd.schubert@fastmail.fm; dmarc=pass (policy=none) header.from=fastmail.fm ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1734696923; 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:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=+YGk28ztcSAWjy0uYggB9XXCE8N2gUhF1YO1R6mlzLg=; b=6N42oXDRpiumPkjVKLfG9t8amxJ7ClMM8StAnFm0xHqv+TVm/vic1BAKucPEISepfio8bd blTl1iRR8KB6COIvGFIVrjsCVMSalPHmorCLcEETFJx5f+3pckBSeVp3jYoWjB+qCz2xOn i8rqXk6BNNYFFB2IFBPOK7e9/yc008E= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1734696923; a=rsa-sha256; cv=none; b=GVucMWBlhPUT6okLkvHJjREGz86zHR7wMtn9ncTlyJqDdGvcSQ21N6+kKtNhg8zS1bcX7z P75Dpl1zIm6v4sZaR7KeK/OEaNXy1zVZ+CgIB2HqSllmdG2KZs9WPva317fbM5hzaVk7un 3LZV93mKmSNgweraVctAmt3fiA1Hp7I= ARC-Authentication-Results: i=1; imf20.hostedemail.com; dkim=pass header.d=fastmail.fm header.s=fm2 header.b="Y59c+By/"; dkim=pass header.d=messagingengine.com header.s=fm1 header.b="Q deoGky"; spf=pass (imf20.hostedemail.com: domain of bernd.schubert@fastmail.fm designates 202.12.124.158 as permitted sender) smtp.mailfrom=bernd.schubert@fastmail.fm; dmarc=pass (policy=none) header.from=fastmail.fm Received: from phl-compute-03.internal (phl-compute-03.phl.internal [10.202.2.43]) by mailfhigh.stl.internal (Postfix) with ESMTP id D4E5F25401F2; Fri, 20 Dec 2024 07:15:44 -0500 (EST) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-03.internal (MEProxy); Fri, 20 Dec 2024 07:15:45 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.fm; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1734696944; x=1734783344; bh=+YGk28ztcSAWjy0uYggB9XXCE8N2gUhF1YO1R6mlzLg=; b= Y59c+By/BKXKhLTZGutksTiVzXmlh8WW2yZkyPbb/Uz3wQjTS1qw4ocjMOCf7tJs SpDvgLktO7JMK+jtiRDOy8aZ8sF5Gv3RgKAl1ETd0fSxzg+iorW9KNAHYrAgn48s HFtfAcAQfdrrSIXT2FvR2uCx0UEgKB9pXiYzb5Dqsi9aePwDTb4IIeXVk2Fuzs1M vwXbrtFiW7aZZX+oId96HZjkrez3y0CvPnw0ZVzFqg3ExPAwo1bdKYzegeRu5bcP j7hhhsexJkd7x9g1JC9o8NQ6mdw5xiuhLUY70fbTS1Ht39HGLvLekSFQZIEe1VZa szWpzgQ9RQi248/AOkp7/A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1734696944; x= 1734783344; bh=+YGk28ztcSAWjy0uYggB9XXCE8N2gUhF1YO1R6mlzLg=; b=Q deoGkygSbRte96yoqCBzNFy/jkC1YAhRpFA+9so3li+2yVdYZhDuDZOIWeiash3p exSMADNg5wyy7VuNFHcVlIbPykWnO4a6SQICR47jejkfymaflxu3pOyYkRrjzSEG Ac7Qz2J03sErExfhlf+yjc/qYoI4qrq77vtNwViNZnh9GLwh30Be90WMsn6mW6Uy zoZz8FDAI1yNfZe2tVZ3p+ylv1+r76bujMEx+NIfa+snfK1gzAWkerGLtmPnee+M eEZWzdTQuDZpcCGcYw7zvstfqihDktc04RVHKznslbeSyHV0M3nTX07UpWJOf1V0 SrZooqYfPnTvCKm8CoeSA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddruddtvddgfeehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhepkfffgggfuffvvehfhfgjtgfgsehtkeertddtvdej necuhfhrohhmpeeuvghrnhguucfutghhuhgsvghrthcuoegsvghrnhgurdhstghhuhgsvg hrthesfhgrshhtmhgrihhlrdhfmheqnecuggftrfgrthhtvghrnhepvefgueektdefuefg keeuieekieeljeehffejheeludeifeetueefhfetueehhfefnecuffhomhgrihhnpehkvg hrnhgvlhdrohhrghenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhl fhhrohhmpegsvghrnhgurdhstghhuhgsvghrthesfhgrshhtmhgrihhlrdhfmhdpnhgspg hrtghpthhtohepudefpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopegurghvihgu sehrvgguhhgrthdrtghomhdprhgtphhtthhopehshhgrkhgvvghlrdgsuhhttheslhhinh hugidruggvvhdprhgtphhtthhopehjohgrnhhnvghlkhhoohhnghesghhmrghilhdrtgho mhdprhgtphhtthhopeiiihihsehnvhhiughirgdrtghomhdprhgtphhtthhopehmihhklh hoshesshiivghrvgguihdrhhhupdhrtghpthhtoheplhhinhhugidqfhhsuggvvhgvlhes vhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehjvghffhhlvgiguheslhhinh hugidrrghlihgsrggsrgdrtghomhdprhgtphhtthhopehjohhsvghfsehtohigihgtphgr nhgurgdrtghomhdprhgtphhtthhopehlihhnuhigqdhmmheskhhvrggtkhdrohhrgh X-ME-Proxy: Feedback-ID: id8a24192:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 20 Dec 2024 07:15:41 -0500 (EST) Message-ID: Date: Fri, 20 Dec 2024 13:15:40 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v6 4/5] mm/migrate: skip migrating folios under writeback with AS_WRITEBACK_INDETERMINATE mappings To: David Hildenbrand , Shakeel Butt , Joanne Koong Cc: Zi Yan , miklos@szeredi.hu, linux-fsdevel@vger.kernel.org, jefflexu@linux.alibaba.com, josef@toxicpanda.com, linux-mm@kvack.org, kernel-team@meta.com, Matthew Wilcox , Oscar Salvador , Michal Hocko References: <43e13556-18a4-4250-b4fe-7ab736ceba7d@redhat.com> <968d3543-d8ac-4b5a-af8e-e6921311d5cf@redhat.com> <7b6b8143-d7a4-439f-ae35-a91055f9d62a@redhat.com> <2e13a67a-0bad-4795-9ac8-ee800b704cb6@fastmail.fm> <2bph7jx4hvhxpgp77shq2j7mo4xssobhqndw5v7hdvbn43jo2w@scqly5zby7bm> <71d7ac34-a5e5-4e59-802b-33d8a4256040@redhat.com> From: Bernd Schubert Content-Language: en-US, de-DE, fr In-Reply-To: <71d7ac34-a5e5-4e59-802b-33d8a4256040@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: 4AE3F1C0011 X-Stat-Signature: 93ukcu3a5eky3hps3fwxsskq4r5mtyds X-Rspam-User: X-HE-Tag: 1734696910-403409 X-HE-Meta: U2FsdGVkX18lj9W6iHfGL/CTRphyZTbrjEVxZRLpWI6tciTRDTJIj6n14B4eekxgU7SrCpwOMbZEGf7H572i93yHNeBLuY2oRbAXIIGEgjKevW/TX7hYe4l7wOz1BRH+T2hV/mPqf0p1Dwq74wwo9kYkleEjj4rrpiHmmSHjdrDKUVAegym/ctvh8EB1JPm7WoDnTLMSlljGleA3/ofar7SXu7vXqLbhC3qRSxNtLcDslPWMMf9+S5TXZf4w0vri3fQKtYsQqd23HriCmFPKixQM4wCVjHTABlH3MltOvG7/lCXZvdia++2Ows+JTJTbnvLk0QmX6OVGfQw8GdYfiy2HBEM26lr2mtcxY+WXmzKmrzFdWyOEk2Xffh0JBD0X+xGAgoSqkOwZHVOVv3iAJ75XazHcngpX1cGgzxg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kh 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: List-Subscribe: List-Unsubscribe: On 12/20/24 12:44, David Hildenbrand wrote: > On 19.12.24 18:54, Shakeel Butt wrote: >> On Thu, Dec 19, 2024 at 09:44:42AM -0800, Joanne Koong wrote: >>> On Thu, Dec 19, 2024 at 9:37 AM Shakeel Butt >>> wrote: >> [...] >>>>> >>>>> The request is canceled then - that should clear the page/folio state >>>>> >>>>> >>>>> I start to wonder if we should introduce really short fuse request >>>>> timeouts and just repeat requests when things have cleared up. At >>>>> least >>>>> for write-back requests (in the sense that fuse-over-network might >>>>> be slow or interrupted for some time). >>>>> >>>>> >>>> >>>> Thanks Bernd for the response. Can you tell a bit more about the >>>> request >>>> timeouts? Basically does it impact/clear the page/folio state as well? >>> >>> Request timeouts can be set by admins system-wide to protect against >>> malicious/buggy fuse servers that do not reply to requests by a >>> certain amount of time. If the request times out, then the whole >>> connection will be aborted, and pages/folios will be cleaned up >>> accordingly. The corresponding patchset is here [1]. This helps >>> mitigate the possibility of unprivileged buggy servers tieing up >>> writeback state by not replying. >>> >> >> Thanks a lot Joanne and Bernd. >> >> David, does these timeouts resolve your concerns? > > Thanks for that information. Yes and no. :) > > Bernd wrote: "I start to wonder if we should introduce really short fuse > request timeouts and just repeat requests when things have cleared up. > At least for write-back requests (in the sense that fuse-over-network > might be slow or interrupted for some time). > > Indicating to me that while timeouts might be supported soon (will there > be a sane default?) even trusted implementations can run into this > (network example above) where timeouts might actually be harmful I suppose? Yeah and that makes it hard to provide a default. In Joannes timeout patches the admin can set a system default. https://lore.kernel.org/all/20241218222630.99920-3-joannelkoong@gmail.com/ > > I'm wondering if there would be a way to just "cancel" the writeback and > mark the folio dirty again. That way it could be migrated, but not > reclaimed. At least we could avoid the whole AS_WRITEBACK_INDETERMINATE > thing. > That is what I basically meant with short timeouts. Obviously it is not that simple to cancel the request and to retry - it would add in quite some complexity, if all the issues that arise can be solved at all. Thanks, Bernd