[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sat, 10 Oct 2009 14:03:39 -0600
From: Jonathan Corbet <corbet@....net>
To: John Kacur <jkacur@...hat.com>
Cc: Thomas Gleixner <tglx@...utronix.de>,
LKML <linux-kernel@...r.kernel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Ingo Molnar <mingo@...e.hu>,
Peter Zijlstra <peterz@...radead.org>,
Frederic Weisbecker <fweisbec@...il.com>,
Vincent Sanders <vince@...tec.co.uk>,
Christoph Hellwig <hch@...radead.org>,
Mark Gross <mgross@...ux.intel.com>
Subject: Re: [patch 02/28] pm_qos: clean up racy global "name" variable
On Sat, 10 Oct 2009 21:54:22 +0200 (CEST)
John Kacur <jkacur@...hat.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...:)
We're talking about 20 bytes of stack space in an almost-never-called
function. I honestly don't think it's worth worrying about, but if
somebody wants to tweak it, I'll not complain.
(Thanks for looking at the patch).
jon
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists