From patchwork Sat Jun 15 00:29:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luis Chamberlain X-Patchwork-Id: 13699196 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 4DF56C2BA12 for ; Sat, 15 Jun 2024 00:38:01 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 7008E6B0164; Fri, 14 Jun 2024 20:32:01 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 26E6A6B0173; Fri, 14 Jun 2024 20:32:01 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 94BE26B0164; Fri, 14 Jun 2024 20:31:59 -0400 (EDT) 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 603156B025A for ; Fri, 14 Jun 2024 20:29:43 -0400 (EDT) Received: from smtpin20.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id CE5CA1A0861 for ; Sat, 15 Jun 2024 00:29:42 +0000 (UTC) X-FDA: 82231239804.20.1C46DC1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) by imf10.hostedemail.com (Postfix) with ESMTP id CF92FC0003 for ; Sat, 15 Jun 2024 00:29:40 +0000 (UTC) Authentication-Results: imf10.hostedemail.com; dkim=pass header.d=infradead.org header.s=bombadil.20210309 header.b=bixN2wSh; spf=none (imf10.hostedemail.com: domain of mcgrof@infradead.org has no SPF policy when checking 198.137.202.133) smtp.mailfrom=mcgrof@infradead.org; dmarc=fail reason="No valid SPF, DKIM not aligned (relaxed)" header.from=kernel.org (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1718411378; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:references:dkim-signature; bh=KMlKjNaY/F8QL3qECnT8EKms3WZs5CznUIuEAKsL0wI=; b=zGT1oT3rvEGJ4/n9rCnuKPJyfOe1Vha9vX+2mjSxX4xbZKT2P6BHbiEVvDQ+/jcflBV0jC cACjU/z2gvTnHSbdk3/MIqlka1M2sM2vG1SllWtmFJU+dnXE1w+TcMcd6Yg9Pi2C79bKJb 4l0sFCoj2G7YILKkMQzGZNuWHBKgq4o= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1718411378; a=rsa-sha256; cv=none; b=trYLHp0k48AdVrQiZstANsvgD9qWAPvuyVAwtg72UxL/jOtm/3KANbTnO+vEwR2b2B+D6/ uh2+0xRXE73ks/mXzzCndetnufMnWXQg2N13K79qs+gt0B0MpdxzsK7KIxohiBfSHTqBbI ZNK3T8+l2EXqWwI7Ui5DRj4+b8/rYus= ARC-Authentication-Results: i=1; imf10.hostedemail.com; dkim=pass header.d=infradead.org header.s=bombadil.20210309 header.b=bixN2wSh; spf=none (imf10.hostedemail.com: domain of mcgrof@infradead.org has no SPF policy when checking 198.137.202.133) smtp.mailfrom=mcgrof@infradead.org; dmarc=fail reason="No valid SPF, DKIM not aligned (relaxed)" header.from=kernel.org (policy=none) 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=KMlKjNaY/F8QL3qECnT8EKms3WZs5CznUIuEAKsL0wI=; b=bixN2wShYjRMBjSUYnaQovwNZk EEqsZMmtJGDJBNqorl/0WokkuKb8uhDH+ctYRXT2Cxc2cx32L98paVDX2qpolK0cPMIPcz6Ilpymb KD6FYBQFvNwNhpsl5fdtdvw1CKziq78+ykStUytje7gPA2Xqm5WQvPA8HfCTUt8tQ5bnrO1QpJ4TV JHCU1kWSzBgrxKujcf2nydpnuTEy6geOcIr7UynmlkCtTQ4gfJ+zz6gI5vRvYpGsVSFY1wZCySEfr GDb4cToeKC+23QpY9TGiqK85ZZNvJkLf7bxx6XIoelh7dIJvmEVtqbq/4uSF/zM/i2F4OJ3hFe81g sluCwWBw==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1sIHIV-00000004KkG-3N4C; Sat, 15 Jun 2024 00:29:35 +0000 From: Luis Chamberlain To: patches@lists.linux.dev, fstests@vger.kernel.org Cc: linux-xfs@vger.kernel.org, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, akpm@linux-foundation.org, ziy@nvidia.com, vbabka@suse.cz, seanjc@google.com, willy@infradead.org, david@redhat.com, hughd@google.com, linmiaohe@huawei.com, muchun.song@linux.dev, osalvador@suse.de, p.raghav@samsung.com, da.gomez@samsung.com, hare@suse.de, john.g.garry@oracle.com, mcgrof@kernel.org Subject: [PATCH v2 0/5] fstests: add some new LBS inspired tests Date: Fri, 14 Jun 2024 17:29:29 -0700 Message-ID: <20240615002935.1033031-1-mcgrof@kernel.org> X-Mailer: git-send-email 2.44.0 MIME-Version: 1.0 X-Rspam-User: X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: CF92FC0003 X-Stat-Signature: qein87gczkgrt5icgajdhd7rj7chfohc X-HE-Tag: 1718411380-893221 X-HE-Meta: U2FsdGVkX1/BQzyyyoV4M9Zrj6WYu4qWHl1cXu2ZQulFIOwHskVdD5of+wJacgdZjWZ+WcYBpXRX6n57IGJZL/9fUay3UKkpGulWQwnWzV52NGPt01dFxsJWYoCbhDn5JVylRKJRvyend78RjiKvV6Lzt8M2j2QEXtE10FeSdbofIAABFxhhB4rApYv9Tig2zgWO90eQK0H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LgEMPMbdZPBCd6hBwIFCxqGAEq9tCzWeTPnNtUPIHCWg7SBsgNNeu/qqtOMiAQTRz7vP9uDg1Hh1xPGZ+E7dpQ== 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: While working on LBS we've come accross some existing issues, some of them deal existing kernels without LBS, while the only new corner case specific to LBS is the xarray bug Willy fixed to help with truncation to larger order folios and races with writeback. This adds 3 new tests to help reproduce these issues right away. One test reproduces an otherwise extremely difficult to reproduce deadlock, we have one patch fix already merged to help with that deadlock, however the test also also gives us more homework todo, as more deadlocks are still possible with that test even on v6.10-rc2. The 3 tests are: 1) mmap(): The mmap page boundary test let's us discover that a patch on the LBS series fixes the mmap page boundary restriction when huge pages are enabled on tmpfs with a 4k base page size system (x86). This is a corner case POSIX semantic issue, so likley not critical to most users. 2) fsstress + compaction The fsstress + compaction test reproduces a really difficult to reproduce hang which is possible without some recent fixes. However the test reveals there is yet more work is left to do to fix all posssible deadlocks. To be clear these issues are reproducible without LBS, on a plain 4k block size XFS filesystem. 3) stress truncation + writeback The stress truncation + writeback test is the only test in this series specific to LBS, but likely will be useful later for other future uses in the kernel. Changes on this v2: - Few cleanups suggested - Renamed routines as suggested - Used helpers for proc vmstat as suggested - Made the mmap() test continue so we can just count the number of failures of the test - Made the fio test ignore out of space issues, we care to just blast the page cache, and detect write errors or crashes. This test now goes also tested with tmpfs. - Minor commit log enhancements Luis Chamberlain (5): common: move mread() to generic helper _mread() fstests: add mmap page boundary tests fstests: add fsstress + compaction test _require_debugfs(): simplify and fix for debian fstests: add stress truncation + writeback test common/rc | 54 ++++++++- tests/generic/574 | 36 +----- tests/generic/749 | 256 ++++++++++++++++++++++++++++++++++++++++++ tests/generic/749.out | 2 + tests/generic/750 | 63 +++++++++++ tests/generic/750.out | 2 + tests/generic/751 | 170 ++++++++++++++++++++++++++++ tests/generic/751.out | 2 + 8 files changed, 552 insertions(+), 33 deletions(-) create mode 100755 tests/generic/749 create mode 100644 tests/generic/749.out create mode 100755 tests/generic/750 create mode 100644 tests/generic/750.out create mode 100755 tests/generic/751 create mode 100644 tests/generic/751.out