[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20091225093504.0c1224a2@infradead.org>
Date: Fri, 25 Dec 2009 09:35:04 +0100
From: Arjan van de Ven <arjan@...radead.org>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: "Smith, GeoffX" <geoffx.smith@...el.com>,
Andi Kleen <andi@...stfloor.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Michael Stone <michael@...top.org>
Subject: Re: [PATCH] prctl: return MCE process flags through pointer
On Wed, 23 Dec 2009 10:54:50 -0800
Andrew Morton <akpm@...ux-foundation.org> wrote:
> On Wed, 23 Dec 2009 09:56:04 -0800 "Smith, GeoffX"
> <geoffx.smith@...el.com> wrote:
>
> > >Why are task_struct.timer_slack_ns and
> > >task_struct.default_timer_slack_ns unsigned long, btw? AFACIT we
> > >could make them unsigned ints.
> >
> > Timer slack is not a Boolean or enum, and we want the greatest
> > range possible. (Actually, I'd like to talk Arjan into using the
> > same time structure as select(), but that's another discussion.)
> > Internally hrtimer uses unsigned long. I know long and unsigned
> > long are the same on some architectures, but let's not introduce an
> > unnatural restriction -- recall that arg2 is unsigned long.
>
> Using unsigned ints will reduce the size of the task_struct.
>
> Is there any conceivable case for a timer_slack which exceeds four
> seconds?
the largest I've seen asked in practice is 2 seconds.
But even at 100 msec or more you're talking about very special
applications; rounding up timers otherwise really impacts the
functionality of the app in a bad way.
> If so, what is it, and if so, why this:
>
> #define MAX_SLACK (100 * NSEC_PER_MSEC)
this is the max for "automatic slack"
--
Arjan van de Ven Intel Open Source Technology Centre
For development, discussion and tips for power savings,
visit http://www.lesswatts.org
--
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