Re: [PATCH -mm 02/25] Use an indexed array for LRU variables

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Andrew Morton
Date: Friday, June 6, 2008 - 6:04 pm

On Fri, 06 Jun 2008 16:28:40 -0400
Rik van Riel <riel@redhat.com> wrote:


I would have spat the dummy at pointless churn and code uglification
but I see that we end up with five LRU lsits so ho hum.


It'd be a little cache-friendlier to lay this out as

	struct {
		struct list_head list;
		unsigned long nr_scan;
	} lru_stuff[NR_LRU_LISTS];



                               ^ that's a bug, isn't it?

oh, no it isn't.

Can we rename NR_INACTIVE?  Maybe VMSCAN_BASE or something?


urgh.  the third arg to add_page_to_lru_list() is an `enum lru_list'
and here we are secretly coercing PageActive()'s boolean return into a
just-happens-to-be-right `enum lru_list'.

That's pretty nasty?


I guess a lot of this code gets changed a lot later on.


--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH -mm 02/25] Use an indexed array for LRU variables, Andrew Morton, (Fri Jun 6, 6:04 pm)
Re: [PATCH -mm 02/25] Use an indexed array for LRU variables, KOSAKI Motohiro, (Fri Jun 6, 10:43 pm)