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 72878C4828E for ; Fri, 2 Feb 2024 09:10:02 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 09C3C6B0075; Fri, 2 Feb 2024 04:10:02 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 04B486B0078; Fri, 2 Feb 2024 04:10:01 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E300C6B007B; Fri, 2 Feb 2024 04:10:01 -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 CF9F56B0075 for ; Fri, 2 Feb 2024 04:10:01 -0500 (EST) Received: from smtpin24.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 9798E40E8A for ; Fri, 2 Feb 2024 09:10:01 +0000 (UTC) X-FDA: 81746291802.24.1D803D0 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by imf14.hostedemail.com (Postfix) with ESMTP id C15FF100010 for ; Fri, 2 Feb 2024 09:09:59 +0000 (UTC) Authentication-Results: imf14.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=PETVVgkp; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf14.hostedemail.com: domain of dhowells@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=dhowells@redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1706864999; 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: references:dkim-signature; bh=wR/xEWsoc/qcVUxpsQwiYXMTwgRl2K/SGjKuYsI30Fw=; b=NdhHtwh7Dl3vcGj9RfnVEFCH8d1HtaAIHYYOe+hOJe3a86C/CTiNQR+4ZlPbWnDmX1rrdo 3PIIWOj/px3EW1DvCcR2gkC1gYsZvPnqnQzJey203ogFn7Q+DSQ9S1uCoro3a0F/VD+S5X 4/CMK9w5TA6uH9/vJFnBUvBkCvNjuno= ARC-Authentication-Results: i=1; imf14.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=PETVVgkp; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf14.hostedemail.com: domain of dhowells@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=dhowells@redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1706864999; a=rsa-sha256; cv=none; b=ih8C/+t/KBSZDrigdBzsZKwfYjfN8ZRK7kCbC+MCUPSrCRs0ZlniEG+MpU/u5wEw6ASXqC rwbZJ72lgf9Nj81/f8Y/lc9vyAZ9bHXzmplIGl9ylKCUFygY8F9Pp45Fo5Mj0YYoigcIr0 gzTgELtX3VU0Q1kaFFK3KYu9Ca60bfg= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1706864999; 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; bh=wR/xEWsoc/qcVUxpsQwiYXMTwgRl2K/SGjKuYsI30Fw=; b=PETVVgkpz2Sub5/VibFfQi0SusBYChgAwMLp74iTmvEpasdsl8botp+WjSDMF6UQ1WmvHk v+B7NZ4ymZT4vwvgeTOVRbnybCHPojd2CR+LZCDHKoW+6y3x9ggDbipHkPXr1B9Tlwiykk 58BC2ooH4cMHEkfAf4UlDf6JS5onUhs= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-461-uL2SUc8LORqDEysyTOZeOw-1; Fri, 02 Feb 2024 04:09:55 -0500 X-MC-Unique: uL2SUc8LORqDEysyTOZeOw-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 288581C05194; Fri, 2 Feb 2024 09:09:55 +0000 (UTC) Received: from warthog.procyon.org.uk (unknown [10.42.28.245]) by smtp.corp.redhat.com (Postfix) with ESMTP id 682D21C060B2; Fri, 2 Feb 2024 09:09:54 +0000 (UTC) Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells To: lsf-pc@lists.linux-foundation.org cc: dhowells@redhat.com, Matthew Wilcox , netfs@lists.linux.dev, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org Subject: [LSF/MM/BPF TOPIC] Large folios, swap and fscache MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2701739.1706864989.1@warthog.procyon.org.uk> Date: Fri, 02 Feb 2024 09:09:49 +0000 Message-ID: <2701740.1706864989@warthog.procyon.org.uk> X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.7 X-Rspamd-Queue-Id: C15FF100010 X-Rspam-User: X-Rspamd-Server: rspam04 X-Stat-Signature: 4qmat1prm7mhhjrux9t9gbmr8s6f5nsp X-HE-Tag: 1706864999-590506 X-HE-Meta: U2FsdGVkX19BPrZUx137UWAYH2BTaTyfEVhDEv7X7NTcBBnE+ENKPYsLk8lj1pElPDKlIdCVxTV73x3mAiB12Xfy0Ay6SDUGA5zcyf12MsG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, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Hi, The topic came up in a recent discussion about how to deal with large folios when it comes to swap as a swap device is normally considered a simple array of PAGE_SIZE-sized elements that can be indexed by a single integer. With the advent of large folios, however, we might need to change this in order to be better able to swap out a compound page efficiently. Swap fragmentation raises its head, as does the need to potentially save multiple indices per folio. Does swap need to grow more filesystem features? Further to this, we have at least two ways to cache data on disk/flash/etc. - swap and fscache - and both want to set aside disk space for their operation. Might it be possible to combine the two? One thing I want to look at for fscache is the possibility of switching from a file-per-object-based approach to a tagged cache more akin to the way OpenAFS does things. In OpenAFS, you have a whole bunch of small files, each containing a single block (e.g. 256K) of data, and an index that maps a particular {volume,file,version,block} to one of these files in the cache. Now, I could also consider holding all the data blocks in a single file (or blockdev) - and this might work for swap. For fscache, I do, however, need to have some sort of integrity across reboots that swap does not require. David