From: David Daney <ddaney@caviumnetworks.com>
To: ralf@linux-mips.org
Cc: linux-mips@linux-mips.org
Subject: Re: [PATCH 0/3] MIPS vdso and signal delivery optimization (v2)
Date: Fri, 19 Feb 2010 14:08:20 -0800 [thread overview]
Message-ID: <4B7F0BD4.3070909@caviumnetworks.com> (raw)
In-Reply-To: <4B7DF12B.6090802@caviumnetworks.com>
[-- Attachment #1: Type: text/plain, Size: 2351 bytes --]
On 02/18/2010 06:02 PM, David Daney wrote:
> Well this patch set does cause gdb to no longer be able to generate
> stack traces from signal handlers, but that just means gdb needs to be
> fixed. We will work on that next.
Attached is the corresponding gdb patch. I will push it into the
upstream gdb.
David Daney
>
> libgcc can unwind through signal handlers both with and without the patch.
>
> David Daney
>
>
> On 02/18/2010 04:13 PM, David Daney wrote:
>> This patch set creates a vdso and moves the signal
>> trampolines to it from their previous home on the stack.
>>
>> In the original patch set:
>> http://www.linux-mips.org/cgi-bin/mesg.cgi?a=linux-mips&i=49EE3B0F.3040506%40caviumnetworks.com
>>
>>
>> I stated:
>>
>> Tested with a 64-bit kernel on a Cavium Octeon cn3860 where I have the
>> following results from lmbench2:
>>
>> Before:
>> n64 - Signal handler overhead: 14.517 microseconds
>> n32 - Signal handler overhead: 14.497 microseconds
>> o32 - Signal handler overhead: 16.637 microseconds
>>
>> After:
>>
>> n64 - Signal handler overhead: 7.935 microseconds
>> n32 - Signal handler overhead: 7.334 microseconds
>> o32 - Signal handler overhead: 8.628 microsecond
>>
>> All that is still true.
>>
>> Improvements from the first version:
>>
>> * Compiles and runs in 32-bit kernels (on qemu at least).
>>
>> * Updated for linux-queue based 2.6.33-rc8
>>
>> David Daney (3):
>> MIPS: Add SYSCALL to uasm.
>> MIPS: Preliminary vdso.
>> MIPS: Move signal trampolines off of the stack.
>>
>> arch/mips/include/asm/abi.h | 6 +-
>> arch/mips/include/asm/elf.h | 4 +
>> arch/mips/include/asm/mmu.h | 5 +-
>> arch/mips/include/asm/mmu_context.h | 2 +-
>> arch/mips/include/asm/processor.h | 11 +++-
>> arch/mips/include/asm/uasm.h | 1 +
>> arch/mips/include/asm/vdso.h | 29 +++++++++
>> arch/mips/kernel/Makefile | 2 +-
>> arch/mips/kernel/signal-common.h | 5 --
>> arch/mips/kernel/signal.c | 86 ++++++---------------------
>> arch/mips/kernel/signal32.c | 55 ++++-------------
>> arch/mips/kernel/signal_n32.c | 26 ++------
>> arch/mips/kernel/syscall.c | 6 ++-
>> arch/mips/kernel/vdso.c | 112 +++++++++++++++++++++++++++++++++++
>> arch/mips/mm/uasm.c | 19 +++++-
>> 15 files changed, 226 insertions(+), 143 deletions(-)
>> create mode 100644 arch/mips/include/asm/vdso.h
>> create mode 100644 arch/mips/kernel/vdso.c
>>
>>
>
>
[-- Attachment #2: gdb.patch --]
[-- Type: text/plain, Size: 1691 bytes --]
Index: gdb/mips-linux-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/mips-linux-tdep.c,v
retrieving revision 1.81
diff -u -p -r1.81 mips-linux-tdep.c
--- gdb/mips-linux-tdep.c 1 Jan 2010 07:31:37 -0000 1.81
+++ gdb/mips-linux-tdep.c 19 Feb 2010 21:58:32 -0000
@@ -797,7 +797,7 @@ static const struct tramp_frame mips_lin
struct sigframe {
u32 sf_ass[4]; [argument save space for o32]
- u32 sf_code[2]; [signal trampoline]
+ u32 sf_code[2]; [signal trampoline or fill]
struct sigcontext sf_sc;
sigset_t sf_mask;
};
@@ -827,7 +827,7 @@ static const struct tramp_frame mips_lin
struct rt_sigframe {
u32 rs_ass[4]; [argument save space for o32]
- u32 rs_code[2] [signal trampoline]
+ u32 rs_code[2] [signal trampoline or fill]
struct siginfo rs_info;
struct ucontext rs_uc;
};
@@ -871,7 +871,7 @@ mips_linux_o32_sigframe_init (const stru
{
struct gdbarch *gdbarch = get_frame_arch (this_frame);
int ireg, reg_position;
- CORE_ADDR sigcontext_base = func - SIGFRAME_CODE_OFFSET;
+ CORE_ADDR sigcontext_base = get_frame_sp (this_frame);
const struct mips_regnum *regs = mips_regnum (gdbarch);
CORE_ADDR regs_base;
@@ -1038,7 +1038,7 @@ mips_linux_n32n64_sigframe_init (const s
{
struct gdbarch *gdbarch = get_frame_arch (this_frame);
int ireg, reg_position;
- CORE_ADDR sigcontext_base = func - SIGFRAME_CODE_OFFSET;
+ CORE_ADDR sigcontext_base = get_frame_sp (this_frame);
const struct mips_regnum *regs = mips_regnum (gdbarch);
if (self == &mips_linux_n32_rt_sigframe)
next prev parent reply other threads:[~2010-02-19 22:09 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-19 0:13 [PATCH 0/3] MIPS vdso and signal delivery optimization (v2) David Daney
2010-02-19 0:13 ` [PATCH 1/3] MIPS: Add SYSCALL to uasm David Daney
2010-03-16 19:55 ` Ralf Baechle
2010-02-19 0:13 ` [PATCH 2/3] MIPS: Preliminary vdso David Daney
2010-02-23 20:40 ` Manuel Lauss
2010-02-23 21:27 ` David Daney
2010-02-23 21:35 ` Ralf Baechle
2010-03-16 19:55 ` Ralf Baechle
2010-02-19 0:13 ` [PATCH 3/3] MIPS: Move signal trampolines off of the stack David Daney
2010-03-16 19:56 ` Ralf Baechle
2010-02-19 2:02 ` [PATCH 0/3] MIPS vdso and signal delivery optimization (v2) David Daney
2010-02-19 22:08 ` David Daney [this message]
2010-02-19 13:57 ` Ralf Baechle
2010-02-19 14:38 ` Ralf Baechle
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=4B7F0BD4.3070909@caviumnetworks.com \
--to=ddaney@caviumnetworks.com \
--cc=linux-mips@linux-mips.org \
--cc=ralf@linux-mips.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.