public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Eric Dumazet <dada1@cosmosbay.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Badari Pulavarty <pbadari@gmail.com>,
	lkml <linux-kernel@vger.kernel.org>, Andi Kleen <ak@suse.de>
Subject: Re: 2.6.21-rc5-mm1
Date: Tue, 27 Mar 2007 23:29:34 +0200	[thread overview]
Message-ID: <46098CBE.7010807@cosmosbay.com> (raw)
In-Reply-To: <20070327131214.656e1ad7.akpm@linux-foundation.org>

[-- Attachment #1: Type: text/plain, Size: 1867 bytes --]

Andrew Morton a écrit :
> 
> The wheel spins around, slows then settles on.... 
> time-smp-friendly-alignment-of-struct-clocksource.patch!
> 
> Presumably because the ____cacheline_aligned made vsyscall_gtod_data_t get
> too big.  Or something.

Very strange, since here I have plenty of available room (256 bytes) :

ffffffffff600000 T vgettimeofday
ffffffffff60004e t vsysc2
ffffffffff600140 t vread_hpet
ffffffffff600150 t vread_tsc
ffffffffff600180 D __vsyscall_gtod_data
ffffffffff600280 D __vgetcpu_mode
ffffffffff6002c0 D __jiffies
<lot of space (256 bytes)>
ffffffffff600400 T vtime
ffffffffff600413 t vsysc1
ffffffffff600800 T vgetcpu
ffffffffff600c00 T venosys_1

It must depends on the compiler, and/or CONFIG_XXX options...

Anyway, I think we can safely move __vgetcpu_mode & __jiffies to the 1024 
bytes area dedicated to vgetcpu() implementation. This saves 128 bytes from 
vsyscall_0 area.

Could we add this patch instead of dropping 
time-smp-friendly-alignment-of-struct-clocksource.patch ?

Thank you

[PATCH] x86_64 : move __vgetcpu_mode & __jiffies  to the vsyscall_2 zone

We apparently hit the 1024 limit of vsyscall_0 zone when some debugging 
options are set, or if __vsyscall_gtod_data is 64 bytes larger.

In order to save 128 bytes from the vsyscall_0 zone, we move __vgetcpu_mode & 
__jiffies to vsyscall_2 zone where they really belong, since they are used 
only from vgetcpu() (which is in this vsyscall_2 area).

After patch is applied, new layout is :

ffffffffff600000 T vgettimeofday
ffffffffff60004e t vsysc2
ffffffffff600140 t vread_hpet
ffffffffff600150 t vread_tsc
ffffffffff600180 D __vsyscall_gtod_data
ffffffffff600400 T vtime
ffffffffff600413 t vsysc1
ffffffffff600800 T vgetcpu
ffffffffff600870 D __vgetcpu_mode
ffffffffff600880 D __jiffies
ffffffffff600c00 T venosys_1


Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>

[-- Attachment #2: x86_64_vmlinux_lds.patch --]
[-- Type: text/plain, Size: 878 bytes --]

--- linux-2.6.21-rc5/arch/x86_64/kernel/vmlinux.lds.S
+++ linux-2.6.21-rc5-ed/arch/x86_64/kernel/vmlinux.lds.S
@@ -94,6 +94,12 @@ SECTIONS
 		{ *(.vsyscall_gtod_data) }
   vsyscall_gtod_data = VVIRT(.vsyscall_gtod_data);
 
+
+  .vsyscall_1 ADDR(.vsyscall_0) + 1024: AT(VLOAD(.vsyscall_1))
+		{ *(.vsyscall_1) }
+  .vsyscall_2 ADDR(.vsyscall_0) + 2048: AT(VLOAD(.vsyscall_2))
+		{ *(.vsyscall_2) }
+
   .vgetcpu_mode : AT(VLOAD(.vgetcpu_mode)) { *(.vgetcpu_mode) }
   vgetcpu_mode = VVIRT(.vgetcpu_mode);
 
@@ -101,10 +107,6 @@ SECTIONS
   .jiffies : AT(VLOAD(.jiffies)) { *(.jiffies) }
   jiffies = VVIRT(.jiffies);
 
-  .vsyscall_1 ADDR(.vsyscall_0) + 1024: AT(VLOAD(.vsyscall_1))
-		{ *(.vsyscall_1) }
-  .vsyscall_2 ADDR(.vsyscall_0) + 2048: AT(VLOAD(.vsyscall_2))
-		{ *(.vsyscall_2) }
   .vsyscall_3 ADDR(.vsyscall_0) + 3072: AT(VLOAD(.vsyscall_3))
 		{ *(.vsyscall_3) }
 

  parent reply	other threads:[~2007-03-27 21:32 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-27  4:57 2.6.21-rc5-mm1 Andrew Morton
2007-03-27  6:20 ` 2.6.21-rc5-mm1 David Miller
2007-03-27 11:15 ` 2.6.21-rc5-mm1 Bartlomiej Zolnierkiewicz
2007-03-27 16:52 ` [-mm patch] fix arch/i386/kernel/marker.c compilation Adrian Bunk
2007-03-27 17:11   ` Mathieu Desnoyers
2007-03-27 17:29     ` Christoph Hellwig
2007-03-28 12:11     ` [-mm patch] no longer #include <asm/kdebug.h> Adrian Bunk
2007-03-27 17:39 ` 2.6.21-rc5-mm1 Badari Pulavarty
2007-03-27 16:48   ` 2.6.21-rc5-mm1 Andrew Morton
2007-03-27 17:57     ` 2.6.21-rc5-mm1 Badari Pulavarty
2007-03-27 20:12       ` 2.6.21-rc5-mm1 Andrew Morton
2007-03-27 20:30         ` 2.6.21-rc5-mm1 Eric Dumazet
2007-03-27 21:29         ` Eric Dumazet [this message]
2007-03-27 21:40           ` 2.6.21-rc5-mm1 Andrew Morton
2007-03-27 23:29             ` 2.6.21-rc5-mm1 Badari Pulavarty
2007-03-27 22:15         ` 2.6.21-rc5-mm1 Badari Pulavarty
2007-03-27 17:54 ` 2.6.21-rc5-mm1 Badari Pulavarty
2007-03-27 20:28   ` 2.6.21-rc5-mm1 Andrew Morton
2007-03-27 21:23 ` 2.6.21-rc5-mm1 Sam Ravnborg
2007-03-27 21:26 ` 2.6.21-rc5-mm1: i386/x86_64 register_die_notifier() change Adrian Bunk
2007-03-27 21:29   ` [discuss] " Andi Kleen
2007-03-28 12:11 ` [-mm patch] drivers/mtd/ubi/: make code static Adrian Bunk
2007-03-28 12:58   ` Artem Bityutskiy
2007-03-28 16:44 ` 2.6.21-rc5-mm1 Mariusz Kozłowski
2007-03-28 19:59   ` 2.6.21-rc5-mm1 Mariusz Kozłowski
2007-03-28 20:02   ` 2.6.21-rc5-mm1 Andrew Morton
2007-03-28 20:25     ` 2.6.21-rc5-mm1 Adrian Bunk
2007-03-28 20:49       ` 2.6.21-rc5-mm1 Mariusz Kozłowski
2007-03-29 18:01         ` 2.6.21-rc5-mm1 Mariusz Kozłowski
2007-03-29 17:52           ` 2.6.21-rc5-mm1 Andrew Morton
2007-03-29 18:45             ` 2.6.21-rc5-mm1 Mariusz Kozłowski
2007-03-29 18:38               ` 2.6.21-rc5-mm1 Ingo Molnar
2007-03-29 19:02                 ` 2.6.21-rc5-mm1 Mariusz Kozłowski
2007-03-29 19:40                   ` 2.6.21-rc5-mm1 Matt Mackall
2007-03-29 18:21           ` 2.6.21-rc5-mm1 Matt Mackall
2007-03-29 18:55             ` 2.6.21-rc5-mm1 Mariusz Kozłowski
2007-03-29 19:46               ` 2.6.21-rc5-mm1 Matt Mackall
2007-03-28 20:31     ` 2.6.21-rc5-mm1 john stultz
2007-03-31  6:28       ` 2.6.21-rc5-mm1 Mariusz Kozłowski
     [not found] ` <48f7fe350703291332q5f2da2dar7c52afd34f79072a@mail.gmail.com>
2007-03-29 21:33   ` 2.6.21-rc5-mm1 Andrew Morton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=46098CBE.7010807@cosmosbay.com \
    --to=dada1@cosmosbay.com \
    --cc=ak@suse.de \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbadari@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox