From: Keir Fraser <keir.fraser@eu.citrix.com>
To: Mukesh Rathor <mukesh.rathor@oracle.com>,
Steve Ofsthun <steve.ofsthun@oracle.com>
Cc: Hackel <kurt.hackel@oracle.com>,
Dan Magenheimer <dan.magenheimer@oracle.com>,
"Xen-devel@lists.xensource.com" <Xen-devel@lists.xensource.com>,
Jeremy Fitzhardinge <jeremy@goop.org>,
"Kurt@acsinet11.oracle.com" <Kurt@acsinet11.oracle.com>
Subject: Re: [timer/ticks related] dom0 hang during boot on large 1TB system
Date: Tue, 22 Dec 2009 07:59:22 +0000 [thread overview]
Message-ID: <C7562CDA.4EAA%keir.fraser@eu.citrix.com> (raw)
In-Reply-To: <20091221200025.3641d635@mantra.us.oracle.com>
I'll try and make this *really* clear...
On 22/12/2009 04:00, "Mukesh Rathor" <mukesh.rathor@oracle.com> wrote:
> can't use time_after/before as they do signed comparisions.
> time_after(a,b): ((long)(b) - (long)(a) < 0))
The whole point is to do signed comparison. This gives you reliable +/-
(BITS_PER_LONG-1) bits to reliably compare: with 32-bit Linux that means
jiffy values which do not differ by more than +/- 2^31 can be reliably
compared, regardless of wrapping. Bear in mind that even at HZ=1000, it'll
take 3.5 *weeks* for jiffies to increase by 2^31.
> thus, time_after(0xFFFEDB09, 0xFFFEDB08) will return true as will
> time_after(0x1020, 0xFFFEDB08) as they are both after 0xFFFEDB08.
Well yeah: anything in the ranges a=0xFFFEDB09-0xFFFFFFFF and
a=0x0-0x7FFEDB09 will return true for time_after(a,0xFFFEDB08). That's how a
signed 32-bit comparison works. The assumption here is that 0x1020 is
derived from jiffies_64=0x100001020: in general the assumption is that the
arguments to time_after() were taken within seconds/minutes/hours of each
other, not days/weeks. Which precludes a jiffies_64 difference of
>0x7FFFFFFF, which is what would invalidate use of time_after().
> For wrapping, unsigned comparision must be done, which is also the jiffies
> data type.
If you do 32-bit unsigned comparisons, that is broken by jiffies wrapping,
the fixing of which was the whole point of the comparison macros.
-- Keir
next prev parent reply other threads:[~2009-12-22 7:59 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-18 4:36 [timer/ticks related] dom0 hang during boot on large 1TB system Mukesh Rathor
2009-12-18 7:02 ` Keir Fraser
2009-12-18 8:42 ` Jan Beulich
2009-12-18 9:13 ` Keir Fraser
2009-12-18 16:35 ` Dan Magenheimer
2009-12-18 17:15 ` Keir Fraser
2009-12-18 19:28 ` Mukesh Rathor
2009-12-18 19:25 ` Mukesh Rathor
2009-12-19 4:43 ` Mukesh Rathor
2009-12-21 9:55 ` Jan Beulich
2009-12-21 18:20 ` Dan Magenheimer
2009-12-21 19:07 ` Keir Fraser
2009-12-21 19:52 ` Mukesh Rathor
2009-12-21 19:55 ` Jeremy Fitzhardinge
2009-12-21 22:47 ` Mukesh Rathor
2009-12-21 23:13 ` Jeremy Fitzhardinge
2009-12-21 23:57 ` Dan Magenheimer
2009-12-22 4:31 ` Mukesh Rathor
2009-12-22 8:51 ` Jan Beulich
2009-12-22 10:20 ` Keir Fraser
2009-12-22 11:10 ` Jan Beulich
2009-12-22 13:35 ` Keir Fraser
2009-12-22 14:17 ` Jan Beulich
2009-12-22 14:23 ` Jan Beulich
2009-12-22 15:19 ` Keir Fraser
2009-12-22 15:30 ` Dan Magenheimer
2009-12-22 15:36 ` Jan Beulich
2009-12-22 16:05 ` Dan Magenheimer
2009-12-22 17:02 ` Jan Beulich
2009-12-22 18:03 ` Jeremy Fitzhardinge
2010-01-04 8:23 ` Jan Beulich
2010-01-04 22:07 ` Dan Magenheimer
2010-01-04 22:21 ` Ian Campbell
2010-01-05 8:33 ` Jan Beulich
2010-01-05 15:46 ` Dan Magenheimer
2010-01-05 15:54 ` Ian Campbell
2010-01-05 16:08 ` Jan Beulich
2009-12-22 16:33 ` Jan Beulich
2009-12-22 16:42 ` Jan Beulich
2009-12-22 17:27 ` Dan Magenheimer
2009-12-22 17:48 ` Keir Fraser
2009-12-22 18:42 ` Keir Fraser
2009-12-22 23:00 ` Mukesh Rathor
2009-12-21 10:44 ` Keir Fraser
2009-12-21 23:40 ` Mukesh Rathor
2009-12-22 7:35 ` Keir Fraser
2009-12-21 19:17 ` Steve Ofsthun
2009-12-22 4:00 ` Mukesh Rathor
2009-12-22 4:18 ` Mukesh Rathor
2009-12-22 7:59 ` Keir Fraser [this message]
2009-12-22 8:05 ` Keir Fraser
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=C7562CDA.4EAA%keir.fraser@eu.citrix.com \
--to=keir.fraser@eu.citrix.com \
--cc=Kurt@acsinet11.oracle.com \
--cc=Xen-devel@lists.xensource.com \
--cc=dan.magenheimer@oracle.com \
--cc=jeremy@goop.org \
--cc=kurt.hackel@oracle.com \
--cc=mukesh.rathor@oracle.com \
--cc=steve.ofsthun@oracle.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.