[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200612151221.13817.dada1@cosmosbay.com>
Date: Fri, 15 Dec 2006 12:21:13 +0100
From: Eric Dumazet <dada1@...mosbay.com>
To: Andrew Morton <akpm@...l.org>
Cc: Andi Kleen <ak@...e.de>, linux-kernel@...r.kernel.org,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...e.hu>, john stultz <johnstul@...ibm.com>,
Roman Zippel <zippel@...ux-m68k.org>
Subject: Re: [PATCH] Introduce time_data, a new structure to hold jiffies, xtime, xtime_lock, wall_to_monotonic, calc_load_count and avenrun
On Friday 15 December 2006 06:24, Andrew Morton wrote:
> On Wed, 13 Dec 2006 22:26:26 +0100
>
> Eric Dumazet <dada1@...mosbay.com> wrote:
> > This patch introduces a new structure called time_data, where some time
> > keeping related variables are put together to share as few cache lines as
> > possible.
>
> ia64 refers to xtime_lock from assembly and hence doesn't link.
>
I see, I missed this.
In this new version, I define linker aliases on IA64 for xtime, xtime_lock and
wall_to_monotonic. An ia64 expert might change arch/ia64/kernel/fsys.S later
to only use time_data.
Thank you
[PATCH] Introduce time_data, a new structure to hold jiffies, xtime,
xtime_lock, wall_to_monotonic, calc_load_count and avenrun
This patch introduces a new structure called time_data, where some time
keeping related variables are put together to share as few cache lines as
possible. This should reduce timer interrupt latency and cache lines ping
pongs in SMP machines.
struct time_data {
u64 _jiffies_64;
struct timespec _xtime;
struct timespec _wall_to_monotonic;
seqlock_t lock;
int calc_load_count;
unsigned int _avenrun[3];
};
_jiffies_64 is a place holder so that arches can (optionally) aliases
jiffies_64/jiffies in time_data. This patch does the thing for i386, x86_64
and ia64
avenrun, xtime, xtime_lock, wall_to_monotonic, are now temporary defined as
macros to make this patch not too invasive, but we can in future patches
gradually deletes these macros.
For ia64, I added aliases for xtime, xtime_lock and wall_to_monotonic because
arch/ia64/kernel/fsys.S uses these symbols. This file might be changed to
directly access time_data in the future (reducing registers use as well)
Signed-off-by: Eric Dumazet <dada1@...mosbay.com>
---
arch/i386/kernel/vmlinux.lds.S | 3 +
arch/ia64/kernel/asm-offsets.c | 3 +
arch/ia64/kernel/vmlinux.lds.S | 7 +++
arch/s390/appldata/appldata_os.c | 18 ++++-----
arch/x86_64/kernel/time.c | 8 +++-
arch/x86_64/kernel/vmlinux.lds.S | 14 ++-----
arch/x86_64/kernel/vsyscall.c | 15 +++-----
include/asm-x86_64/vsyscall.h | 8 +---
include/linux/jiffies.h | 2 -
include/linux/sched.h | 10 +++--
include/linux/time.h | 33 +++++++++++++++--
kernel/timer.c | 54 ++++++++++++++---------------
12 files changed, 101 insertions(+), 74 deletions(-)
View attachment "time_data.patch" of type "text/plain" (15515 bytes)
Powered by blists - more mailing lists