05 Aug, 2008

14 commits


01 Aug, 2008

2 commits

  • That's the userland thread register, so we should never try to change
    it like this.

    Based upon glibc bug nptl/6577 and suggestions by Jakub Jelinek.

    Signed-off-by: David S. Miller

    David S. Miller
     
  • The story is that what we used to do when we actually used
    smp_report_regs() is that if you specifically only wanted to have the
    current cpu's registers dumped you would call "__show_regs()"
    otherwise you would call show_regs() which also invoked
    smp_report_regs().

    Now that we killed off smp_report_regs() there is no longer any
    reason to have these two routines, just show_regs() is sufficient.

    Also kill off a stray declaration of show_regs() in sparc64_ksym.c

    Signed-off-by: David S. Miller

    David S. Miller
     

31 Jul, 2008

4 commits


30 Jul, 2008

1 commit


28 Jul, 2008

6 commits


27 Jul, 2008

1 commit

  • Remove arch-specific show_mem() in favor of the generic version.

    This also removes the following redundant information display:

    - free swap pages, printed by show_swap_cache_info()
    - pages in swapcache, printed by show_swap_cache_info()
    - dirty pages, writeback pages, mapped pages, slab pages,
    pagetables pages, printed by show_free_areas()

    where show_mem() calls show_free_areas(), which calls
    show_swap_cache_info().

    Signed-off-by: Johannes Weiner
    Acked-by: David S. Miller
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Johannes Weiner
     

26 Jul, 2008

3 commits

  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
    sparc: Wire up new system calls.

    Linus Torvalds
     
  • This wires up the recently added Wire up signalfd4, eventfd2,
    epoll_create1, dup3, pipe2, and inotify_init1 system calls.

    Signed-off-by: David S. Miller

    David S. Miller
     
  • Currently list of kretprobe instances are stored in kretprobe object (as
    used_instances,free_instances) and in kretprobe hash table. We have one
    global kretprobe lock to serialise the access to these lists. This causes
    only one kretprobe handler to execute at a time. Hence affects system
    performance, particularly on SMP systems and when return probe is set on
    lot of functions (like on all systemcalls).

    Solution proposed here gives fine-grain locks that performs better on SMP
    system compared to present kretprobe implementation.

    Solution:

    1) Instead of having one global lock to protect kretprobe instances
    present in kretprobe object and kretprobe hash table. We will have
    two locks, one lock for protecting kretprobe hash table and another
    lock for kretporbe object.

    2) We hold lock present in kretprobe object while we modify kretprobe
    instance in kretprobe object and we hold per-hash-list lock while
    modifying kretprobe instances present in that hash list. To prevent
    deadlock, we never grab a per-hash-list lock while holding a kretprobe
    lock.

    3) We can remove used_instances from struct kretprobe, as we can
    track used instances of kretprobe instances using kretprobe hash
    table.

    Time duration for kernel compilation ("make -j 8") on a 8-way ppc64 system
    with return probes set on all systemcalls looks like this.

    cacheline non-cacheline Un-patched kernel
    aligned patch aligned patch
    ===============================================================================
    real 9m46.784s 9m54.412s 10m2.450s
    user 40m5.715s 40m7.142s 40m4.273s
    sys 2m57.754s 2m58.583s 3m17.430s
    ===========================================================

    Time duration for kernel compilation ("make -j 8) on the same system, when
    kernel is not probed.
    =========================
    real 9m26.389s
    user 40m8.775s
    sys 2m7.283s
    =========================

    Signed-off-by: Srinivasa DS
    Signed-off-by: Jim Keniston
    Acked-by: Ananth N Mavinakayanahalli
    Cc: Anil S Keshavamurthy
    Cc: David S. Miller
    Cc: Masami Hiramatsu
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Srinivasa D S
     

25 Jul, 2008

7 commits

  • …el/git/tip/linux-2.6-tip

    * 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    nohz: adjust tick_nohz_stop_sched_tick() call of s390 as well
    nohz: prevent tick stop outside of the idle loop

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
    sparc64: Fix cpufreq notifier registry.
    sparc64: Fix lockdep issues in LDC protocol layer.

    Linus Torvalds
     
  • This patch introduces the new syscall pipe2 which is like pipe but it also
    takes an additional parameter which takes a flag value. This patch implements
    the handling of O_CLOEXEC for the flag. I did not add support for the new
    syscall for the architectures which have a special sys_pipe implementation. I
    think the maintainers of those archs have the chance to go with the unified
    implementation but that's up to them.

    The implementation introduces do_pipe_flags. I did that instead of changing
    all callers of do_pipe because some of the callers are written in assembler.
    I would probably screw up changing the assembly code. To avoid breaking code
    do_pipe is now a small wrapper around do_pipe_flags. Once all callers are
    changed over to do_pipe_flags the old do_pipe function can be removed.

    The following test must be adjusted for architectures other than x86 and
    x86-64 and in case the syscall numbers changed.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    #include
    #include
    #include
    #include

    #ifndef __NR_pipe2
    # ifdef __x86_64__
    # define __NR_pipe2 293
    # elif defined __i386__
    # define __NR_pipe2 331
    # else
    # error "need __NR_pipe2"
    # endif
    #endif

    int
    main (void)
    {
    int fd[2];
    if (syscall (__NR_pipe2, fd, 0) != 0)
    {
    puts ("pipe2(0) failed");
    return 1;
    }
    for (int i = 0; i < 2; ++i)
    {
    int coe = fcntl (fd[i], F_GETFD);
    if (coe == -1)
    {
    puts ("fcntl failed");
    return 1;
    }
    if (coe & FD_CLOEXEC)
    {
    printf ("pipe2(0) set close-on-exit for fd[%d]\n", i);
    return 1;
    }
    }
    close (fd[0]);
    close (fd[1]);

    if (syscall (__NR_pipe2, fd, O_CLOEXEC) != 0)
    {
    puts ("pipe2(O_CLOEXEC) failed");
    return 1;
    }
    for (int i = 0; i < 2; ++i)
    {
    int coe = fcntl (fd[i], F_GETFD);
    if (coe == -1)
    {
    puts ("fcntl failed");
    return 1;
    }
    if ((coe & FD_CLOEXEC) == 0)
    {
    printf ("pipe2(O_CLOEXEC) does not set close-on-exit for fd[%d]\n", i);
    return 1;
    }
    }
    close (fd[0]);
    close (fd[1]);

    puts ("OK");

    return 0;
    }
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    Signed-off-by: Ulrich Drepper
    Acked-by: Davide Libenzi
    Cc: Michael Kerrisk
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ulrich Drepper
     
  • On 32-bit architectures PAGE_ALIGN() truncates 64-bit values to the 32-bit
    boundary. For example:

    u64 val = PAGE_ALIGN(size);

    always returns a value < 4GB even if size is greater than 4GB.

    The problem resides in PAGE_MASK definition (from include/asm-x86/page.h for
    example):

    #define PAGE_SHIFT 12
    #define PAGE_SIZE (_AC(1,UL) << PAGE_SHIFT)
    #define PAGE_MASK (~(PAGE_SIZE-1))
    ...
    #define PAGE_ALIGN(addr) (((addr)+PAGE_SIZE-1)&PAGE_MASK)

    The "~" is performed on a 32-bit value, so everything in "and" with
    PAGE_MASK greater than 4GB will be truncated to the 32-bit boundary.
    Using the ALIGN() macro seems to be the right way, because it uses
    typeof(addr) for the mask.

    Also move the PAGE_ALIGN() definitions out of include/asm-*/page.h in
    include/linux/mm.h.

    See also lkml discussion: http://lkml.org/lkml/2008/6/11/237

    [akpm@linux-foundation.org: fix drivers/media/video/uvc/uvc_queue.c]
    [akpm@linux-foundation.org: fix v850]
    [akpm@linux-foundation.org: fix powerpc]
    [akpm@linux-foundation.org: fix arm]
    [akpm@linux-foundation.org: fix mips]
    [akpm@linux-foundation.org: fix drivers/media/video/pvrusb2/pvrusb2-dvb.c]
    [akpm@linux-foundation.org: fix drivers/mtd/maps/uclinux.c]
    [akpm@linux-foundation.org: fix powerpc]
    Signed-off-by: Andrea Righi
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrea Righi
     
  • Straight forward extensions for huge pages located in the PUD instead of
    PMDs.

    Signed-off-by: Andi Kleen
    Signed-off-by: Nick Piggin
    Cc: Martin Schwidefsky
    Cc: Heiko Carstens
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andi Kleen
     
  • The goal of this patchset is to support multiple hugetlb page sizes. This
    is achieved by introducing a new struct hstate structure, which
    encapsulates the important hugetlb state and constants (eg. huge page
    size, number of huge pages currently allocated, etc).

    The hstate structure is then passed around the code which requires these
    fields, they will do the right thing regardless of the exact hstate they
    are operating on.

    This patch adds the hstate structure, with a single global instance of it
    (default_hstate), and does the basic work of converting hugetlb to use the
    hstate.

    Future patches will add more hstate structures to allow for different
    hugetlbfs mounts to have different page sizes.

    [akpm@linux-foundation.org: coding-style fixes]
    Acked-by: Adam Litke
    Acked-by: Nishanth Aravamudan
    Signed-off-by: Andi Kleen
    Signed-off-by: Nick Piggin
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andi Kleen
     
  • There are a lot of places that define either a single bootmem descriptor or an
    array of them. Use only one central array with MAX_NUMNODES items instead.

    Signed-off-by: Johannes Weiner
    Acked-by: Ralf Baechle
    Cc: Ingo Molnar
    Cc: Richard Henderson
    Cc: Russell King
    Cc: Tony Luck
    Cc: Hirokazu Takata
    Cc: Geert Uytterhoeven
    Cc: Kyle McMartin
    Cc: Paul Mackerras
    Cc: Paul Mundt
    Cc: David S. Miller
    Cc: Yinghai Lu
    Cc: Christoph Lameter
    Cc: Mel Gorman
    Cc: Andy Whitcroft
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Johannes Weiner
     

24 Jul, 2008

1 commit


23 Jul, 2008

1 commit

  • We're calling request_irq() with a IRQs disabled.

    No straightforward fix exists because we want to
    enable these IRQs and setup state atomically before
    getting into the IRQ handler the first time.

    What happens now is that we mark the VIRQ to not be
    automatically enabled by request_irq(). Then we
    make explicit enable_irq() calls when we grab the
    LDC channel.

    This way we don't need to call request_irq() illegally
    under the LDC channel lock any more.

    Bump LDC version and release date.

    Signed-off-by: David S. Miller

    David S. Miller