Skip to contentSkip to conversation

move get_idle_time , get_iowait_time to sched/core.c

PATCH Glauber Costa 2 participants 3 messages Dec 23, 2011 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 11 lines · Glauber Costa

In commit a25cac5198 we changed the way we calculate idle and iowait for /proc/stat displaying purposes. However, this same information is also displayed in /proc/uptime. These values can now be inconsistent.

So I propose we draw both idle values from the same place. In theory, we only need to do it for get_idle_time(). get_iowait_time() is moved as well for consistency only.

I moved the functions to sched/core.c so it can live among its other friends like nr_iowait(), etc.

You guys have any opinions on this ?
I see that Michal got another fix for this in stat.c already, so I'd have to respin this one anyway. Just let me know if this is wanted

Thanks

#2 lore raw
Quoted 9 lines · Glauber Costa
Quoted 8 lines · Glauber Costa

In commit a25cac5198 we changed the way we calculate idle and iowait for /proc/stat displaying purposes. However, this same information is also displayed in /proc/uptime. These values can now be inconsistent.

So I propose we draw both idle values from the same place. In theory, we only need to do it for get_idle_time(). get_iowait_time() is moved as well for consistency only.

Quoted 7 lines
Quoted 3 lines

I moved the functions to sched/core.c so it can live among its other friends like nr_iowait(), etc.

You guys have any opinions on this ?
I see that Michal got another fix for this in stat.c already, so I'd have to respin this one anyway. Just let me know if this is wanted

The last follow up fix is in Andrew's tree at the moment: procfs: do not confuse jiffies with cputime64_t.

I don't mind moving those functions outside stat.c if it is reused.

Signature · 6 lines
Michal Hocko
SUSE Labs
SUSE LINUX s.r.o.
Lihovarska 1060/12
190 00 Praha 9    
Czech Republic
#3 lore raw
Quoted 14 lines · Michal Hocko
Quoted 13 lines · Glauber Costa
Quoted 11 lines · Glauber Costa

In commit a25cac5198 we changed the way we calculate idle and iowait for /proc/stat displaying purposes. However, this same information is also displayed in /proc/uptime. These values can now be inconsistent.

So I propose we draw both idle values from the same place. In theory, we only need to do it for get_idle_time(). get_iowait_time() is moved as well for consistency only.

I moved the functions to sched/core.c so it can live among its other friends like nr_iowait(), etc.

Quoted 8 lines
Quoted 3 lines

You guys have any opinions on this ?
I see that Michal got another fix for this in stat.c already, so I'd have to respin this one anyway. Just let me know if this is wanted

The last follow up fix is in Andrew's tree at the moment: procfs: do not confuse jiffies with cputime64_t.

I don't mind moving those functions outside stat.c if it is reused.

Well, they are not (currently). The point of this patch is precisely this question: Should it be?

I think the values we show in /proc/uptime should be consistent with the ones in /proc/stat, so yes.