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 CA946E77188 for ; Mon, 6 Jan 2025 18:17:16 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6756C6B008C; Mon, 6 Jan 2025 13:17:16 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 624FA6B0092; Mon, 6 Jan 2025 13:17:16 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4C6836B0093; Mon, 6 Jan 2025 13:17:16 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 2B43D6B008C for ; Mon, 6 Jan 2025 13:17:16 -0500 (EST) Received: from smtpin22.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id D48421201FE for ; Mon, 6 Jan 2025 18:17:15 +0000 (UTC) X-FDA: 82977834030.22.083CC4D Received: from out-189.mta1.migadu.com (out-189.mta1.migadu.com [95.215.58.189]) by imf10.hostedemail.com (Postfix) with ESMTP id DB9CEC001F for ; Mon, 6 Jan 2025 18:17:13 +0000 (UTC) Authentication-Results: imf10.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=BBwJU8gy; spf=pass (imf10.hostedemail.com: domain of shakeel.butt@linux.dev designates 95.215.58.189 as permitted sender) smtp.mailfrom=shakeel.butt@linux.dev; dmarc=pass (policy=none) header.from=linux.dev ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1736187434; 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=xW004tH/9lu/RWW+ZuOYddiYj4MOyI5Pw6bzV4PD2YQ=; b=YU7UW9JM01bzT+PgfpkoS27oD9LkAxwDI/s2VCCnvoY3ht34Yu7OxKgIv33H2l/tLrN//1 kpQe3G8iiaRunaXz1BSLl/eM9c3K9dt3Ae4w1zOoQZgDKZh+Swr495rEWiTxJudfNMMhVd 7OJu5arfHgp4SVSAzDhg9Y5O1/ds8Hc= ARC-Authentication-Results: i=1; imf10.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=BBwJU8gy; spf=pass (imf10.hostedemail.com: domain of shakeel.butt@linux.dev designates 95.215.58.189 as permitted sender) smtp.mailfrom=shakeel.butt@linux.dev; dmarc=pass (policy=none) header.from=linux.dev ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1736187434; a=rsa-sha256; cv=none; b=G30aecHIiBfzVjPJFnOetv0Ynxl3qqz0rdDSorDvyxNyO4FgR83AOfPrYqUPOWDIUZDkdB AqKzQJZyT7phckEBzWzMfwi/bUq7aXkgynmleoSG/0wi/5eLmOUgBekxDX7csAN/K6e+uR ezLNXcZ5fSIujTRvwtMJHmXTbXg/w2s= Date: Mon, 6 Jan 2025 10:17:06 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1736187431; 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: in-reply-to:in-reply-to:references:references; bh=xW004tH/9lu/RWW+ZuOYddiYj4MOyI5Pw6bzV4PD2YQ=; b=BBwJU8gynqj/rS5kpofAbb+oBBDrQSiG+mwSfq6x4akKzSWe/0rqX1Y40alPj44gtCO2JM K21Dyn3kCLfxX3HypXXrnQ/OYrqRDbW49GXFH5v3AsrzQVbtyI9XADzjop93EQS0qtFyW1 qzKU/qFJEHNNlW1nOBSDUuDEZDVd3jM= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Shakeel Butt To: Miklos Szeredi Cc: David Hildenbrand , Joanne Koong , Bernd Schubert , Zi Yan , 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 Subject: Re: [PATCH v6 4/5] mm/migrate: skip migrating folios under writeback with AS_WRITEBACK_INDETERMINATE mappings Message-ID: References: <0ed5241e-10af-43ee-baaf-87a5b4dc9694@redhat.com> <446704ab-434e-45ac-a062-45fef78815e4@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Migadu-Flow: FLOW_OUT X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: DB9CEC001F X-Rspam-User: X-Stat-Signature: cc7n7g4ntka7pmu9h7xmtsx4msejo61j X-HE-Tag: 1736187433-772105 X-HE-Meta: U2FsdGVkX19/DFgRMhwobwN/xEn+ptdFnB6T5syIgFFarNIMqTAcYb0rWP1yq0aWQkWVvvliLcuPOLmancGieSwkSpi9RccxlAWD9Rulpeu+r+02MPMUmYmpe7xdkX8s/tmPuPvFnEtKhQW6OxrufHKduj0AWTGusjZ3/gJOa10e2+J0IKJZzs3BeLOzXp2jaG3P4CCETItXfhUAdBcIcJJtamQ2T/1VdpkcGvv3LQXyEcpHw/CU7p7cXfM8yfGtYqTYr+B3w+moAST03LTtG41SMGW2X4XRPj0kpzsYheZVQLhmju7vsaTz+AKGOBdXR7vJSY742/fS0PnNB6nW9QXZobuLAthVYzv5l8xVcuAP5GOEIcpY4XDzs0hf9rtGT5KiBbinElqXSp8bkoxqTdfLfPalAvNlN1a/Wmxw3R+mRXPrmP9prnTjXG4iT8wMpr+AZI9fxC1GDc1FbjBfvfR3E/Tha79BdS3RQMnAJpzsdlhaawkIkgF5k7FoYkZ5wELpJ9aVXR++RpqZb+LWAjgbNGw6G0ZvYYqTn4OvtdoPgW7UAqA7ATLWJbXnEIEUvclmoWXzkODeOmvAZG0+0dMws1T+4GJRI+Imv5JnA2bhUWT+vqb4HtVatJS3cokTA8dF6WCFYP0eXacmJGBOj289WW0Br9GUDQ8szlKckGFqlhg9iDAHSQD4G/eeyqTpKKgpiEZAqQWfJmD5hOkdMwDv7eneeDO5cHVTkvXEpxndMO7hu0KTDrXBIvdBoavT0Hs18M0ruuI8/Uobq2idkhErkYoLu2P3Z4fYIkz8JLLjMCaY3oy2bAGGLGwgIaMJT8I2cLmTCB0nrK0oBkQATRH4pDK7/ybcrUBTMuEqObxEdwVAXdxueGHZ2Sni9Z4iGTd6TWses9HA3pO512BtXF02+f7Kzs16mfnKrN9la+A84RFuFd6Y8sm/zhM2nJlcnL/C9t+tHV4+3oemqve IVd+HFos ZtY8LJhI/3Scg+m3VSohri45O3vUJinzdB9U+kR87y2fJXgq+cixhVs0omlKrbJXX/Umqdr5GCauklUQcXa5RT0jE5V2NSlTLsmMsdv+/vnjAMf2vcfZ4EMMlpsi0KWv9MTD29y3fMp6Mfmitml5mvdXsDc7a2EVJZyp1ESMKaPL3i8SO1ODwS+2tFzRKv+THqA9YSIZsRB8UGDazkLehi4RExg== 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 Mon, Jan 06, 2025 at 11:19:42AM +0100, Miklos Szeredi wrote: > On Fri, 3 Jan 2025 at 21:31, David Hildenbrand wrote: > > In any case, having movable pages be turned unmovable due to persistent > > writaback is something that must be fixed, not worked around. Likely a > > good topic for LSF/MM. > > Yes, this seems a good cross fs-mm topic. > > So the issue discussed here is that movable pages used for fuse > page-cache cause a problems when memory needs to be compacted. The > problem is either that > > - the page is skipped, leaving the physical memory block unmovable > > - the compaction is blocked for an unbounded time > > While the new AS_WRITEBACK_INDETERMINATE could potentially make things > worse, the same thing happens on readahead, since the new page can be > locked for an indeterminate amount of time, which can also block > compaction, right? Yes locked pages are unmovable. How much of these locked pages/folios can be caused by untrusted fuse server? > > What about explicitly opting fuse cache pages out of compaction by > allocating them form ZONE_UNMOVABLE? This can be done but it will change the memory condition of the users/workloads/systems where page cache is the majority of the memory (i.e. majority of memory will be unmovable) and when such systems are overcommitted, weird corner cases will arise (failing high order allocations, long term fragmentation etc). In addition the memory behind CXL will become unusable for fuse folios. IMHO the transient unmovable state of fuse folios due to writeback is not an issue if we can show that untrusted fuse server can not cause unlimited folios under writeback for arbitrary long time.