Messages in this thread Patch in this message | | | Date | Wed, 28 Aug 2002 15:15:28 -0700 | From | Andrew Morton <> | Subject | Re: [patch] adjustments to dirty memory thresholds |
| |
Andrew Morton wrote: > > ... > Well it's presumably the GFP_NOIO which has killed it - we can't wait > on PG_writeback pages and we can't write out dirty pages. Taking a > nap in mempool_alloc is appropriate.
Actually, it might be better to teach mempool_alloc to not call page reclaim at all if __GFP_FS is not set. Just kick bdflush and go to sleep.
I really, really, really dislike the VM's tendency to go and scan hundreds of thousands of pages. It's a clear sign of an inappropriate algorithm.
Test something like this, please?
--- 2.5.32/mm/mempool.c~wli Wed Aug 28 15:07:31 2002 +++ 2.5.32-akpm/mm/mempool.c Wed Aug 28 15:12:53 2002 @@ -196,10 +196,11 @@ repeat_alloc: return element; /* - * If the pool is less than 50% full then try harder - * to allocate an element: + * If the pool is less than 50% full and we can perform effective + * page reclaim then try harder to allocate an element: */ - if ((gfp_mask != gfp_nowait) && (pool->curr_nr <= pool->min_nr/2)) { + if ((gfp_mask & __GFP_FS) && (gfp_mask != gfp_nowait) && + (pool->curr_nr <= pool->min_nr/2)) { element = pool->alloc(gfp_mask, pool->pool_data); if (likely(element != NULL)) return element; . - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |