OpenVZ Forum


Home » Mailing lists » Devel » [RFC][PATCH] rename 'struct pid'
Re: [RFC][PATCH] rename 'struct pid' [message #18175 is a reply to message #18173] Wed, 11 April 2007 20:54 Go to previous messageGo to previous message
ebiederm is currently offline  ebiederm
Messages: 1354
Registered: February 2006
Senior Member
Dave Hansen <hansendc@us.ibm.com> writes:

> On Wed, 2007-04-11 at 12:46 -0600, Eric W. Biederman wrote:
>> 
>> > These can be a bit confusing:
>> >
>> >       struct pid *pid;
>> >       struct pid *pgrp;
>> >       struct pid *sid;
>> 
>> How is it more confusing then?
>> 
>>         pid_t pid;
>>         pid_t pgrp;
>>         pid_t sid; 
>
> They confuse me the same way. :)
>
> We can't do much about userspace.  But, we do have quite a bit of
> control how we name things in the kernel, and I think there's a better
> way.

Maybe.

The worst of those above is:
pid_t pid;

Am I correct?

When someone mentions a pid which side of the above statement are you
thinking of the left hand side or the right hand side.   The type or
the variable name.

If you think of the variable name, I contend pids are very confusing.
If you think of the type it is less so.

Did that make sense?

> Eric, we all know that you understand this stuff.  I'm just trying to
> make it a bit more approachable for anyone that comes along in the
> future.  Serge, Suka, Kirill and Pavel have all expressed some level of
> dissatisfaction, and I think we all agree that 'struct pid' is at the
> heart of the issue.  That's a pretty large chunk of the people other
> than you that have tried to hack on it so far.  

I haven't heard it universally said that 'struct pid' is at the heart
of the issue.

> I honestly don't think changing peripheral names is going to cut it,
> especially as the largest amount of confusion comes in the core code
> which doesn't use as many of the functions which could get new
> names.

Maybe.  I guess it depends on what issue you are trying to solve.

  If the issue is a flood of the word pid lots of little things can help.

  If the issue is that you find the concept of pid_t confusing then it
  is much harder to sort this out.

> What would you think about running the _concept_ by Linus and akpm and
> seeing if they have any insights?

They aren't likely to step in, if there is a reasonable chance we can
resolve this ourselves.  

Eric
_______________________________________________
Containers mailing list
Containers@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: IPC NS tests ?
Next Topic: [RFC | PATCH 0/9] CPU controller over process container
Goto Forum:
  


Current Time: Wed Sep 18 07:55:46 GMT 2024

Total time taken to generate the page: 0.04678 seconds