09 Mar, 2011

1 commit

  • Put x86 entry code into a separate link section: .entry.text.

    Separating the entry text section seems to have performance
    benefits - caused by more efficient instruction cache usage.

    Running hackbench with perf stat --repeat showed that the change
    compresses the icache footprint. The icache load miss rate went
    down by about 15%:

    before patch:
    19417627 L1-icache-load-misses ( +- 0.147% )

    after patch:
    16490788 L1-icache-load-misses ( +- 0.180% )

    The motivation of the patch was to fix a particular kprobes
    bug that relates to the entry text section, the performance
    advantage was discovered accidentally.

    Whole perf output follows:

    - results for current tip tree:

    Performance counter stats for './hackbench/hackbench 10' (500 runs):

    19417627 L1-icache-load-misses ( +- 0.147% )
    2676914223 instructions # 0.497 IPC ( +- 0.079% )
    5389516026 cycles ( +- 0.144% )

    0.206267711 seconds time elapsed ( +- 0.138% )

    - results for current tip tree with the patch applied:

    Performance counter stats for './hackbench/hackbench 10' (500 runs):

    16490788 L1-icache-load-misses ( +- 0.180% )
    2717734941 instructions # 0.502 IPC ( +- 0.079% )
    5414756975 cycles ( +- 0.148% )

    0.206747566 seconds time elapsed ( +- 0.137% )

    Signed-off-by: Jiri Olsa
    Cc: Arnaldo Carvalho de Melo
    Cc: Frederic Weisbecker
    Cc: Peter Zijlstra
    Cc: Linus Torvalds
    Cc: Andrew Morton
    Cc: Nick Piggin
    Cc: Eric Dumazet
    Cc: masami.hiramatsu.pt@hitachi.com
    Cc: ananth@in.ibm.com
    Cc: davem@davemloft.net
    Cc: 2nddept-manager@sdl.hitachi.co.jp
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Jiri Olsa
     

23 Sep, 2009

1 commit

  • Some ports (like the Blackfin arch) have a discontiguous memory map which
    means there may be text or data that falls outside of the standard range
    of the start/end text/data symbols. Creating some helper functions allows
    these non-standard ports to declare these regions without adversely
    affecting anyone else.

    Signed-off-by: Mike Frysinger
    Cc: Ingo Molnar
    Cc: Robin Getz
    Cc: Sam Ravnborg
    Cc: Peter Zijlstra
    Cc: Arnd Bergmann
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mike Frysinger
     

19 Jun, 2009

1 commit

  • Call constructors (gcc-generated initcall-like functions) during kernel
    start and module load. Constructors are e.g. used for gcov data
    initialization.

    Disable constructor support for usermode Linux to prevent conflicts with
    host glibc.

    Signed-off-by: Peter Oberparleiter
    Acked-by: Rusty Russell
    Acked-by: WANG Cong
    Cc: Sam Ravnborg
    Cc: Jeff Dike
    Cc: Andi Kleen
    Cc: Huang Ying
    Cc: Li Wei
    Cc: Michael Ellerman
    Cc: Ingo Molnar
    Cc: Heiko Carstens
    Cc: Martin Schwidefsky
    Cc: Al Viro
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Peter Oberparleiter
     

16 Jan, 2009

1 commit

  • [ Based on original patch from Christoph Lameter and Mike Travis. ]

    This patch makes percpu symbols zerobased on x86_64 SMP by adding
    PERCPU_VADDR() to vmlinux.lds.h which helps setting explicit vaddr on
    the percpu output section and using it in vmlinux_64.lds.S. A new
    PHDR is added as existing ones cannot contain sections near address
    zero. PERCPU_VADDR() also adds a new symbol __per_cpu_load which
    always points to the vaddr of the loaded percpu data.init region.

    The following adjustments have been made to accomodate the address
    change.

    * code to locate percpu gdt_page in head_64.S is updated to add the
    load address to the gdt_page offset.

    * __per_cpu_load is used in places where access to the init data area
    is necessary.

    * pda->data_offset is initialized soon after C code is entered as zero
    value doesn't work anymore.

    This patch is mostly taken from Mike Travis' "x86_64: Base percpu
    variables at zero" patch.

    Signed-off-by: Tejun Heo
    Signed-off-by: Ingo Molnar

    Tejun Heo
     

10 Sep, 2008

1 commit

  • It was introduced by "vsprintf: add support for '%pS' and '%pF' pointer
    formats" in commit 0fe1ef24f7bd0020f29ffe287dfdb9ead33ca0b2. However,
    the current way its coded doesn't work on parisc64. For two reasons: 1)
    parisc isn't in the #ifdef and 2) parisc has a different format for
    function descriptors

    Make dereference_function_descriptor() more accommodating by allowing
    architecture overrides. I put the three overrides (for parisc64, ppc64
    and ia64) in arch/kernel/module.c because that's where the kernel
    internal linker which knows how to deal with function descriptors sits.

    Signed-off-by: James Bottomley
    Acked-by: Benjamin Herrenschmidt
    Acked-by: Tony Luck
    Acked-by: Kyle McMartin
    Signed-off-by: Linus Torvalds

    James Bottomley
     

07 Feb, 2008

1 commit

  • When passing a zero address to kallsyms_lookup(), the kernel thought it was
    a valid kernel address, even if it is not. This is because is_ksym_addr()
    called is_kernel_extratext() and checked against labels that don't exist on
    many archs (which default as zero). Since PPC was the only kernel which
    defines _extra_text, (in 2005), and no longer needs it, this patch removes
    _extra_text support.

    For some history (provided by Jon):
    http://ozlabs.org/pipermail/linuxppc-dev/2005-September/019734.html
    http://ozlabs.org/pipermail/linuxppc-dev/2005-September/019736.html
    http://ozlabs.org/pipermail/linuxppc-dev/2005-September/019751.html

    [akpm@linux-foundation.org: coding-style fixes]
    Signed-off-by: Robin Getz
    Cc: David Woodhouse
    Cc: Jon Loeliger
    Cc: Paul Mackerras
    Cc: Benjamin Herrenschmidt
    Cc: Sam Ravnborg
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Robin Getz
     

02 Jul, 2006

1 commit


15 Nov, 2005

1 commit


08 Sep, 2005

1 commit

  • There are possible race conditions if probes are placed on routines within the
    kprobes files and routines used by the kprobes. For example if you put probe
    on get_kprobe() routines, the system can hang while inserting probes on any
    routine such as do_fork(). Because while inserting probes on do_fork(),
    register_kprobes() routine grabs the kprobes spin lock and executes
    get_kprobe() routine and to handle probe of get_kprobe(), kprobes_handler()
    gets executed and tries to grab kprobes spin lock, and spins forever. This
    patch avoids such possible race conditions by preventing probes on routines
    within the kprobes file and routines used by kprobes.

    I have modified the patches as per Andi Kleen's suggestion to move kprobes
    routines and other routines used by kprobes to a seperate section
    .kprobes.text.

    Also moved page fault and exception handlers, general protection fault to
    .kprobes.text section.

    These patches have been tested on i386, x86_64 and ppc64 architectures, also
    compiled on ia64 and sparc64 architectures.

    Signed-off-by: Prasanna S Panchamukhi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Prasanna S Panchamukhi
     

29 Jul, 2005

1 commit

  • Minor cleanup.

    Move things into their include files, remove obsolete includes, fix
    indentation, remove obsolete special cases etc.

    I also added the per cpu section to asm-generic/sections.h and fixed
    init/main.c to use it.

    Signed-off-by: Andi Kleen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andi Kleen
     

06 May, 2005

1 commit

  • The PPC32 kernel puts platform-specific functions into separate sections so
    that unneeded parts of it can be freed when we've booted and actually
    worked out what we're running on today.

    This makes kallsyms ignore those functions, because they're not between
    _[se]text or _[se]inittext. Rather than teaching kallsyms about the
    various pmac/chrp/etc sections, this patch adds '_[se]extratext' markers
    for kallsyms.

    Signed-off-by: David Woodhouse
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Woodhouse
     

17 Apr, 2005

1 commit

  • Initial git repository build. I'm not bothering with the full history,
    even though we have it. We can create a separate "historical" git
    archive of that later if we want to, and in the meantime it's about
    3.2GB when imported into git - space that would just make the early
    git days unnecessarily complicated, when we don't have a lot of good
    infrastructure for it.

    Let it rip!

    Linus Torvalds