On Fri, Dec 02, 2022 at 04:58:42PM +0000, Matthew Wilcox wrote: > Landing on 793917d997df makes a lot more sense. That's where we > actually start using large folios. It doesn't really help narrow > down the problem. I have an idea for what it might be; patch to > try will follow. But I'll need feedback by email. This will give us a bit more information when it does happen. Further patch to catch it earlier will come "soon". diff --git a/lib/xarray.c b/lib/xarray.c index 6f47f6375808..b358b4e1dac6 100644 --- a/lib/xarray.c +++ b/lib/xarray.c @@ -6,6 +6,7 @@ * Author: Matthew Wilcox <willy@xxxxxxxxxxxxx> */ +#define XA_DEBUG #include <linux/bitmap.h> #include <linux/export.h> #include <linux/list.h> @@ -207,6 +208,12 @@ static void *xas_descend(struct xa_state *xas, struct xa_node *node) if (xa_is_sibling(entry)) { offset = xa_to_sibling(entry); entry = xa_entry(xas->xa, node, offset); + + if (xa_is_sibling(entry)) { + printk("***BAD SIBLING*** index %ld offset %d\n", + xas->xa_index, offset); + xa_dump_node(node); + } } xas->xa_offset = offset;