linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* Free list initialization
@ 2003-08-06 22:32 Anand Eswaran
  2003-08-06 23:12 ` Martin J. Bligh
  2003-08-07 11:51 ` Mel Gorman
  0 siblings, 2 replies; 4+ messages in thread
From: Anand Eswaran @ 2003-08-06 22:32 UTC (permalink / raw)
  To: Linux-MM

Hi all:

  Could anybody point me out to the part of the mm code where the  zone
free-lists are initialized to the remaining system memory  just
subsequent to setting up of the zone structures . ( so that  say when
the very first time _alloc_pages executes, the system can use (
__alloc_pages ()  ->   rmqueue()  free-list to allocate the required
memory block.

  I dont seem to be able to find any such code in free_area_init_core().

  Im using a 2.4.18 kernel.

Thanks in advance,
-----
Anand
--
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-mm.org/ .
Don't email: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Free list initialization
  2003-08-06 22:32 Free list initialization Anand Eswaran
@ 2003-08-06 23:12 ` Martin J. Bligh
  2003-08-06 23:49   ` William Lee Irwin III
  2003-08-07 11:51 ` Mel Gorman
  1 sibling, 1 reply; 4+ messages in thread
From: Martin J. Bligh @ 2003-08-06 23:12 UTC (permalink / raw)
  To: Anand Eswaran, Linux-MM

>   Could anybody point me out to the part of the mm code where the  zone
> free-lists are initialized to the remaining system memory  just
> subsequent to setting up of the zone structures . ( so that  say when
> the very first time _alloc_pages executes, the system can use (
> __alloc_pages ()  ->   rmqueue()  free-list to allocate the required
> memory block.
> 
>   I dont seem to be able to find any such code in free_area_init_core().
> 
>   Im using a 2.4.18 kernel.

Suggest you start at free_all_bootmem. IIRC, basically we just call a 
free on every page we have, and the normal buddy free routines populate
the lists. Not very efficient, but who cares? ... it's boottime! ;-)

M.

--
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-mm.org/ .
Don't email: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Free list initialization
  2003-08-06 23:12 ` Martin J. Bligh
@ 2003-08-06 23:49   ` William Lee Irwin III
  0 siblings, 0 replies; 4+ messages in thread
From: William Lee Irwin III @ 2003-08-06 23:49 UTC (permalink / raw)
  To: Martin J. Bligh; +Cc: Anand Eswaran, Linux-MM

On Wed, Aug 06, 2003 at 04:12:46PM -0700, Martin J. Bligh wrote:
> Suggest you start at free_all_bootmem. IIRC, basically we just call a 
> free on every page we have, and the normal buddy free routines populate
> the lists. Not very efficient, but who cares? ... it's boottime! ;-)

If it ever turns out that someone does care, I've gone through and done
useful things like freeing higher-order pages at a time for both
bootmem.c and highmem (as isolated patches) I could resurrect if the
issue ever arises in the field.

The whole affair is still asymptotically O(pages) since the coremap
initialization still touches every struct page, so there aren't large
amounts of improvement that can be made without dynamically allocating
coremap elements (which raises more issues than it resolves, though
there are valid reasons to want to do it beyond this).


-- wli
--
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-mm.org/ .
Don't email: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Free list initialization
  2003-08-06 22:32 Free list initialization Anand Eswaran
  2003-08-06 23:12 ` Martin J. Bligh
@ 2003-08-07 11:51 ` Mel Gorman
  1 sibling, 0 replies; 4+ messages in thread
From: Mel Gorman @ 2003-08-07 11:51 UTC (permalink / raw)
  To: Anand Eswaran; +Cc: Linux-MM

On Wed, 6 Aug 2003, Anand Eswaran wrote:

>   Could anybody point me out to the part of the mm code where the  zone
> free-lists are initialized to the remaining system memory  just
> subsequent to setting up of the zone structures .

Read:

http://www.csn.ul.ie/~mel/projects/vm/guide/html/understand/node42.html

and then

http://www.csn.ul.ie/~mel/projects/vm/guide/html/code/node9.html#SECTION00450300000000000000

-- 
Mel Gorman
http://www.csn.ul.ie/~mel
--
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-mm.org/ .
Don't email: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-08-07 11:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-06 22:32 Free list initialization Anand Eswaran
2003-08-06 23:12 ` Martin J. Bligh
2003-08-06 23:49   ` William Lee Irwin III
2003-08-07 11:51 ` Mel Gorman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox