Merge branch 'timers-nohz-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull NOHZ updates from Ingo Molnar: "The main changes, mostly written by Frederic Weisbecker, include: - Fix some jiffies based cputime assumptions. (No real harm because the concerned code isn't used by full dynticks.) - Simplify jiffies <-> usecs conversions. Remove dead code. - Remove early hacks on nohz full code that avoided messing up idle nohz internals. Now nohz integrates well full and idle and such hack have become needless. - Restart nohz full tick from irq exit. (A simplification and a preparation for future optimization on scheduler kick to nohz full) - Code cleanups. - Tile driver isolation enhancement on top of nohz. (Chris Metcalf)" * 'timers-nohz-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: nohz: Remove useless argument on tick_nohz_task_switch() nohz: Move tick_nohz_restart_sched_tick() above its users nohz: Restart nohz full tick from irq exit nohz: Remove idle task special case nohz: Prevent tilegx network driver interrupts alpha: Fix jiffies based cputime assumption apm32: Fix cputime == jiffies assumption jiffies: Remove HZ > USEC_PER_SEC special case
This commit is contained in:
@@ -1138,6 +1138,7 @@ SYSCALL_DEFINE2(osf_getrusage, int, who, struct rusage32 __user *, ru)
|
||||
{
|
||||
struct rusage32 r;
|
||||
cputime_t utime, stime;
|
||||
unsigned long utime_jiffies, stime_jiffies;
|
||||
|
||||
if (who != RUSAGE_SELF && who != RUSAGE_CHILDREN)
|
||||
return -EINVAL;
|
||||
@@ -1146,14 +1147,18 @@ SYSCALL_DEFINE2(osf_getrusage, int, who, struct rusage32 __user *, ru)
|
||||
switch (who) {
|
||||
case RUSAGE_SELF:
|
||||
task_cputime(current, &utime, &stime);
|
||||
jiffies_to_timeval32(utime, &r.ru_utime);
|
||||
jiffies_to_timeval32(stime, &r.ru_stime);
|
||||
utime_jiffies = cputime_to_jiffies(utime);
|
||||
stime_jiffies = cputime_to_jiffies(stime);
|
||||
jiffies_to_timeval32(utime_jiffies, &r.ru_utime);
|
||||
jiffies_to_timeval32(stime_jiffies, &r.ru_stime);
|
||||
r.ru_minflt = current->min_flt;
|
||||
r.ru_majflt = current->maj_flt;
|
||||
break;
|
||||
case RUSAGE_CHILDREN:
|
||||
jiffies_to_timeval32(current->signal->cutime, &r.ru_utime);
|
||||
jiffies_to_timeval32(current->signal->cstime, &r.ru_stime);
|
||||
utime_jiffies = cputime_to_jiffies(current->signal->cutime);
|
||||
stime_jiffies = cputime_to_jiffies(current->signal->cstime);
|
||||
jiffies_to_timeval32(utime_jiffies, &r.ru_utime);
|
||||
jiffies_to_timeval32(stime_jiffies, &r.ru_stime);
|
||||
r.ru_minflt = current->signal->cmin_flt;
|
||||
r.ru_majflt = current->signal->cmaj_flt;
|
||||
break;
|
||||
|
Reference in New Issue
Block a user