* some questions about __get_vm_area_node
@ 2012-04-05 6:00 vichy
2012-04-05 6:09 ` David Rientjes
0 siblings, 1 reply; 4+ messages in thread
From: vichy @ 2012-04-05 6:00 UTC (permalink / raw)
To: Kernel Newbies, linux-kernel
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.
Thanks for your help in advance.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: some questions about __get_vm_area_node
2012-04-05 6:00 some questions about __get_vm_area_node vichy
@ 2012-04-05 6:09 ` David Rientjes
2012-04-05 7:07 ` vichy
0 siblings, 1 reply; 4+ messages in thread
From: David Rientjes @ 2012-04-05 6:09 UTC (permalink / raw)
To: vichy; +Cc: Kautuk Consul, Kernel Newbies, linux-kernel
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.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: some questions about __get_vm_area_node
2012-04-05 6:09 ` David Rientjes
@ 2012-04-05 7:07 ` vichy
2012-04-05 7:20 ` David Rientjes
0 siblings, 1 reply; 4+ messages in thread
From: vichy @ 2012-04-05 7:07 UTC (permalink / raw)
To: David Rientjes; +Cc: Kautuk Consul, Kernel Newbies, linux-kernel
hi david:
2012/4/5 David Rientjes <rientjes@google.com>:
> 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,
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: some questions about __get_vm_area_node
2012-04-05 7:07 ` vichy
@ 2012-04-05 7:20 ` David Rientjes
0 siblings, 0 replies; 4+ messages in thread
From: David Rientjes @ 2012-04-05 7:20 UTC (permalink / raw)
To: vichy; +Cc: Kautuk Consul, linux-kernel
On Thu, 5 Apr 2012, vichy wrote:
> Yes, I saw your check in message on Mon Dec 19 17:12:04 2011 -0800.
> BTW, why we declare it as static previously?
Most likely copy-and-paste error by the original author.
> for saving stack usage?
For that you would need some kind of synchronization to protect it from
concurrent access which doesn't exist in this context, so it was simply a
mistake that got past review.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-04-05 7:20 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-05 6:00 some questions about __get_vm_area_node vichy
2012-04-05 6:09 ` David Rientjes
2012-04-05 7:07 ` vichy
2012-04-05 7:20 ` David Rientjes
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.