[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-id: <200612132226.26535.dada1@cosmosbay.com>
Date: Wed, 13 Dec 2006 22:26:26 +0100
From: Eric Dumazet <dada1@...mosbay.com>
To: Andrew Morton <akpm@...l.org>
Cc: Andi Kleen <ak@...e.de>, linux-kernel@...r.kernel.org
Subject: [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 and
x86_64.
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.
Signed-off-by: Eric Dumazet <dada1@...mosbay.com>
---
arch/i386/kernel/vmlinux.lds.S | 3 +
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 ++++++++++++++---------------
10 files changed, 92 insertions(+), 73 deletions(-)
View attachment "time_data.patch" of type "text/plain" (14109 bytes)
Powered by blists - more mailing lists