lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <46CE1BA2.8070200@gmail.com>
Date:	Fri, 24 Aug 2007 01:43:30 +0200
From:	Luka Napotnik <luka.napotnik@...il.com>
To:	linux-kernel@...r.kernel.org
Subject: division and cpu usage

Hello.

I'm new to kernel development and have some questions.

1. Why can't I divide with regular casting to double ((double)a /
(double)b)? It gives me strange errors when compiling:

WARNING: "__divdf3" [/root....] undefined!
WARNING: "__addf3" [/root/...] undefined!
WARNING: "__floatsidf" [/root/...] undefined!

And if I compile with normal integers, I get zero as the result.

2. I'm trying to get the percentage of CPU used for a certain
task_struct and figured the following formula:

(task->utime + task->stime) / jiffies

Before calculating I convert all the variables to jiffies. Is this correct?

Please help.

Greets,
Lukla
-
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ