The patch titled readahead: debug radix tree new functions has been added to the -mm tree. Its filename is readahead-debug-radix-tree-new-functions.patch See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this ------------------------------------------------------ Subject: readahead: debug radix tree new functions From: Wu Fengguang <wfg@xxxxxxxxxxxxxxxx> Do some sanity checkings on the newly added radix tree code. Signed-off-by: Wu Fengguang <wfg@xxxxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- mm/readahead.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff -puN mm/readahead.c~readahead-debug-radix-tree-new-functions mm/readahead.c --- devel/mm/readahead.c~readahead-debug-radix-tree-new-functions 2006-05-27 23:06:57.000000000 -0700 +++ devel-akpm/mm/readahead.c 2006-05-27 23:06:57.000000000 -0700 @@ -70,6 +70,8 @@ enum ra_class { RA_CLASS_COUNT }; +#define DEBUG_READAHEAD_RADIXTREE + /* Read-ahead events to be accounted. */ enum ra_event { RA_EVENT_CACHE_MISS, /* read cache misses */ @@ -1293,6 +1295,16 @@ static pgoff_t find_segtail(struct addre cond_resched(); read_lock_irq(&mapping->tree_lock); ra_index = radix_tree_scan_hole(&mapping->page_tree, index, max_scan); +#ifdef DEBUG_READAHEAD_RADIXTREE + BUG_ON(!__probe_page(mapping, index)); + WARN_ON(ra_index < index); + if (ra_index != index && !__probe_page(mapping, ra_index - 1)) + printk(KERN_ERR "radix_tree_scan_hole(index=%lu ra_index=%lu " + "max_scan=%lu nrpages=%lu) fooled!\n", + index, ra_index, max_scan, mapping->nrpages); + if (ra_index != ~0UL && ra_index - index < max_scan) + WARN_ON(__probe_page(mapping, ra_index)); +#endif read_unlock_irq(&mapping->tree_lock); if (ra_index <= index + max_scan) @@ -1376,6 +1388,13 @@ static unsigned long query_page_cache_se read_lock_irq(&mapping->tree_lock); index = radix_tree_scan_hole_backward(&mapping->page_tree, offset - 1, ra_max); +#ifdef DEBUG_READAHEAD_RADIXTREE + WARN_ON(index > offset - 1); + if (index != offset - 1) + WARN_ON(!__probe_page(mapping, index + 1)); + if (index && offset - 1 - index < ra_max) + WARN_ON(__probe_page(mapping, index)); +#endif *remain = offset - index; _ Patches currently in -mm which might be from wfg@xxxxxxxxxxxxxxxx are readahead-kconfig-options.patch radixtree-introduce-radix_tree_scan_hole.patch mm-introduce-probe_page.patch mm-introduce-pg_readahead.patch readahead-add-look-ahead-support-to-__do_page_cache_readahead.patch readahead-delay-page-release-in-do_generic_mapping_read.patch readahead-insert-cond_resched-calls.patch readahead-minmax_ra_pages.patch readahead-events-accounting.patch readahead-rescue_pages.patch readahead-sysctl-parameters.patch readahead-min-max-sizes.patch readahead-state-based-method-aging-accounting.patch readahead-state-based-method-routines.patch readahead-state-based-method.patch readahead-context-based-method.patch readahead-initial-method-guiding-sizes.patch readahead-initial-method-thrashing-guard-size.patch readahead-initial-method-expected-read-size.patch readahead-initial-method-user-recommended-size.patch readahead-initial-method.patch readahead-backward-prefetching-method.patch readahead-seeking-reads-method.patch readahead-thrashing-recovery-method.patch readahead-call-scheme.patch readahead-laptop-mode.patch readahead-loop-case.patch readahead-nfsd-case.patch readahead-turn-on-by-default.patch readahead-debug-radix-tree-new-functions.patch readahead-debug-traces-showing-accessed-file-names.patch readahead-debug-traces-showing-read-patterns.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html