Re: user/system/nice accounting (SMP): need help understanding the

Randy.Dunlap (rddunlap@osdl.org)
Mon, 22 Apr 2002 09:40:33 -0700 (PDT)


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/