lkml.org 
[lkml]   [2002]   [Apr]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: user/system/nice accounting (SMP): need help understanding the code
On Mon, 22 Apr 2002, Denis Vlasenko wrote:

| As you see below, in SMP case update_one_process() is not called
| in do_timer().
| OTOH, global grep over entire tree (*.[chsS]) for 'per_cpu_utime'
| and 'per_cpu_user' did not turn out SMP accounting code.
| Or maybe I am stupid.
|
| Anybody with cluebat?

Sure... ;)

| ...
| void do_timer(struct pt_regs *regs)
| {
| (*(unsigned long *)&jiffies)++;
| #ifndef CONFIG_SMP
| /* SMP process accounting uses the local APIC timer */
|
| update_process_times(user_mode(regs));
| #endif
| mark_bh(TIMER_BH);
| if (TQ_ACTIVE(tq_timer))
| mark_bh(TQUEUE_BH);
| }
| --

For CONFIG_SMP, each arch/cpu/kernel/*.c calls update_process_times().

--
~Randy

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:25    [W:2.254 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site