Re: [PATCH 3/3] mm: take pagevecs off reclaim stack

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

 



On Thu, 29 Dec 2011, Andrew Morton wrote:
> On Wed, 28 Dec 2011 20:39:36 -0800 (PST)
> Hugh Dickins <hughd@xxxxxxxxxx> wrote:
> 
> > Replace pagevecs in putback_lru_pages() and move_active_pages_to_lru()
> > by lists of pages_to_free
> 
> One effect of the pagevec handling was to limit lru_lock hold times and
> interrupt-disabled times.
> 
> This patch removes that upper bound and has the potential to cause
> various latency problems when processing large numbers of pages.
> 
> The affected functions have rather a lot of callers.  I don't think
> that auditing all these callers and convincing ourselves that none of
> them pass in 10,000 pages is sufficient, because that doesn't prevent us
> from introducing such latency problems as the MM code evolves.

That's an interesting slant on it, that hadn't crossed my mind;
but it looks like intervening changes have answered that concern.

putback_lru_pages() has one caller, shrink_inactive_list();
move_active_pages_to_lru() has one caller, shrink_active_list().
Following those back, they're in all cases capped to SWAP_CLUSTER_MAX
pages per call.  That's 32 pages, not so very much more than the 14
page limit the pagevecs were imposing.

And both shrink_inactive_list() and shrink_active_list() gather these
pages with isolate_lru_pages(), which does not drop lock or enable
interrupts at all - probably why the SWAP_CLUSTER_MAX cap got imposed.

(Don't be deceived by mm/migrate.c's putback_lru_pages()!
That's a distinct function, unaffected by this patch.)

Hugh

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]