Messages in this thread | | | Subject | Re: ALLANC: Proposal to add progress records to process accounting | From | Allan Chandler <> | Date | Tue, 13 Jan 2009 18:49:25 +0900 |
| |
> Are you planning to update the log based upon wall time or cpu used ?
I planned on using the exact same algorithm as is used currently. I believe the current->signal->pacct structure holds system and user CPU time which is copied into the log ac_stime and ac_utime entries respectively in kernel/acct.c/do_acct_proces() thus: ac.ac_utime = encode_comp_t(jiffies_to_AHZ(cputime_to_jiffies(pacct->ac_utime))); ac.ac_stime = encode_comp_t(jiffies_to_AHZ(cputime_to_jiffies(pacct->ac_stime)));
The log ac_etime is elapsed time (which is what I assume you mean by wall time) and is calculated as current_uptime - process_start_time (paraphrased) in the same function.
Cheers, Pax. ========== Two strings walk into a bar. The first one says: "Hello, I'd like some Vodka please.ytewsr@)W$(#*$&!^Y@)^&30@#!". "You'll have to excuse my friend," the second one says, "he's not null-terminated". ========== Allan Chandler (Pax), Senior IT Specialist, Australia Development Laboratory (ADL), Perth, IBM Corporation Internet: allachan@au1.ibm.com, Phone: +61 8 926 13019, Fax: +61 8 921 89201 Location code MP25, 77 St George's Terrace (Allendale Square), Level 25, Perth WA 6000 _______________________________________________
Alan Cox <alan@lxorguk.uku u.org.uk> To Sent by: Allan Chandler/Australia/IBM@IBMAU linux-kernel-owne cc r@vger.kernel.org linux-kernel@vger.kernel.org Subject Re: ALLANC: Proposal to add 13/01/2009 06:17 progress records to process PM accounting
> will be written for any process that hasn't written a record in a while > (for our purposes, 24 hours is fine but it may be better to make this > configurable).
Agreed and this sounds sensible.
> too much overhead to the context switch (that's putting it mildly). I > assume this would be somewhere in kernel/sched.c/context_switch() or > kernel/sched.c/prepare_task_switch() although I haven't yet looked in great > detail.
Are you planning to update the log based upon wall time or cpu used ?
Alan
| |