[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20120621161558.824d7c6b.akpm@linux-foundation.org>
Date: Thu, 21 Jun 2012 16:15:58 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: "H. Peter Anvin" <hpa@...or.com>
Cc: mingo@...nel.org, linux-kernel@...r.kernel.org,
a.p.zijlstra@...llo.nl, torvalds@...ux-foundation.org,
zheng.z.yan@...el.com, tglx@...utronix.de,
linux-tip-commits@...r.kernel.org
Subject: Re: [tip:perf/core] perf/x86: Add generic Intel uncore PMU support
On Thu, 21 Jun 2012 16:10:23 -0700
"H. Peter Anvin" <hpa@...or.com> wrote:
> On 06/21/2012 03:51 PM, Andrew Morton wrote:
> >
> > What *is* significant is the effect of a signedness change upon
> > arithmetic, conversions, warnings, etc. And whether such a change
> > might actually introduce bugs.
> >
> >
> > Back away and ask the broader questions: why did ktime_t choose
> > unsigned? Is time a signed concept? What is the right thing to do
> > here, from a long-term design perspective?
>
> Time is definitely a signed concept -- it has no beginning or end (well,
> the Big Bang, but the __110 Myr or so uncertainty of the exact timing of
> the Big Bang makes it a horridly awkward choice for epoch.)
>
> Now, for some users of time you can inherently guarantee there will
> never be any references to time before a particular event, e.g. system
> boot, in which case an unsigned number might make sense, but as a whole
> I think using a signed type as time_t in nearly all Unix implementation
> was The Right Thing.
>
So why is ktime_t unsigned?
--
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