OpenVZ Forum


Home » Mailing lists » Devel » [PATCH] Use helpers to obtain task pid in printks
Re: [PATCH] Use helpers to obtain task pid in printks [message #16116 is a reply to message #16109] Wed, 22 August 2007 22:16 Go to previous message
Andrew Morton is currently offline  Andrew Morton
Messages: 127
Registered: December 2005
Senior Member
On Wed, 22 Aug 2007 13:33:22 +0400
Pavel Emelyanov <xemul@openvz.org> wrote:

> The task_struct->pid member is going to be deprecated, so start
> using the helpers (task_pid_nr/task_pid_vnr/task_pid_nr_ns) in 
> the kernel.
> 
> The first thing to start with is the pid, printed to dmesg - in 
> this case we may safely use task_pid_nr(). Besides, printks produce
> more (much more) than a half of all the explicit pid usage.
> 
> Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
> 
> ---
> 
> Andrew, this patch changes many code in drivers and file systems,
> so it may cause many conflicts with other fixes in -mm tree. Is
> there any way I can help with it, e.g. split it into pieces, wait
> till another -mm tree or something else?

I think we just slam it all into the tree as-is.  There will be a few
places which ended up getting missed, but we can pick those up on a second
round and then we rename task_struct.pid to
task_struct.dont_use_me_directly_pid so that any remaining, future or
out-of-tree usages of ->pid get reliably broken.
 
Read Message
Read Message
Previous Topic: Re: [PATCH] Memory controller Add Documentation
Next Topic: [PATCH] Containers: Avoid lockdep warning
Goto Forum:
  


Current Time: Sun Nov 02 16:38:22 GMT 2025

Total time taken to generate the page: 0.25459 seconds