Re: one question about LRU mechanism

From: William Lee Irwin III
Date: Wed Jun 15 2005 - 02:31:47 EST


On Wed, Jun 15, 2005 at 02:46:30PM +0800, liyu@LAN wrote:
> In 2.6.11.11, mm do not have function isolate_lru_pages(), but I
> downloaded linux-2.6.11.12.tar.bz2 source tarball, and apply follow two
> patches in order:
> patch-2.6.12-rc6
> 2.6.12-rc6-mm1
> Oh, Have any error in this process? patch program say it can not change
> some files , and save some *.rej files. but these *rej do not include
> mm/vmscan.c.
> This new function called two times in shrink_cache() and
> refill_inactive_zone().
> The main part of isolate_lru_pages() is
[...]
> I think, this change that new function isolate_lru_pages() is one kind
> of refactoring (method extract ??), not one essence change.

Agreed. Mainly I mentioned it in case the symbol was recently enough
introduced to not be visible in the sources you'd reviewed.
:

On Wed, Jun 15, 2005 at 02:46:30PM +0800, liyu@LAN wrote:
> the call:
> list_del(&page->lru);
> as I known, just delete its argument from list, but not its previous
> element. so, It is most newest page that just be appended to
> active_list.
> I think, may be, codes like this will be better.
[...]
> This is just my flimsy perspective.

Not so flimsy. You seem to understand things well. Unfortunately I am
the kind of person who thinks less about how things should be to be the
best they could be than about how they work now and could work for some
specific effect. I don't have any opinion about it being better or worse.


-- wli
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/