lkml.org 
[lkml]   [2009]   [Oct]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [patch 02/28] pm_qos: clean up racy global "name" variable
From
Date
On Sat, 2009-10-10 at 14:03 -0600, Jonathan Corbet wrote:
> On Sat, 10 Oct 2009 21:54:22 +0200 (CEST)
> John Kacur <jkacur@redhat.com> wrote:
>
> > Hmnn, why 32? Seems arbitrary. At least you see with "process_1234567890"
> > which is 19, an attempt to show what the maximum string size would be. If
> > a system were configured to enlarge the maximum PID from 32767 to 4194303
> > that would still only be 7 digits, so "process_1234567" - which is 16
> > digits with the newline would enough.
> >
> > So, I suggest you change that to
> > #define PID_NAME_LEN sizeof("process_1234567")
>
> ....which works great until somebody enables 64-bit process IDs...:)

PID/TIDs are limited to 2^29, raising it above that will break things
like futexes. Raising it above 2^32 will break heaps of userspace.

That said, 512M tasks still seems like a lot, but if history is
something to go by we'll eventually run out...



\
 
 \ /
  Last update: 2009-10-10 22:17    [W:0.088 / U:1.540 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site