Home » Mailing lists » Devel » [RFC][PATCH 1/5] Virtualization/containers: startup
Re: [RFC][PATCH 1/5] Virtualization/containers: startup [message #1244 is a reply to message #1239] |
Fri, 03 February 2006 17:22   |
dev
Messages: 1693 Registered: September 2005 Location: Moscow
|
Senior Member |

|
|
Linus,
Not a problem and fully agree with you.
Just had to better review patch before sending.
Do you have any other ideas/comments on this?
I will send additional IPC/filesystems virtualization patches a bit later.
Kirill
> On Fri, 3 Feb 2006, Kirill Korotaev wrote:
>> This patch introduces some abstract container/VPS kernel structure and tiny
>> amount of operations on it.
>
> Please don't use things like "vps_t".
>
> It's a _mistake_ to use typedef for structures and pointers. When you see
> a
>
> vps_t a;
>
> in the source, what does it mean?
>
> In contrast, if it says
>
> struct virtual_container *a;
>
> you can actually tell what "a" is.
>
> Lots of people think that typedefs "help readability". Not so. They are
> useful only for
>
> (a) totally opaque objects (where the typedef is actively used to _hide_
> what the object is).
>
> Example: "pte_t" etc opaque objects that you can only access using
> the proper accessor functions.
>
> NOTE! Opaqueness and "accessor functions" are not good in themselves.
> The reason we have them for things like pte_t etc is that there
> really is absolutely _zero_ portably accessible information there.
>
> (b) Clear integer types, where the abstraction _helps_ avoid confusion
> whether it is "int" or "long".
>
> u8/u16/u32 are perfectly fine typedefs.
>
> NOTE! Again - there needs to be a _reason_ for this. If something is
> "unsigned long", then there's no reason to do
>
> typedef long myflags_t;
>
> but if there is a clear reason for why it under certain circumstances
> might be an "unsigned int" and under other configurations might be
> "unsigned long", then by all means go ahead and use a typedef.
>
> (c) when you use sparse to literally create a _new_ type for
> type-checking.
>
> Maybe there are other cases too, but the rule should basically be to NEVER
> EVER use a typedef unless you can clearly match one of those rules.
>
> In general, a pointer, or a struct that has elements that can reasonably
> be directly accessed should _never_ be a typedef.
>
> Linus
>
|
|
|
 |
|
[RFC][PATCH 1/5] Virtualization/containers: startup
|
 |
|
[RFC][PATCH 2/5] Virtualization/containers: UIDs
By: dev on Fri, 03 February 2006 17:01
|
 |
|
[RFC][PATCH 3/5] Virtualization/containers: UTSNAME
By: dev on Fri, 03 February 2006 17:04
|
 |
|
Re: [RFC][PATCH 3/5] Virtualization/containers: UTSNAME
By: ebiederm on Mon, 06 February 2006 08:21
|
 |
|
Re: [RFC][PATCH 3/5] Virtualization/containers: UTSNAME
By: dev on Mon, 06 February 2006 08:51
|
 |
|
Re: [RFC][PATCH 1/5] Virtualization/containers: startup
By: dev on Fri, 03 February 2006 17:22
|
 |
|
Re: [RFC][PATCH 1/5] Virtualization/containers: startup
|
 |
|
Summary: PID virtualization , Containers, Migration
|
 |
|
Re: [RFC][PATCH 1/5] Virtualization/containers: startup
|
 |
|
Re: [RFC][PATCH 1/5] Virtualization/containers: startup
By: dev on Sun, 05 February 2006 14:52
|
 |
|
Re: [RFC][PATCH 1/5] Virtualization/containers: startup
By: ebiederm on Mon, 06 February 2006 08:39
|
 |
|
Re: [RFC][PATCH 1/5] Virtualization/containers: startup
By: dev on Mon, 06 February 2006 08:58
|
 |
|
Re: [RFC][PATCH 1/5] Virtualization/containers: startup
By: ebiederm on Mon, 06 February 2006 09:19
|
 |
|
Re: [RFC][PATCH 1/5] Virtualization/containers: startup
|
 |
|
Re: [RFC][PATCH 1/5] Virtualization/containers: startup
By: ebiederm on Mon, 06 February 2006 18:37
|
 |
|
Re: [RFC][PATCH 1/5] Virtualization/containers: startup
By: dev on Mon, 06 February 2006 19:30
|
 |
|
Re: [RFC][PATCH 1/5] Virtualization/containers: startup
|
 |
|
Re: [RFC][PATCH 1/5] Virtualization/containers: startup
By: ebiederm on Tue, 07 February 2006 01:57
|
 |
|
swsusp done by migration (was Re: [RFC][PATCH 1/5] Virtualization/containers: startup)
|
 |
|
Re: swsusp done by migration (was Re: [RFC][PATCH 1/5] Virtualization/containers: startup)
By: ebiederm on Thu, 09 February 2006 18:20
|
 |
|
Re: swsusp done by migration (was Re: [RFC][PATCH 1/5] Virtualization/containers: startup)
|
 |
|
Re: swsusp done by migration (was Re: [RFC][PATCH 1/5] Virtualization/containers: startup)
|
 |
|
Re: Re: swsusp done by migration (was Re: [RFC][PATCH 1/5] Virtualization/containers: startup)
By: vaverin on Fri, 10 February 2006 06:23
|
 |
|
Re: Re: swsusp done by migration (was Re: [RFC][PATCH 1/5] Virtualization/containers: startup)
|
 |
|
Re: Re: swsusp done by migration (was Re: [RFC][PATCH 1/5] Virtualization/containers: startup)
By: vaverin on Sat, 11 February 2006 17:29
|
 |
|
Re: swsusp done by migration (was Re: [RFC][PATCH 1/5] Virtualization/containers: startup)
|
 |
|
Re: [RFC][PATCH 1/5] Virtualization/containers: startup
|
 |
|
Re: [RFC][PATCH 1/5] Virtualization/containers: startup
|
 |
|
Re: [RFC][PATCH 1/5] Virtualization/containers: startup
|
 |
|
Re: [RFC][PATCH 1/5] Virtualization/containers: startup
|
 |
|
Re: [RFC][PATCH 1/5] Virtualization/containers: startup
|
 |
|
Re: [RFC][PATCH 1/5] Virtualization/containers: startup
By: Greg KH on Fri, 03 February 2006 20:19
|
 |
|
Re: [RFC][PATCH 1/5] Virtualization/containers: startup
By: dev on Sun, 05 February 2006 15:10
|
 |
|
Re: [RFC][PATCH 1/5] Virtualization/containers: startup
By: dev on Sun, 05 February 2006 15:05
|
 |
|
Re: [RFC][PATCH 1/5] Virtualization/containers: startup
|
 |
|
Re: [RFC][PATCH 1/5] Virtualization/containers: startup
By: dev on Mon, 06 February 2006 16:50
|
 |
|
Re: [RFC][PATCH 1/5] Virtualization/containers: startup
|
 |
|
Re: [RFC][PATCH 1/5] Virtualization/containers: startup
By: dev on Mon, 06 February 2006 17:19
|
 |
|
Re: [RFC][PATCH 1/5] Virtualization/containers: startup
|
 |
|
Re: [RFC][PATCH 1/5] Virtualization/containers: startup
By: dev on Tue, 07 February 2006 12:19
|
 |
|
Re: [RFC][PATCH 1/5] Virtualization/containers: startup
|
 |
|
Re: [RFC][PATCH 1/5] Virtualization/containers: startup
By: dev on Mon, 20 February 2006 11:54
|
 |
|
Re: [RFC][PATCH 1/5] Virtualization/containers: startup
|
 |
|
Re: [RFC][PATCH 1/5] Virtualization/containers: startup
|
 |
|
Re: [RFC][PATCH 1/5] Virtualization/containers: startup
By: dev on Sun, 05 February 2006 15:11
|
 |
|
Re: [RFC][PATCH 1/5] Virtualization/containers: startup
|
 |
|
Re: [RFC][PATCH 1/5] Virtualization/containers: startup
By: dev on Mon, 06 February 2006 09:06
|
 |
|
Re: [RFC][PATCH 1/5] Virtualization/containers: startup
|
 |
|
Re: [RFC][PATCH 1/5] Virtualization/containers: startup
By: dev on Tue, 07 February 2006 12:25
|
 |
|
Re: [RFC][PATCH 1/5] Virtualization/containers: startup
|
 |
|
Re: Re: [RFC][PATCH 1/5] Virtualization/containers: startup
By: dev on Mon, 06 February 2006 09:01
|
 |
|
Re: [RFC][PATCH 1/5] Virtualization/containers: startup
By: ebiederm on Mon, 06 February 2006 08:31
|
 |
|
Re: [RFC][PATCH 1/5] Virtualization/containers: startup
By: ebiederm on Fri, 10 February 2006 06:01
|
Goto Forum:
Current Time: Wed Aug 13 12:28:50 GMT 2025
Total time taken to generate the page: 0.72075 seconds
|