lkml.org 
[lkml]   [2006]   [Feb]   [6]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateMon, 06 Feb 2006 11:53:26 +0300
FromKirill Korotaev <>
SubjectRe: [RFC][PATCH 3/5] Virtualization/containers: UTSNAME
> I am disturbed by the introduction of #defines like current_vps() and
> vps_utsname.
> 
> Magic lower case #defines are usually a bad idea.  
It is not magic defines, this is done intentionally.
You can take a more detailed view into OpenVZ sources, but the idea is 
to make kernel compilable without virtualization.
When virtualization is OFF all this macros are defined to trivial 
variables/defines which make it an old good kernel.

For example current_vps() should be (&init_vps), i.e. host system 
environment only.

vps_utsname will be defined as system_utsname and so on.

> These defines hide the cost of the operations you are performing.
> At that point you might as well name the thing system_utsname
> so you don't have to change the code.  
You mean to have variable and define with the same names?
it is not always good. It works fine, when both are defined in the same 
file, but poorly when it is scattered all around...

> And of course you failed to change several references to
> system_utsname.
which one? Maybe intentionally? ;-)
Kirill






-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-02-06 09:54    [from the cache]
©2003-2008