[to-be-updated] kernel-timekeeping-move-xtime_cache-to-be-in-the-same-cache-line-as-the-lock.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     kernel/timekeeping: move xtime_cache to be in the same cache line as the lock
has been removed from the -mm tree.  Its filename was
     kernel-timekeeping-move-xtime_cache-to-be-in-the-same-cache-line-as-the-lock.patch

This patch was dropped because an updated version will be merged

The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/

------------------------------------------------------
Subject: kernel/timekeeping: move xtime_cache to be in the same cache line as the lock
From: Richard Kennedy <richard@xxxxxxxxxxxxxxx>

Move xtime_cache to be in the same cache line as the lock, allowing
current_kernel_time() to access only one cache line

When running fio write tests on a 2 core machine, on some of the runs
'perf record -e cache_misses' shows current_kernel_time near the top of
the list of cache_misses with 5.5%.

On the other runs it's down at 0.05% so I'm assuming that the difference
is just down to which core the test client get run on.

This patch moves the xtime_cache variable near to the lock so that it only
need to access one cache line.  With this applied it drops the
current_kernel_time cache_misses in the slow case to 4.5%

Signed-off-by: Richard Kennedy <richard@xxxxxxxxxxxxxxx>
Cc: John Stultz <johnstul@xxxxxxxxxx>
Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Cc: Martin Schwidefsky <schwidefsky@xxxxxxxxxx>
Cc: Ingo Molnar <mingo@xxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 kernel/time/timekeeping.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -puN kernel/time/timekeeping.c~kernel-timekeeping-move-xtime_cache-to-be-in-the-same-cache-line-as-the-lock kernel/time/timekeeping.c
--- a/kernel/time/timekeeping.c~kernel-timekeeping-move-xtime_cache-to-be-in-the-same-cache-line-as-the-lock
+++ a/kernel/time/timekeeping.c
@@ -137,6 +137,7 @@ static inline s64 timekeeping_get_ns_raw
  */
 __cacheline_aligned_in_smp DEFINE_SEQLOCK(xtime_lock);
 
+static struct timespec xtime_cache __attribute__ ((aligned (16)));
 
 /*
  * The current time
@@ -165,7 +166,6 @@ struct timespec raw_time;
 /* flag for if timekeeping is suspended */
 int __read_mostly timekeeping_suspended;
 
-static struct timespec xtime_cache __attribute__ ((aligned (16)));
 void update_xtime_cache(u64 nsec)
 {
 	xtime_cache = xtime;
_

Patches currently in -mm which might be from richard@xxxxxxxxxxxxxxx are

linux-next.patch
get_maintainerpl-teach-git-log-to-use-no-color.patch
kernel-timekeeping-move-xtime_cache-to-be-in-the-same-cache-line-as-the-lock.patch
cpuidle-menu-remove-8-bytes-of-padding-on-64-bit-builds.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux