29 Dec, 2005

1 commit


23 Dec, 2005

2 commits

  • It's definition is wrong (-1 means "no limit" not 999),
    only the Sparc SunOS/Solaris compat code uses it, so
    let's just kill it off completely from limits.h and
    all referencing code.

    Noticed by Ulrich Drepper.

    Signed-off-by: David S. Miller

    David S. Miller
     
  • Introduce a Kconfig symbol SPARC that is defined on both the sparc and
    sparc64 architectures.

    This symbol makes some dependencies more readable.

    Signed-off-by: Adrian Bunk
    Signed-off-by: David S. Miller

    Adrian Bunk
     

21 Dec, 2005

1 commit

  • It was a stupid workaround for the "static inline" vs.
    "extern inline" issues of long ago, and it is what causes
    schedule() to be inlined like crazy into kernel/sched.c
    when -Os is specified.

    MIPS and S390 should probably do the same.

    Now CC_OPTIMIZE_FOR_SIZE can be safely used on sparc64
    once more.

    Signed-off-by: David S. Miller

    David S. Miller
     

13 Dec, 2005

1 commit

  • When multiple probes are registered at the same address and if due to some
    recursion (probe getting triggered within a probe handler), we skip calling
    pre_handlers and just increment nmissed field.

    The below patch make sure it walks the list for multiple probes case.
    Without the below patch we get incorrect results of nmissed count for
    multiple probe case.

    Signed-off-by: Anil S Keshavamurthy
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Keshavamurthy Anil S
     

30 Nov, 2005

1 commit


29 Nov, 2005

1 commit


23 Nov, 2005

2 commits

  • Earlier I unifdefed PageCompound, so that snd_pcm_mmap_control_nopage and
    others can give out a 0-order component of a higher-order page, which won't
    be mistakenly freed when zap_pte_range unmaps it. But many Bad page states
    reported a PG_reserved was freed after all: I had missed that we need to
    say __GFP_COMP to get compound page behaviour.

    Some of these higher-order pages are allocated by snd_malloc_pages, some by
    snd_malloc_dev_pages; or if SBUS, by sbus_alloc_consistent - but that has
    no gfp arg, so add __GFP_COMP into its sparc32/64 implementations.

    I'm still rather puzzled that DRM seems not to need a similar change.

    Signed-off-by: Hugh Dickins
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Hugh Dickins
     
  • Although we tend to associate VM_RESERVED with remap_pfn_range, quite a few
    drivers set VM_RESERVED on areas which are then populated by nopage. The
    PageReserved removal in 2.6.15-rc1 changed VM_RESERVED not to free pages in
    zap_pte_range, without changing those drivers not to set it: so their pages
    just leak away.

    Let's not change miscellaneous drivers now: introduce VM_UNPAGED at the core,
    to flag the special areas where the ptes may have no struct page, or if they
    have then it's not to be touched. Replace most instances of VM_RESERVED in
    core mm by VM_UNPAGED. Force it on in remap_pfn_range, and the sparc and
    sparc64 io_remap_pfn_range.

    Revert addition of VM_RESERVED to powerpc vdso, it's not needed there. Is it
    needed anywhere? It still governs the mm->reserved_vm statistic, and special
    vmas not to be merged, and areas not to be core dumped; but could probably be
    eliminated later (the drivers are probably specifying it because in 2.4 it
    kept swapout off the vma, but in 2.6 we work from the LRU, which these pages
    don't get on).

    Use the VM_SHM slot for VM_UNPAGED, and define VM_SHM to 0: it serves no
    purpose whatsoever, and should be removed from drivers when we clean up.

    Signed-off-by: Hugh Dickins
    Acked-by: William Irwin
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Hugh Dickins
     

13 Nov, 2005

1 commit

  • This patch adds a new function, sbusfb_compat_ioctl() to
    drivers/video/sbuslib.c and uses it as compat_ioctl in all sbus fb
    drivers

    This remove the last per-arch compat ioctl bits in
    arch/sparc64/kernel/ioctl32.c so it would be nice if people could test
    if this actually copiles and works and if yes apply it :)

    Signed-off-by: Christoph Hellwig
    Signed-off-by: David S. Miller

    Christoph Hellwig
     

12 Nov, 2005

1 commit

  • Noticed by Tom 'spot' Callaway.

    Even on uniprocessor we always reported the number of physical
    cpus in the system via /proc/cpuinfo. But when this got changed
    to use num_possible_cpus() it always reads as "1" on uniprocessor.
    This change was unintentional.

    So scan the firmware device tree and count the number of cpu
    nodes, and report that, as we always did.

    Signed-off-by: David S. Miller

    David S. Miller
     

10 Nov, 2005

2 commits


09 Nov, 2005

4 commits

  • Make some changes to the NEED_RESCHED and POLLING_NRFLAG to reduce
    confusion, and make their semantics rigid. Improves efficiency of
    resched_task and some cpu_idle routines.

    * In resched_task:
    - TIF_NEED_RESCHED is only cleared with the task's runqueue lock held,
    and as we hold it during resched_task, then there is no need for an
    atomic test and set there. The only other time this should be set is
    when the task's quantum expires, in the timer interrupt - this is
    protected against because the rq lock is irq-safe.

    - If TIF_NEED_RESCHED is set, then we don't need to do anything. It
    won't get unset until the task get's schedule()d off.

    - If we are running on the same CPU as the task we resched, then set
    TIF_NEED_RESCHED and no further action is required.

    - If we are running on another CPU, and TIF_POLLING_NRFLAG is *not* set
    after TIF_NEED_RESCHED has been set, then we need to send an IPI.

    Using these rules, we are able to remove the test and set operation in
    resched_task, and make clear the previously vague semantics of
    POLLING_NRFLAG.

    * In idle routines:
    - Enter cpu_idle with preempt disabled. When the need_resched() condition
    becomes true, explicitly call schedule(). This makes things a bit clearer
    (IMO), but haven't updated all architectures yet.

    - Many do a test and clear of TIF_NEED_RESCHED for some reason. According
    to the resched_task rules, this isn't needed (and actually breaks the
    assumption that TIF_NEED_RESCHED is only cleared with the runqueue lock
    held). So remove that. Generally one less locked memory op when switching
    to the idle thread.

    - Many idle routines clear TIF_POLLING_NRFLAG, and only set it in the inner
    most polling idle loops. The above resched_task semantics allow it to be
    set until before the last time need_resched() is checked before going into
    a halt requiring interrupt wakeup.

    Many idle routines simply never enter such a halt, and so POLLING_NRFLAG
    can be always left set, completely eliminating resched IPIs when rescheduling
    the idle task.

    POLLING_NRFLAG width can be increased, to reduce the chance of resched IPIs.

    Signed-off-by: Nick Piggin
    Cc: Ingo Molnar
    Cc: Con Kolivas
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nick Piggin
     
  • Run idle threads with preempt disabled.

    Also corrected a bugs in arm26's cpu_idle (make it actually call schedule()).
    How did it ever work before?

    Might fix the CPU hotplugging hang which Nigel Cunningham noted.

    We think the bug hits if the idle thread is preempted after checking
    need_resched() and before going to sleep, then the CPU offlined.

    After calling stop_machine_run, the CPU eventually returns from preemption and
    into the idle thread and goes to sleep. The CPU will continue executing
    previous idle and have no chance to call play_dead.

    By disabling preemption until we are ready to explicitly schedule, this bug is
    fixed and the idle threads generally become more robust.

    From: alexs

    PPC build fix

    From: Yoichi Yuasa

    MIPS build fix

    Signed-off-by: Nick Piggin
    Signed-off-by: Yoichi Yuasa
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nick Piggin
     
  • Some architectures define and use this type in their compat_ioctl code, but
    all of them can easily use the identical ioctl_trans_handler_t type that is
    defined in common code.

    Signed-off-by: Christoph Hellwig
    Cc: Andi Kleen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Hellwig
     
  • Update comment on get_user_insn to the more general "pte lock", which may
    or may not be the page_table_lock. Note vmtruncate handled like kswapd.

    Signed-off-by: Hugh Dickins
    Signed-off-by: David S. Miller

    Hugh Dickins
     

08 Nov, 2005

16 commits


07 Nov, 2005

6 commits

  • This is the arch/ part of the big kfree cleanup patch.

    Remove pointless checks for NULL prior to calling kfree() in arch/.

    Signed-off-by: Jesper Juhl
    Acked-by: Grant Grundler
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jesper Juhl
     
  • Reorganize the preempt_disable/enable calls to eliminate the extra preempt
    depth. Changes based on Paul McKenney's review suggestions for the kprobes
    RCU changeset.

    Signed-off-by: Ananth N Mavinakayanahalli
    Signed-off-by: Anil S Keshavamurthy
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ananth N Mavinakayanahalli
     
  • Changes to the arch kprobes infrastructure to take advantage of the locking
    changes introduced by usage of RCU for synchronization. All handlers are now
    run without any locks held, so they have to be re-entrant or provide their own
    synchronization.

    Signed-off-by: Ananth N Mavinakayanahalli
    Signed-off-by: Anil S Keshavamurthy
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ananth N Mavinakayanahalli
     
  • Sparc64 changes to track kprobe execution on a per-cpu basis. We now track
    the kprobe state machine independently on each cpu using an arch specific
    kprobe control block.

    Signed-off-by: Ananth N Mavinakayanahalli
    Signed-off-by: Anil S Keshavamurthy
    Cc: "David S. Miller"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ananth N Mavinakayanahalli
     
  • The following set of patches are aimed at improving kprobes scalability. We
    currently serialize kprobe registration, unregistration and handler execution
    using a single spinlock - kprobe_lock.

    With these changes, kprobe handlers can run without any locks held. It also
    allows for simultaneous kprobe handler executions on different processors as
    we now track kprobe execution on a per processor basis. It is now necessary
    that the handlers be re-entrant since handlers can run concurrently on
    multiple processors.

    All changes have been tested on i386, ia64, ppc64 and x86_64, while sparc64
    has been compile tested only.

    The patches can be viewed as 3 logical chunks:

    patch 1: Reorder preempt_(dis/en)able calls
    patches 2-7: Introduce per_cpu data areas to track kprobe execution
    patches 8-9: Use RCU to synchronize kprobe (un)registration and handler
    execution.

    Thanks to Maneesh Soni, James Keniston and Anil Keshavamurthy for their
    review and suggestions. Thanks again to Anil, Hien Nguyen and Kevin Stafford
    for testing the patches.

    This patch:

    Reorder preempt_disable/enable() calls in arch kprobes files in preparation to
    introduce locking changes. No functional changes introduced by this patch.

    Signed-off-by: Ananth N Mavinakayahanalli
    Signed-off-by: Anil S Keshavamurthy
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ananth N Mavinakayanahalli
     
  • Andrew Morton suggested to move kprobes from kernel hacking menu, since
    kernel hacking menu is in-appropriate for the Kprobes. This patch moves
    Kprobes and Oprofile under instrumentation menu.

    (akpm: it's not a natural fit, but things like djprobes and the s390 guys'
    statistics library need a home)

    Signed-of-by: Prasanna S Panchamukhi
    Cc: Philippe Elie
    Cc: John Levon
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Prasanna S Panchamukhi
     

31 Oct, 2005

1 commit