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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 842EDCA5FA2 for ; Mon, 28 Sep 2026 15:19:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=b0NvfzIhMgoDaAcmLO9lnbeC2A03mNxAZEcGsZ2ya18=; b=HhnFXF/PYwf44EP9AF8RkU8U6/ GzKnvGRhZC25eo15NY6x5wr8eSbAPeu8rbggEeNp1iUUSem2lxAdYoNHb+cjuVdxFPlBOpzNc3g7N 2WnHVE6b0TBDMIB7wDHbIFM7Q0mL92NPxwdjXuykP1FZEweqqbRf3CNyYEmPrtvDSb0ZKOInRpq2T GmiSpNN2IIMKTdso3fSHJvej+MmtSOHMx216dNEnYfw6ahblAAIcSU4ymubJvjTg7pmZ8xMJtpopa 6Du9Iq6/auQyr5GsFsh0feFKvtiGgxlHCoYSLNvLqjblW/fNPG05+Tfbda1P7GuDrDHIS/Qysy4SE hW1nnkxw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1xBD8k-00000000sYW-2KiQ; Mon, 28 Sep 2026 15:19:38 +0000 Received: from mail-pz2-x0c.google.com ([2607:f8b0:4864:3b::c]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1xBD8i-00000000sY5-0h3b for linux-arm-kernel@lists.infradead.org; Mon, 28 Sep 2026 15:19:37 +0000 Received: by mail-pz2-x0c.google.com with SMTP id 41be03b00d2f7-cc750a1482fso1725433a12.2 for ; Mon, 28 Sep 2026 08:19:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1790608775; x=1791213575; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=b0NvfzIhMgoDaAcmLO9lnbeC2A03mNxAZEcGsZ2ya18=; b=rDpTJ/p6dl2pB1RnNHo1IHB1xsYF3KMB5uq7YwCjd+xr8XUOP0xND5OWuZOwbQWNEl DsoYGS9LZojoY+S1sK/59iIWE8+KyGV7S7cQ8qIB+EepgBJRtodeYnoGD4YplpzSRbCU rqpSbgz2aw+YQg++aXwOuf0TYlamoRR3DndZ+eyCGaNZbI1m3mwlCL+JkIw3rPBbT4qv unuNhU2eH846bepJfT1/atM8ElHJHEmqsht6ncM8PvILyj9q+Saxr4H2rkJBCivYFSEQ 5q4rnV6RmgtsRJ5XMXCMYxk0bln40fyGRBPLSQ1ECKCw1pqRwa4CrCcz1GFoXMHy/Z0b vEqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1790608775; x=1791213575; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=b0NvfzIhMgoDaAcmLO9lnbeC2A03mNxAZEcGsZ2ya18=; b=NhBlStzsIJN9oPShab9y0q6WNtjmXQGzYvPd2nzuMrzTMYKJQoE+lmb3gK5ur/rG/F G++6dp/EILR/uWKvcr/ya1STbvOvCE4ZoIDrXrGL8IyWf7KzSTrDx8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1D/aaIWVbU3mTmrth9o6kh/DBWYRoYXZoRBClREZr/qIdhVLvpRl+v8pI= X-Received: by 2002:a17:90b:384c:b0:39e:5acb:2849 with SMTP id 98e67ed59e1d1-3a0bb576e5cmr8742632a91.17.1790608774215; Mon, 28 Sep 2026 08:19:34 -0700 (PDT) Received: from spider.bream-herring.ts.net ([103.6.151.236]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3a0b99e5220sm20891502a91.16.2026.09.28.08.19.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Sep 2026 08:19:33 -0700 (PDT) From: Matthias Goergens To: Chris Li Cc: Andrew Morton , Kairui Song , Johannes Weiner , David Hildenbrand , Michal Hocko , Shakeel Butt , Kemeng Shi , Nhat Pham , Yosry Ahmed , Youngjun Park , Baoquan He , Barry Song , linux-mm@kvack.org, linux-kernel@vger.kernel.org, cgroups@vger.kernel.org, linux-api@vger.kernel.org, Alejandro Colomar , linux-man@vger.kernel.org, Karel Zak , util-linux@vger.kernel.org, Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , Tvrtko Ursulin , David Airlie , Simona Vetter , intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, "Rafael J . Wysocki" , Pavel Machek , Catalin Marinas , Will Deacon , linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Shuah Khan , linux-kselftest@vger.kernel.org Subject: Re: [RFC PATCH v2 0/4] mm/swap: reserve swap areas for deliberate offload Date: Mon, 28 Sep 2026 23:19:24 +0800 Message-ID: <20260928151924.2686290-1-matthias.goergens@gmail.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: References: <20260926045517.3458413-1-matthias.goergens@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20260928_081936_214996_7B26656C X-CRM114-Status: GOOD ( 15.51 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Chris, Thanks for resolving the conflicts yourself and reviewing it. > What is the high-level user-visible impact of this series? Being able to use more interesting swap backends and logic when the machine is not under memory pressure. It is much easier to write a swap backend that may occasionally allocate memory than one that is guaranteed never to, so today such backends are either unsafe as swap or ruled out (btrfs, for example, refuses swapfiles that are copy-on-write, checksummed or compressed). > I am curious: if we never run out of swap file space on the > non-offload swap area, does that mean we don't need this patch series? No: running out of conventional swap isn't the point. Without the series, any active swap area may be written under pressure, so a backend that may allocate can't be used as swap at all, however much conventional swap there is next to it. > However, direct reclaim can use both types of swap areas. In v2 it can't: only memory.reclaim, per-node reclaim and MGLRU's debugfs eviction may write new data to an offload-only area; direct reclaim, kswapd, MADV_PAGEOUT and DAMON reclaim may not. But I think your suggestion to flip it round is closer to what I want: mark the areas whose writes may allocate, and keep pressure reclaim away from those, rather than tying it to what started the reclaim. I'll work that into v3, together with Kairui's suggestion to build on the swap tiers work. Thanks, Matthias