From: Arjan van de Ven <arjan@infradead.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: "Smith, GeoffX" <geoffx.smith@intel.com>,
Andi Kleen <andi@firstfloor.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Michael Stone <michael@laptop.org>
Subject: Re: [PATCH] prctl: return MCE process flags through pointer
Date: Fri, 25 Dec 2009 09:35:04 +0100 [thread overview]
Message-ID: <20091225093504.0c1224a2@infradead.org> (raw)
In-Reply-To: <20091223105450.8f15db9f.akpm@linux-foundation.org>
On Wed, 23 Dec 2009 10:54:50 -0800
Andrew Morton <akpm@linux-foundation.org> wrote:
> On Wed, 23 Dec 2009 09:56:04 -0800 "Smith, GeoffX"
> <geoffx.smith@intel.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
next prev parent reply other threads:[~2009-12-25 8:32 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-23 0:33 [PATCH] prctl: return MCE process flags through pointer Smith, GeoffX
2009-12-23 1:14 ` Andi Kleen
2009-12-23 1:34 ` Andrew Morton
2009-12-23 9:52 ` Andi Kleen
2009-12-23 10:18 ` Andrew Morton
2009-12-23 17:56 ` Smith, GeoffX
2009-12-23 18:54 ` Andrew Morton
2009-12-23 20:24 ` Smith, GeoffX
2009-12-25 8:35 ` Arjan van de Ven [this message]
2009-12-23 19:31 ` Andi Kleen
2009-12-25 8:30 ` Arjan van de Ven
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20091225093504.0c1224a2@infradead.org \
--to=arjan@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=andi@firstfloor.org \
--cc=geoffx.smith@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=michael@laptop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox