From: Lev Makhlis <mlev@despammed.com>
To: ricklind@us.ibm.com
Cc: linux-kernel@vger.kernel.org
Subject: Re: [RFC][PATCH] sard changes for 2.5.34
Date: Sat, 14 Sep 2002 14:57:54 -0400 [thread overview]
Message-ID: <200209141457.54905.mlev@despammed.com> (raw)
> +#define MSEC(x) ((x) * 1000 / HZ)
Perhaps it would be better to report the times in ticks using
jiffies_to_clock_t(), and let the userland do further conversions?
The macro above has an overflow problem, it creates a counter
that wraps at 2^32 / HZ (instead of 2^32), and theoretically, the
userland doesn't even know what the internal HZ is. The overflow
can be avoided with something like
#define MSEC(x) (((x) / HZ) * 1000 + ((x) % HZ) * 1000 / HZ)
but I think it would be cleaner just to change the units to ticks,
especially if we're moving it to a different file and procps will
need to be changed anyway.
next reply other threads:[~2002-09-14 18:51 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-09-14 18:57 Lev Makhlis [this message]
2002-09-18 17:54 ` [RFC][PATCH] sard changes for 2.5.34 Randy.Dunlap
2002-09-18 19:43 ` Lev Makhlis
-- strict thread matches above, loose matches on Subject: below --
2002-09-13 11:39 Dipankar Sarma
2002-09-12 2:10 Rick Lindsley
2002-09-12 2:42 ` Andrew Morton
2002-09-12 2:50 ` Rik van Riel
2002-09-12 6:40 ` Rick Lindsley
2002-09-12 7:20 ` Andrew Morton
2002-09-12 9:18 ` Rick Lindsley
2002-09-12 10:01 ` Alexander Viro
2002-09-12 10:33 ` Rick Lindsley
2002-09-12 19:42 ` Andrew Morton
2002-09-12 20:38 ` Rik van Riel
2002-09-12 16:16 ` Rik van Riel
2002-09-12 16:48 ` Andrew Morton
2002-09-12 23:32 ` Denis Vlasenko
2002-09-12 18:49 ` Andrew Morton
2002-09-12 19:50 ` Rick Lindsley
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=200209141457.54905.mlev@despammed.com \
--to=mlev@despammed.com \
--cc=linux-kernel@vger.kernel.org \
--cc=ricklind@us.ibm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox