[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20141201151402.31a6cc9a@mschwide>
Date: Mon, 1 Dec 2014 15:14:02 +0100
From: Martin Schwidefsky <schwidefsky@...ibm.com>
To: Frederic Weisbecker <fweisbec@...il.com>
Cc: LKML <linux-kernel@...r.kernel.org>,
Tony Luck <tony.luck@...el.com>,
Peter Zijlstra <peterz@...radead.org>,
Heiko Carstens <heiko.carstens@...ibm.com>,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Thomas Gleixner <tglx@...utronix.de>,
Oleg Nesterov <oleg@...hat.com>,
Paul Mackerras <paulus@...ba.org>,
Wu Fengguang <fengguang.wu@...el.com>,
Ingo Molnar <mingo@...nel.org>, Rik van Riel <riel@...hat.com>
Subject: Re: [RFC PATCH 07/30] cputime: Convert kcpustat to nsecs
On Fri, 28 Nov 2014 19:23:37 +0100
Frederic Weisbecker <fweisbec@...il.com> wrote:
> Kernel cpu stats are stored in cputime_t which is an architecture
> defined type, and hence a bit opaque and requiring accessors and mutators
> for any operation.
>
> Converting them to nsecs simplifies the code a little bit.
Quite honestly I do not see much of an improvement here, on set of
functions (cputime_to_xxx) gets replaced by another (nsecs_to_xxx).
On the contrary for s390 I see a degradation, consider a hunk like
this:
> @@ -128,9 +128,9 @@ static inline u64 get_cpu_idle_time_jiffy(unsigned int cpu, u64 *wall)
>
> idle_time = cur_wall_time - busy_time;
> if (wall)
> - *wall = cputime_to_usecs(cur_wall_time);
> + *wall = div_u64(cur_wall_time, NSEC_PER_USEC);
>
> - return cputime_to_usecs(idle_time);
> + return div_u64(idle_time, NSEC_PER_USEC);
> }
>
> u64 get_cpu_idle_time(unsigned int cpu, u64 *wall, int io_busy)
For s390 cputime_to_usecs is a shift, with the new code we now have a division.
Fortunately this is in a piece of code that s390 does not use..
--
blue skies,
Martin.
"Reality continues to ruin my life." - Calvin.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists