Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp2812221rwr; Fri, 21 Apr 2023 14:45:13 -0700 (PDT) X-Google-Smtp-Source: AKy350YnntXT3FkVbe5lBqeiAxTQTQz02b4d2kZ7Q3xzqVXeNJWJx5GHsVZP/MuSOR0GTa/r3cHR X-Received: by 2002:a05:6a20:548c:b0:f2:fe5a:d471 with SMTP id i12-20020a056a20548c00b000f2fe5ad471mr361019pzk.5.1682113513511; Fri, 21 Apr 2023 14:45:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682113513; cv=none; d=google.com; s=arc-20160816; b=j9m237jn2qnWDPn4BwyVfN1VLgi6RA8DhM+/aCESyVr0+LV/rKmfH8t8E+zre2vfvr mP7k2ATJJ14uOXMbWXyLEfy8Vsl1bNo605A4jfIC9SZ3n76cptzGPHMSJTfJazGc5EK5 BipngTTPcyokveODsHO+bZd0A5KAjEsOfpQbAFAFCkIAPUNkJNLXZEh71HCqsPt5cf6D kOW4hD5VLliLiccjwhGjgKEcZa17OEZeUoK+cdxouk5OGw3gaS99EEdLaO0AZLDPl6OO PNERUN0rSGi3XfTSVfesbHNVt4FkCDdzs8ixf0fxIWYYF8hGi0LGc+1nJhRBxx6ybSgJ qgkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=kIm+HajOeoUPf2+lVY4BBZIQ0O/I9EyHtsPMg+rZ0Kc=; b=wOwBA9f+d+DeICVh3viAYHvaIl5o4XZX34+DM6zgwVQxRd0ldHQTpRbd2cnc0ZM2+o REOUISKejqSX6EATvRmhig5bXzKKhCV47sHzqTwee/PS/ZbzDdROEpF1eSFV7YMKorEl qKNl2EmkGTwaY3a+ohRyQuaodxleadCINzbT78YhtP2eh811nFuWvR7t781I9PxkZUig XiW/dtpzkGRqJA3gngwVwXCznNQRLebHO/rpQjF0EC3LceLBrrZSEX6wY4pFu5Di06ht +52BdXmQS9ImLdczOmKq+JZm/grMm8VewjDGznBxzMqvdNHCTXDqkuyFqmvLAlYHjKEL /QSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=Len1yzwK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a190-20020a6390c7000000b00519009eb504si5518001pge.96.2023.04.21.14.44.59; Fri, 21 Apr 2023 14:45:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=Len1yzwK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233655AbjDUVoY (ORCPT + 99 others); Fri, 21 Apr 2023 17:44:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36270 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233381AbjDUVoS (ORCPT ); Fri, 21 Apr 2023 17:44:18 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E24281BFD; Fri, 21 Apr 2023 14:44:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:Content-Transfer-Encoding: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-Type: Content-ID:Content-Description:In-Reply-To:References; bh=kIm+HajOeoUPf2+lVY4BBZIQ0O/I9EyHtsPMg+rZ0Kc=; b=Len1yzwK9xjx59+qsKo1F+zvmo +aUn2YbUJugrJe8dXSdbxmZlTKxrreA9IzoGdLVdC1eGVczJTAELlOsRwcJUqNaEGPL5rddVTdiuR 2paO6yV15AQmkvh/r2vO9b7zoXcIlpl5k+bxfP1tQYU7r0yIo0NJa57GpOa/vmN/iPcfQM25C9axc 9fAyhFR1UcdzhDQCHEodaN0a2CLAr7FSbG6HJhhQkhBXWfR0VxRZJhpFpyKBbupNefaohXdKaGvs2 iJXFqj+JOo/hz8cLkWi8cBerPGguStJhP3RoX47i5vHERUL+Etq2Peo/JaqIXZEyR3e8KdNnjBCCs VqLXYKLQ==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.96 #2 (Red Hat Linux)) id 1ppyY1-00Btog-1d; Fri, 21 Apr 2023 21:44:05 +0000 From: Luis Chamberlain To: hughd@google.com, akpm@linux-foundation.org, willy@infradead.org, brauner@kernel.org, djwong@kernel.org Cc: p.raghav@samsung.com, da.gomez@samsung.com, a.manzanares@samsung.com, dave@stgolabs.net, yosryahmed@google.com, keescook@chromium.org, hare@suse.de, kbusch@kernel.org, mcgrof@kernel.org, patches@lists.linux.dev, linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [RFC 0/8] shmem: add support for blocksize > PAGE_SIZE Date: Fri, 21 Apr 2023 14:43:52 -0700 Message-Id: <20230421214400.2836131-1-mcgrof@kernel.org> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: Luis Chamberlain X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is an initial attempt to add support for block size > PAGE_SIZE for tmpfs. Why would you want this? It helps us experiment with higher order folio uses with fs APIS and helps us test out corner cases which would likely need to be accounted for sooner or later if and when filesystems enable support for this. Better review early and burn early than continue on in the wrong direction so looking for early feedback. I have other patches to convert shmem_write_begin() and shmem_file_read_iter() to folios too but those are not yet working. In the swap world the next thing to look at would be to convert swap_cluster_readahead() to folios. If folks want to experiment with tmpfs, brd or with things related to larger block sizes I've put a branch up with this, Hannes's brd patches, and some still work-in-progress patches on my large-block-20230421 branch [0]. Similarly you can also use kdevops with CONFIG_QEMU_ENABLE_EXTRA_DRIVE_LARGEIO support to get everything with just as that branch is used for that: make make bringup make linux [0] https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux-next.git/log/?h=large-block-20230421 [1] https://github.com/linux-kdevops/kdevops Luis Chamberlain (8): shmem: replace BLOCKS_PER_PAGE with PAGE_SECTORS shmem: convert to use folio_test_hwpoison() shmem: account for high order folios shmem: add helpers to get block size shmem: account for larger blocks sizes for shmem_default_max_blocks() shmem: consider block size in shmem_default_max_inodes() shmem: add high order page support shmem: add support to customize block size on multiple PAGE_SIZE include/linux/shmem_fs.h | 3 + mm/shmem.c | 146 +++++++++++++++++++++++++++++---------- 2 files changed, 114 insertions(+), 35 deletions(-) -- 2.39.2