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 F00A6E77188 for ; Tue, 24 Dec 2024 12:37:59 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 563E26B0082; Tue, 24 Dec 2024 07:37:59 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 513406B0083; Tue, 24 Dec 2024 07:37:59 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 38C8D6B0085; Tue, 24 Dec 2024 07:37:59 -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 14C986B0082 for ; Tue, 24 Dec 2024 07:37:59 -0500 (EST) Received: from smtpin29.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 86E02B10C0 for ; Tue, 24 Dec 2024 12:37:58 +0000 (UTC) X-FDA: 82929804258.29.C9F3F45 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf20.hostedemail.com (Postfix) with ESMTP id 621BA1C000A for ; Tue, 24 Dec 2024 12:37:15 +0000 (UTC) Authentication-Results: imf20.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=OXchRlsi; spf=pass (imf20.hostedemail.com: domain of david@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=david@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1735043850; 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=NSG4ayEYm3Kz9Nh0mNnanQ0akRiWq82T1wa6YfP8Ei8=; b=RSDkPXe5clxRKktgnLwwk6pkuhlhZ8SHSBWwP9p8jYSAowFgMGsI+MHKtzPloGEDZ8OR3l 3Ug5kaZouOfvbc0SjI4x2S40jxFeIEq00+JMUvd59jKIeqvmdUTkp15sm7Qjf/4iA9a8K0 ZiJUS/j6Uh/cM/ghpC4MI/7D6Wh3H6E= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1735043850; a=rsa-sha256; cv=none; b=KRElKQ14mP1Q/idnZWG4x/6qK9pn1U/HRcO3KgCcVsm623izHBr+TrXFj8fCtcCYxUELH7 DXMzi3dJa1mn1IdioEgHKrmZOFFlvCmxVQW7bOOKtgViRSxE9QBF+HGzmBRDagoNj5oqsb Ub8uNm7UDU6v34043r1oIz8poT5XPXc= ARC-Authentication-Results: i=1; imf20.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=OXchRlsi; spf=pass (imf20.hostedemail.com: domain of david@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=david@redhat.com; dmarc=pass (policy=none) header.from=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1735043875; h=from:from: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:autocrypt:autocrypt; bh=NSG4ayEYm3Kz9Nh0mNnanQ0akRiWq82T1wa6YfP8Ei8=; b=OXchRlsi8GwKXGgGqCQAr4zFL1tGbd54/t4WPIiPJyzJ+AqKI+8sb8WNBsMzAg0ZQXADeP tsL4kxLkbYlKF9kM8gy6zFmTLsL9DFIIg/eLJEJc3R97WYYuJJJwRaAXHmQGZyzouMGi5O wJsPI1l53NTfVNnquEkKi87Fx40gJZ0= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-382-VtDjwm2COO2h-ZUkeX6DYw-1; Tue, 24 Dec 2024 07:37:53 -0500 X-MC-Unique: VtDjwm2COO2h-ZUkeX6DYw-1 X-Mimecast-MFC-AGG-ID: VtDjwm2COO2h-ZUkeX6DYw Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-43623bf2a83so38382585e9.0 for ; Tue, 24 Dec 2024 04:37:53 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735043873; x=1735648673; h=content-transfer-encoding:in-reply-to:organization:autocrypt :content-language:from:references:cc:to:subject:user-agent :mime-version:date:message-id:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=NSG4ayEYm3Kz9Nh0mNnanQ0akRiWq82T1wa6YfP8Ei8=; b=CnFxPQrLBPXGDXB73uThjSk9OUIHOLUw7VUdReH8RAYYfaOOOoK9bZHECQJu8ntX4p Sss+pnG7fJXbKwL+ZxIeuKICRorY9GARCMTNC+X4PsEfHe/3yxspF3tzq497NVAestIX gNrnm3mvC0aMSTk/C1LNJTeB9rJbVLrOZ5ef7FeNbP/M87rmlw/DewJUqa/mI8ZGFNj1 vWBL1Fe6Cw8dYNcRoCNPfJa0JOqJKp+hN4z0HhahQZ8mKNdxlttZ4kPE8B7bEyR4NZIU JQV2Vw3ozRYu3uu4m9o07mxLmXt18qGl4wvr2vJYHZB1wDFjuLvn1Ix9xr8JEg3fB7+C 5lTQ== X-Forwarded-Encrypted: i=1; AJvYcCWaW9/0nCXK3cWZIN99TDBq8xqmnXEu5AFAoCGUSVnaay60qvuHAE1/JMk7VCLEa8iKOKUgHX9eow==@kvack.org X-Gm-Message-State: AOJu0YzsxSqN9e8+692xAfXZ6LDetop05baUdG7scFBBtu61ZThCSAFm QDKo1G2/ypgLzdJBFtRgNILsSdm0RpRqut3apc1EoZPR3Rj88xeTueSttZLrcp7cQNYTIRPc9ed S1XlokALUSOLp69WexomhUecvKIFFsQfbZrdGQKa4c4DRUgOy X-Gm-Gg: ASbGncuvZ7R+7SG5oKzl9HoU4I6yYe0/tK8x8ba7d91eMOBLoDFL5lpxg47hzmhx3WB wwsADMRUn6kVI/ncTI7DJEFXtWfNmFXWnkeuawsz4N8qwCDC2Qu22a0c1fWnmC3LVB4868gTwfq dzuOWvn3Nu1XhK8pzdrkwDg5XAflix7ULahygO8YB8gEdp6r8XqEWBVTR/gNqhn6kaUy5Mkv7aD CU1ZkWyd/gp+ZhE/6pgrD7BQ5TSj7cRbNm6jw97DCfjoGTkEgcD+1QCgCPvn2Tbd2hW6bEO3waf kk5cmE6h8r6LKWa1244YgxIK4J9GPcbMWIwFFz+OXYf8EBG2G0Y7auxQBmgJLqiZ6BJB1BvAg0q w/UylU2Zo X-Received: by 2002:a05:600c:1c91:b0:434:e9ee:c2d with SMTP id 5b1f17b1804b1-43668b5e085mr127426465e9.26.1735043872661; Tue, 24 Dec 2024 04:37:52 -0800 (PST) X-Google-Smtp-Source: AGHT+IGsuTEaE5C3CRfktkkUHL4DfNBeyPEDuHNAm22EMav6rvDL0wDUDchnt71Z94INolH2uT9Fkg== X-Received: by 2002:a05:600c:1c91:b0:434:e9ee:c2d with SMTP id 5b1f17b1804b1-43668b5e085mr127426295e9.26.1735043872262; Tue, 24 Dec 2024 04:37:52 -0800 (PST) Received: from ?IPV6:2003:cb:c72a:da00:e63f:f575:6b1a:df4e? (p200300cbc72ada00e63ff5756b1adf4e.dip0.t-ipconnect.de. [2003:cb:c72a:da00:e63f:f575:6b1a:df4e]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43656b4471bsm200613125e9.44.2024.12.24.04.37.49 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 24 Dec 2024 04:37:51 -0800 (PST) Message-ID: Date: Tue, 24 Dec 2024 13:37:49 +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: Shakeel Butt Cc: Bernd Schubert , Joanne Koong , 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: <7b6b8143-d7a4-439f-ae35-a91055f9d62a@redhat.com> <2e13a67a-0bad-4795-9ac8-ee800b704cb6@fastmail.fm> <2bph7jx4hvhxpgp77shq2j7mo4xssobhqndw5v7hdvbn43jo2w@scqly5zby7bm> <71d7ac34-a5e5-4e59-802b-33d8a4256040@redhat.com> <9404aaa2-4fc2-4b8b-8f95-5604c54c162a@redhat.com> <3f3c7254-7171-4987-bb1b-24c323e22a0f@redhat.com> From: David Hildenbrand Autocrypt: addr=david@redhat.com; keydata= xsFNBFXLn5EBEAC+zYvAFJxCBY9Tr1xZgcESmxVNI/0ffzE/ZQOiHJl6mGkmA1R7/uUpiCjJ dBrn+lhhOYjjNefFQou6478faXE6o2AhmebqT4KiQoUQFV4R7y1KMEKoSyy8hQaK1umALTdL QZLQMzNE74ap+GDK0wnacPQFpcG1AE9RMq3aeErY5tujekBS32jfC/7AnH7I0v1v1TbbK3Gp XNeiN4QroO+5qaSr0ID2sz5jtBLRb15RMre27E1ImpaIv2Jw8NJgW0k/D1RyKCwaTsgRdwuK Kx/Y91XuSBdz0uOyU/S8kM1+ag0wvsGlpBVxRR/xw/E8M7TEwuCZQArqqTCmkG6HGcXFT0V9 PXFNNgV5jXMQRwU0O/ztJIQqsE5LsUomE//bLwzj9IVsaQpKDqW6TAPjcdBDPLHvriq7kGjt WhVhdl0qEYB8lkBEU7V2Yb+SYhmhpDrti9Fq1EsmhiHSkxJcGREoMK/63r9WLZYI3+4W2rAc UucZa4OT27U5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SJOx/z6OUImD/GhX7Xvkt3kq Er5KTrJz3++B6SH9pum9PuoE/k+nntJkNMmQpR4MCBaV/J9gIOPGodDKnjdng+mXliF3Ptu6 3oxc2RCyGzTlxyMwuc2U5Q7KtUNTdDe8T0uE+9b8BLMVQDDfJjqY0VVqSUwImzTDLX9S4g/8 kC4HRcclk8hpyhY2jKGluZO0awwTIMgVEzmTyBphDg/Gx7dZU1Xf8HFuE+UZ5UDHDTnwgv7E th6RC9+WrhDNspZ9fJjKWRbveQgUFCpe1sa77LAw+XFrKmBHXp9ZVIe90RMe2tRL06BGiRZr jPrnvUsUUsjRoRNJjKKA/REq+sAnhkNPPZ/NNMjaZ5b8Tovi8C0tmxiCHaQYqj7G2rgnT0kt WNyWQQ== Organization: Red Hat In-Reply-To: X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: 3S5g-ctMjy9ThTXrvxTRNpCozK-gugVBCQm3vAr8py4_1735043873 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: 621BA1C000A X-Stat-Signature: yy4ymsjzc7mntimn4qapdetix3oq614d X-Rspam-User: X-HE-Tag: 1735043835-140491 X-HE-Meta: U2FsdGVkX18mjCCW1HFtkDRxnTMwG2hZ/SqGbNv/vOdxCCwo0BO4wsgmjatre4+8VFleP1P15LZRFotQkWU5nQiSAIaPymbuvL7RkZMqwSlXGNzpuCQsZw/Rov37cboE24ldQ0sJFRV+e7WfE6YDRYtmt8K9pbbbeA65UNJMb6ubgfAWZAazrdVI3EEYcBV0yqByqaSwx9GoqhL3IlypQ6YxK4k+C+W3LWVRi+sNpoRPEgHC3Sg1notce5i6L6Cv1lyHFe9skpMA4ochJBitzIMPbrdLYSKho2Odv3fusT6cfbITQG54uyEdTstQpHliXYuUhbo6HS/8Qi4tKnLuny/KNS5MxZQCtJ4DIG9gKKysSR5Cmajg305OrRvLEgC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bogofilter, spamicity=0.000003, 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 23.12.24 23:14, Shakeel Butt wrote: > On Sat, Dec 21, 2024 at 05:18:20PM +0100, David Hildenbrand wrote: > [...] >> >> Yes, so I can see fuse >> >> (1) Breaking memory reclaim (memory cannot get freed up) >> >> (2) Breaking page migration (memory cannot be migrated) >> >> Due to (1) we might experience bigger memory pressure in the system I guess. >> A handful of these pages don't really hurt, I have no idea how bad having >> many of these pages can be. But yes, inherently we cannot throw away the >> data as long as it is dirty without causing harm. (maybe we could move it to >> some other cache, like swap/zswap; but that smells like a big and >> complicated project) >> >> Due to (2) we turn pages that are supposed to be movable possibly for a long >> time unmovable. Even a *single* such page will mean that CMA allocations / >> memory unplug can start failing. >> >> We have similar situations with page pinning. With things like O_DIRECT, our >> assumption/experience so far is that it will only take a couple of seconds >> max, and retry loops are sufficient to handle it. That's why only long-term >> pinning ("indeterminate", e.g., vfio) migrate these pages out of >> ZONE_MOVABLE/MIGRATE_CMA areas in order to long-term pin them. >> >> >> The biggest concern I have is that timeouts, while likely reasonable it many >> scenarios, might not be desirable even for some sane workloads, and the >> default in all system will be "no timeout", letting the clueless admin of >> each and every system out there that might support fuse to make a decision. >> >> I might have misunderstood something, in which case I am very sorry, but we >> also don't want CMA allocations to start failing simply because a network >> connection is down for a couple of minutes such that a fuse daemon cannot >> make progress. >> > > I think you have valid concerns but these are not new and not unique to > fuse. Any filesystem with a potential arbitrary stall can have similar > issues. The arbitrary stall can be caused due to network issues or some > faultly local storage. What concerns me more is that this is can be triggered by even unprivileged user space, and that there is no default protection as far as I understood, because timeouts cannot be set universally to a sane defaults. Again, please correct me if I got that wrong. BTW, I just looked at NFS out of interest, in particular nfs_page_async_flush(), and I spot some logic about re-dirtying pages + canceling writeback. IIUC, there are default timeouts for UDP and TCP, whereby the TCP default one seems to be around 60s (* retrans?), and the privileged user that mounts it can set higher ones. I guess one could run into similar writeback issues? So I wonder why we never required AS_WRITEBACK_INDETERMINATE for nfs? Not sure if I grasped all details about NFS and writeback and when it would redirty+end writeback, and if there is some other handling in there. > > Regarding the reclaim, I wouldn't say fuse or similar filesystem are > breaking memory reclaim as the kernel has mechanism to throttle the > threads dirtying the file memory to reduce the chance of situations > where most of memory becomes unreclaimable due to being dirty. Yes, likely even cgroups can easily limit the amount. > > Please note that such filesystems are mostly used in environments like > data center or hyperscalar and usually have more advanced mechanisms to > handle and avoid situations like long delays. For such environment > network unavailability is a larger issue than some cma allocation > failure. My point is: let's not assume the disastrous situaion is normal > and overcomplicate the solution. Let me summarize my main point: ZONE_MOVABLE/MIGRATE_CMA must only be used for movable allocations. Mechanisms that possible turn these folios unmovable for a long/indeterminate time must either fail or migrate these folios out of these regions, otherwise we start violating the very semantics why ZONE_MOVABLE/MIGRATE_CMA was added in the first place. Yes, there are corner cases where we cannot guarantee movability (e.g., OOM when allocating a migration destination), but these are not cases that can be triggered by (unprivileged) user space easily. That's why FOLL_LONGTERM pinning does exactly that: even if user space would promise that this is really only "short-term", we will treat it as "possibly forever", because it's under user-space control. Instead of having more subsystems violate these semantics because "performance" ... I would hope we would do better. Maybe it's an issue for NFS as well ("at least" only for privileged user space)? In which case, again, I would hope we would do better. Anyhow, I'm hoping there will be more feedback from other MM folks, but likely right now a lot of people are out (just like I should ;) ). If I end up being the only one with these concerns, then likely people can feel free to ignore them. ;) -- Cheers, David / dhildenb