[lkml]   [2011]   [Dec]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [Page Allocator] when is init_per_zone_wmark_min called to first initialize the watermarks, reserved memory etc?
2011/12/6 zhihua che <>:
> Hi, everyone
>        I'm reading the linux kernel codes, and now focusing on memory
> management. I came across a simple problem:).
>        I know the every zone keeps three water marks to control the
> allocator's behavior and I find the three watermarks is initialized in
> init_per_zone_wmark_min.
> Unfortunately, I can't find when this function is called FIRSTduring
> the kernel booting process. I searched the source codes using LXR and
> cscope and got nothing.
> I guess I missed something but I have no any idea.
> harvey.

Maybe I'm closer the truth:-)
I find this function is defined as a module entry function (I should'v
found this earlier). As far as I know module entry functions are
called at the end of start_kernel() by rest_init(), whereas page
allocator / buddy system is used before they are called. For example,
__get_free_pages() is called in kmem_cache_init() which in turn is
called in start_kernel() earlier than rest_init().

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2011-12-05 20:27    [W:0.035 / U:1.176 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site