[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [highmem bug report against -test5 and -test6] Re: [PATCH] Re:simple FS application that hangs 2.4-test5, mem mgmt problem or FS buffercache mgmt problem? (fwd)




On Mon, 2 Oct 2000, Rik van Riel wrote:
> 
> OK, so we want something like the following in
> refill_inactive_scan() ?
> 
> if (free_shortage() && inactive_shortage() && page->mapping &&
> 			page->buffers)
> 	try_to_free_buffers(page, 0);

That's just nasty.

Why not just do it unconditionally whenever we do the
age_page_down_ageonly(page) too? Simply something like

	if (page->buffers)
		try_to_free_buffers(page, 1);

(and yes, I think it should also start background writing - we probably
need the gfp_mask to know whether we can do that).

I hate code that tries to be clever. 

		Linus

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux.eu.org/Linux-MM/