From: Sven Schnelle <svens@linux.ibm.com>
To: "Pankaj Raghav (Samsung)" <kernel@pankajraghav.com>
Cc: brauner@kernel.org, akpm@linux-foundation.org,
chandan.babu@oracle.com, linux-fsdevel@vger.kernel.org,
djwong@kernel.org, hare@suse.de, gost.dev@samsung.com,
linux-xfs@vger.kernel.org, hch@lst.de, david@fromorbit.com,
Zi Yan <ziy@nvidia.com>,
yang@os.amperecomputing.com, linux-kernel@vger.kernel.org,
linux-mm@kvack.org, willy@infradead.org, john.g.garry@oracle.com,
cl@os.amperecomputing.com, p.raghav@samsung.com,
mcgrof@kernel.org, ryan.roberts@arm.com,
David Howells <dhowells@redhat.com>,
linux-s390@vger.kernel.org
Subject: Re: [PATCH v13 04/10] mm: split a folio in minimum folio order chunks
Date: Thu, 29 Aug 2024 12:51:25 +0200 [thread overview]
Message-ID: <yt9dttf3r49e.fsf@linux.ibm.com> (raw)
In-Reply-To: <20240822135018.1931258-5-kernel@pankajraghav.com> (Pankaj Raghav's message of "Thu, 22 Aug 2024 15:50:12 +0200")
Hi,
"Pankaj Raghav (Samsung)" <kernel@pankajraghav.com> writes:
> From: Luis Chamberlain <mcgrof@kernel.org>
>
> split_folio() and split_folio_to_list() assume order 0, to support
> minorder for non-anonymous folios, we must expand these to check the
> folio mapping order and use that.
>
> Set new_order to be at least minimum folio order if it is set in
> split_huge_page_to_list() so that we can maintain minimum folio order
> requirement in the page cache.
>
> Update the debugfs write files used for testing to ensure the order
> is respected as well. We simply enforce the min order when a file
> mapping is used.
>
> Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
> Signed-off-by: Pankaj Raghav <p.raghav@samsung.com>
> Reviewed-by: Hannes Reinecke <hare@suse.de>
> Reviewed-by: Zi Yan <ziy@nvidia.com>
> Tested-by: David Howells <dhowells@redhat.com>
This causes the following warning on s390 with linux-next starting from
next-20240827:
[ 112.690518] BUG: Bad page map in process ksm01 pte:a5801317 pmd:99054000
[ 112.690531] page: refcount:0 mapcount:-1 mapping:0000000000000000 index:0x3ff86102 pfn:0xa5801
[ 112.690536] flags: 0x3ffff00000000004(referenced|node=0|zone=1|lastcpupid=0x1ffff)
[ 112.690543] raw: 3ffff00000000004 0000001d47439e30 0000001d47439e30 0000000000000000
[ 112.690546] raw: 000000003ff86102 0000000000000000 fffffffe00000000 0000000000000000
[ 112.690548] page dumped because: bad pte
[ 112.690549] addr:000003ff86102000 vm_flags:88100073 anon_vma:000000008c8e46e8 mapping:0000000000000000 index:3ff86102
[ 112.690553] file:(null) fault:0x0 mmap:0x0 read_folio:0x0
[ 112.690561] CPU: 1 UID: 0 PID: 604 Comm: ksm01 Not tainted 6.11.0-rc5-next-20240827-dirty #1441
[ 112.690565] Hardware name: IBM 3931 A01 704 (z/VM 7.3.0)
[ 112.690568] Call Trace:
[ 112.690571] [<000003ffe0eb77fe>] dump_stack_lvl+0x76/0xa0
[ 112.690579] [<000003ffe03f4a90>] print_bad_pte+0x280/0x2d0
[ 112.690584] [<000003ffe03f7654>] zap_present_ptes.isra.0+0x5c4/0x870
[ 112.690598] [<000003ffe03f7a46>] zap_pte_range+0x146/0x3d0
[ 112.690601] [<000003ffe03f7f1c>] zap_p4d_range+0x24c/0x4b0
[ 112.690603] [<000003ffe03f84ea>] unmap_page_range+0xea/0x2c0
[ 112.690605] [<000003ffe03f8754>] unmap_single_vma.isra.0+0x94/0xf0
[ 112.690607] [<000003ffe03f8866>] unmap_vmas+0xb6/0x1a0
[ 112.690609] [<000003ffe0405724>] exit_mmap+0xc4/0x3e0
[ 112.690613] [<000003ffe0154aa2>] mmput+0x72/0x170
[ 112.690616] [<000003ffe015e2c6>] exit_mm+0xd6/0x150
[ 112.690618] [<000003ffe015e52c>] do_exit+0x1ec/0x490
[ 112.690620] [<000003ffe015e9a4>] do_group_exit+0x44/0xc0
[ 112.690621] [<000003ffe016f000>] get_signal+0x7f0/0x800
[ 112.690624] [<000003ffe0108614>] arch_do_signal_or_restart+0x74/0x320
[ 112.690628] [<000003ffe020c876>] syscall_exit_to_user_mode_work+0xe6/0x170
[ 112.690632] [<000003ffe0eb7c04>] __do_syscall+0xd4/0x1c0
[ 112.690634] [<000003ffe0ec303c>] system_call+0x74/0x98
[ 112.690638] Disabling lock debugging due to kernel taint
To reproduce, running the ksm01 testsuite from ltp seems to be
enough. The splat is always triggered immediately. The output from ksm01
is:
tst_kconfig.c:88: TINFO: Parsing kernel config '/proc/config.gz'
tst_test.c:1809: TINFO: LTP version: 20240524-208-g6c3293c6f
tst_test.c:1813: TINFO: Tested kernel: 6.11.0-rc5-next-20240827 #1440 SMP Thu Aug 29 12:13:28 CEST 2024 s390x
tst_test.c:1652: TINFO: Timeout per run is 0h 00m 30s
mem.c:422: TINFO: wait for all children to stop.
mem.c:388: TINFO: child 0 stops.
mem.c:388: TINFO: child 1 stops.
mem.c:388: TINFO: child 2 stops.
mem.c:495: TINFO: KSM merging...
mem.c:434: TINFO: resume all children.
mem.c:422: TINFO: wait for all children to stop.
mem.c:344: TINFO: child 0 continues...
mem.c:347: TINFO: child 0 allocates 128 MB filled with 'c'
mem.c:344: TINFO: child 1 continues...
mem.c:347: TINFO: child 1 allocates 128 MB filled with 'a'
mem.c:344: TINFO: child 2 continues...
mem.c:347: TINFO: child 2 allocates 128 MB filled with 'a'
mem.c:400: TINFO: child 1 stops.
mem.c:400: TINFO: child 2 stops.
mem.c:400: TINFO: child 0 stops.
Test timeouted, sending SIGKILL!
tst_test.c:1700: TINFO: Killed the leftover descendant processes
tst_test.c:1706: TINFO: If you are running on slow machine, try exporting LTP_TIMEOUT_MUL > 1
tst_test.c:1708: TBROK: Test killed! (timeout?)
Thanks
Sven
next prev parent reply other threads:[~2024-08-29 10:52 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-22 13:50 [PATCH v13 00/10] enable bs > ps in XFS Pankaj Raghav (Samsung)
2024-08-22 13:50 ` [PATCH v13 01/10] fs: Allow fine-grained control of folio sizes Pankaj Raghav (Samsung)
2024-08-23 13:09 ` Daniel Gomez
2024-08-22 13:50 ` [PATCH v13 02/10] filemap: allocate mapping_min_order folios in the page cache Pankaj Raghav (Samsung)
2024-08-22 13:50 ` [PATCH v13 03/10] readahead: allocate folios with mapping_min_order in readahead Pankaj Raghav (Samsung)
2024-08-22 13:50 ` [PATCH v13 04/10] mm: split a folio in minimum folio order chunks Pankaj Raghav (Samsung)
2024-08-29 10:51 ` Sven Schnelle [this message]
2024-08-29 18:46 ` Luis Chamberlain
2024-08-29 19:55 ` Matthew Wilcox
2024-08-29 22:12 ` Zi Yan
2024-08-29 23:41 ` Luis Chamberlain
2024-08-30 5:57 ` Sven Schnelle
2024-08-30 11:58 ` Daniel Gomez
2024-08-30 14:59 ` Pankaj Raghav
2024-08-30 17:12 ` Luis Chamberlain
2024-08-31 22:38 ` Zi Yan
2024-08-30 22:42 ` Matthew Wilcox
2024-08-31 22:35 ` Zi Yan
2024-08-29 22:11 ` Matthew Wilcox
2024-09-06 6:52 ` Lai, Yi
2024-09-06 8:01 ` Pankaj Raghav (Samsung)
2024-09-09 9:06 ` Lai, Yi
2024-08-22 13:50 ` [PATCH v13 05/10] filemap: cap PTE range to be created to allowed zero fill in folio_map_range() Pankaj Raghav (Samsung)
2024-08-22 13:50 ` [PATCH v13 06/10] iomap: fix iomap_dio_zero() for fs bs > system page size Pankaj Raghav (Samsung)
2024-08-22 13:50 ` [PATCH v13 07/10] xfs: use kvmalloc for xattr buffers Pankaj Raghav (Samsung)
2024-08-22 13:50 ` [PATCH v13 08/10] xfs: expose block size in stat Pankaj Raghav (Samsung)
2024-08-22 13:50 ` [PATCH v13 09/10] xfs: make the calculation generic in xfs_sb_validate_fsb_count() Pankaj Raghav (Samsung)
2024-08-22 13:50 ` [PATCH v13 10/10] xfs: enable block size larger than page size support Pankaj Raghav (Samsung)
2024-09-03 12:29 ` [PATCH v13 10/10] xfs: enable block size larger than page size support^[ Daniel Gomez
2024-08-22 21:23 ` [PATCH v13 00/10] enable bs > ps in XFS Luis Chamberlain
2024-08-23 12:36 ` Christian Brauner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=yt9dttf3r49e.fsf@linux.ibm.com \
--to=svens@linux.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=brauner@kernel.org \
--cc=chandan.babu@oracle.com \
--cc=cl@os.amperecomputing.com \
--cc=david@fromorbit.com \
--cc=dhowells@redhat.com \
--cc=djwong@kernel.org \
--cc=gost.dev@samsung.com \
--cc=hare@suse.de \
--cc=hch@lst.de \
--cc=john.g.garry@oracle.com \
--cc=kernel@pankajraghav.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-s390@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=mcgrof@kernel.org \
--cc=p.raghav@samsung.com \
--cc=ryan.roberts@arm.com \
--cc=willy@infradead.org \
--cc=yang@os.amperecomputing.com \
--cc=ziy@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.