Re: some questions about __get_vm_area_node

From: vichy
Date: Thu Apr 05 2012 - 03:08:15 EST


hi david:

2012/4/5 David Rientjes <rientjes@xxxxxxxxxx>:
> On Thu, 5 Apr 2012, vichy wrote:
>
>> Hi all:
>> I have a question about __get_vm_area_node.
>> Q. Why we announce "static struct vmap_area *va;" instead of "struct
>> vmap_area *va;"
>> I cannot see is there any benefit to take this variable as static.
>>
>
> You're right, there's no need for it to be static.  However, you're
> looking at an old tree.
>
> This was fixed with 0006526d78e9 ("mm/vmalloc.c: remove static declaration
> of va from __get_vm_area_node") in 3.3.

Yes, I saw your check in message on Mon Dec 19 17:12:04 2011 -0800.
BTW, why we declare it as static previously?
for saving stack usage?
Thanks for your help,
--
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/