15 Oct, 2008

1 commit

  • * 'for-2.6.28' of git://linux-nfs.org/~bfields/linux: (59 commits)
    svcrdma: Fix IRD/ORD polarity
    svcrdma: Update svc_rdma_send_error to use DMA LKEY
    svcrdma: Modify the RPC reply path to use FRMR when available
    svcrdma: Modify the RPC recv path to use FRMR when available
    svcrdma: Add support to svc_rdma_send to handle chained WR
    svcrdma: Modify post recv path to use local dma key
    svcrdma: Add a service to register a Fast Reg MR with the device
    svcrdma: Query device for Fast Reg support during connection setup
    svcrdma: Add FRMR get/put services
    NLM: Remove unused argument from svc_addsock() function
    NLM: Remove "proto" argument from lockd_up()
    NLM: Always start both UDP and TCP listeners
    lockd: Remove unused fields in the nlm_reboot structure
    lockd: Add helper to sanity check incoming NOTIFY requests
    lockd: change nlmclnt_grant() to take a "struct sockaddr *"
    lockd: Adjust nlmsvc_lookup_host() to accomodate AF_INET6 addresses
    lockd: Adjust nlmclnt_lookup_host() signature to accomodate non-AF_INET
    lockd: Support non-AF_INET addresses in nlm_lookup_host()
    NLM: Convert nlm_lookup_host() to use a single argument
    svcrdma: Add Fast Reg MR Data Types
    ...

    Linus Torvalds
     

14 Oct, 2008

4 commits

  • * 'proc' of git://git.kernel.org/pub/scm/linux/kernel/git/adobriyan/proc:
    proc: remove kernel.maps_protect
    proc: remove now unneeded ADDBUF macro
    [PATCH] proc: show personality via /proc/pid/personality
    [PATCH] signal, procfs: some lock_task_sighand() users do not need rcu_read_lock()
    proc: move PROC_PAGE_MONITOR to fs/proc/Kconfig
    proc: make grab_header() static
    proc: remove unused get_dma_list()
    proc: remove dummy vmcore_open()
    proc: proc_sys_root tweak
    proc: fix return value of proc_reg_open() in "too late" case

    Fixed up trivial conflict in removed file arch/sparc/include/asm/dma_32.h

    Linus Torvalds
     
  • Various people outside the tty layer still stick their noses in behind the
    scenes. We need to make sure they also obey the locking and referencing rules.

    Signed-off-by: Alan Cox
    Signed-off-by: Linus Torvalds

    Alan Cox
     
  • This is pure tty code so put it in the tty layer where it can be with the
    locking relevant material it uses

    Signed-off-by: Alan Cox
    Signed-off-by: Linus Torvalds

    Alan Cox
     
  • Introduce a kref to the tty structure and use it to protect the tty->signal
    tty references. For now we don't introduce it for anything else.

    Signed-off-by: Alan Cox
    Signed-off-by: Linus Torvalds

    Alan Cox
     

12 Oct, 2008

5 commits

  • Conflicts:

    sound/core/memalloc.c

    David S. Miller
     
  • …://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

    * 'x86-v28-for-linus-phase4-D' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (186 commits)
    x86, debug: print more information about unknown CPUs
    x86 setup: handle more than 8 CPU flag words
    x86: cpuid, fix typo
    x86: move transmeta cap read to early_init_transmeta()
    x86: identify_cpu_without_cpuid v2
    x86: extended "flags" to show virtualization HW feature in /proc/cpuinfo
    x86: move VMX MSRs to msr-index.h
    x86: centaur_64.c remove duplicated setting of CONSTANT_TSC
    x86: intel.c put workaround for old cpus together
    x86: let intel 64-bit use intel.c
    x86: make intel_64.c the same as intel.c
    x86: make intel.c have 64-bit support code
    x86: little clean up of intel.c/intel_64.c
    x86: make 64 bit to use amd.c
    x86: make amd_64 have 32 bit code
    x86: make amd.c have 64bit support code
    x86: merge header in amd_64.c
    x86: add srat_detect_node for amd64
    x86: remove duplicated force_mwait
    x86: cpu make amd.c more like amd_64.c v2
    ...

    Linus Torvalds
     
  • Conflicts:
    arch/x86/kernel/cpu/common.c
    arch/x86/kernel/signal_64.c
    include/asm-x86/cpufeature.h

    Ingo Molnar
     
  • Conflicts:
    arch/x86/kernel/apic_32.c
    arch/x86/kernel/apic_64.c
    arch/x86/kernel/setup.c
    drivers/pci/intel-iommu.c
    include/asm-x86/cpufeature.h
    include/asm-x86/dma-mapping.h

    Ingo Molnar
     
  • * 'x86-v28-for-linus-phase3-B' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (74 commits)
    AMD IOMMU: use iommu_device_max_index, fix
    AMD IOMMU: use iommu_device_max_index
    x86: add PCI IDs for AMD Barcelona PCI devices
    x86/iommu: use __GFP_ZERO instead of memset for GART
    x86/iommu: convert GART need_flush to bool
    x86/iommu: make GART driver checkpatch clean
    x86 gart: remove unnecessary initialization
    x86: restore old GART alloc_coherent behavior
    revert "x86: make GART to respect device's dma_mask about virtual mappings"
    x86: export pci-nommu's alloc_coherent
    iommu: remove fullflush and nofullflush in IOMMU generic option
    x86: remove set_bit_string()
    iommu: export iommu_area_reserve helper function
    AMD IOMMU: use coherent_dma_mask in alloc_coherent
    add AMD IOMMU tree to MAINTAINERS file
    AMD IOMMU: use cmd_buf_size when freeing the command buffer
    AMD IOMMU: calculate IVHD size with a function
    AMD IOMMU: remove unnecessary cast to u64 in the init code
    AMD IOMMU: free domain bitmap with its allocation order
    AMD IOMMU: simplify dma_mask_to_pages
    ...

    Linus Torvalds
     

11 Oct, 2008

3 commits

  • * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq:
    [CPUFREQ] Fix BUG: using smp_processor_id() in preemptible code
    [CPUFREQ] Don't export governors for default governor
    [CPUFREQ][6/6] cpufreq: Add idle microaccounting in ondemand governor
    [CPUFREQ][5/6] cpufreq: Changes to get_cpu_idle_time_us(), used by ondemand governor
    [CPUFREQ][4/6] cpufreq_ondemand: Parameterize down differential
    [CPUFREQ][3/6] cpufreq: get_cpu_idle_time() changes in ondemand for idle-microaccounting
    [CPUFREQ][2/6] cpufreq: Change load calculation in ondemand for software coordination
    [CPUFREQ][1/6] cpufreq: Add cpu number parameter to __cpufreq_driver_getavg()
    [CPUFREQ] use deferrable delayed work init in conservative governor
    [CPUFREQ] drivers/cpufreq/cpufreq.c: Adjust error handling code involving cpufreq_cpu_put
    [CPUFREQ] add error handling for cpufreq_register_governor() error
    [CPUFREQ] acpi-cpufreq: add error handling for cpufreq_register_driver() error
    [CPUFREQ] Coding style fixes to arch/x86/kernel/cpu/cpufreq/powernow-k6.c
    [CPUFREQ] Coding style fixes to arch/x86/kernel/cpu/cpufreq/elanfreq.c

    Linus Torvalds
     
  • * 'rcu-v28-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (21 commits)
    rcu: RCU-based detection of stalled CPUs for Classic RCU, fix
    rcu: RCU-based detection of stalled CPUs for Classic RCU
    rcu: add rcu_read_lock_sched() / rcu_read_unlock_sched()
    rcu: fix sparse shadowed variable warning
    doc/RCU: fix pseudocode in rcuref.txt
    rcuclassic: fix compiler warning
    rcu: use irq-safe locks
    rcuclassic: fix compilation NG
    rcu: fix locking cleanup fallout
    rcu: remove redundant ACCESS_ONCE definition from rcupreempt.c
    rcu: fix classic RCU locking cleanup lockdep problem
    rcu: trace fix possible mem-leak
    rcu: just rename call_rcu_bh instead of making it a macro
    rcu: remove list_for_each_rcu()
    rcu: fixes to include/linux/rcupreempt.h
    rcu: classic RCU locking and memory-barrier cleanups
    rcu: prevent console flood when one CPU sees another AWOL via RCU
    rcu, debug: detect stalled grace periods, cleanups
    rcu, debug: detect stalled grace periods
    rcu classic: new algorithm for callbacks-processing(v2)
    ...

    Linus Torvalds
     
  • Conflicts:
    arch/x86/kernel/pci-gart_64.c
    include/asm-x86/dma-mapping.h

    Ingo Molnar
     

10 Oct, 2008

3 commits

  • After commit 831830b5a2b5d413407adf380ef62fe17d6fcbf2 aka
    "restrict reading from /proc//maps to those who share ->mm or can ptrace"
    sysctl stopped being relevant because commit moved security checks from ->show
    time to ->start time (mm_for_maps()).

    Signed-off-by: Alexey Dobriyan
    Acked-by: Kees Cook

    Alexey Dobriyan
     
  • lock_task_sighand() make sure task->sighand is being protected,
    so we do not need rcu_read_lock().
    [ exec() will get task->sighand->siglock before change task->sighand! ]

    But code using rcu_read_lock() _just_ to protect lock_task_sighand()
    only appear in procfs. (and some code in procfs use lock_task_sighand()
    without such redundant protection.)

    Other subsystem may put lock_task_sighand() into rcu_read_lock()
    critical region, but these rcu_read_lock() are used for protecting
    "for_each_process()", "find_task_by_vpid()" etc. , not for protecting
    lock_task_sighand().

    Signed-off-by: Lai Jiangshan
    [ok from Oleg]
    Signed-off-by: Alexey Dobriyan

    Lai Jiangshan
     
  • export get_cpu_idle_time_us() for it to be used in ondemand governor.
    Last update time can be current time when the CPU is currently non-idle,
    accounting for the busy time since last idle.

    Signed-off-by: Venkatesh Pallipadi
    Signed-off-by: Dave Jones

    venkatesh.pallipadi@intel.com
     

09 Oct, 2008

2 commits


08 Oct, 2008

2 commits


07 Oct, 2008

1 commit


06 Oct, 2008

2 commits


04 Oct, 2008

2 commits

  • While working on the new version of the code for SCHED_SPORADIC I
    noticed something strange in the present throttling mechanism. More
    specifically in the throttling timer handler in sched_rt.c
    (do_sched_rt_period_timer()) and in rt_rq_enqueue().

    The problem is that, when unthrottling a runqueue, rt_rq_enqueue() only
    asks for rescheduling if the runqueue has a sched_entity associated to
    it (i.e., rt_rq->rt_se != NULL).
    Now, if the runqueue is the root rq (which has a rt_se = NULL)
    rescheduling does not take place, and it is delayed to some undefined
    instant in the future.

    This imply some random bandwidth usage by the RT tasks under throttling.
    For instance, setting rt_runtime_us/rt_period_us = 950ms/1000ms an RT
    task will get less than 95%. In our tests we got something varying
    between 70% to 95%.
    Using smaller time values, e.g., 95ms/100ms, things are even worse, and
    I can see values also going down to 20-25%!!

    The tests we performed are simply running 'yes' as a SCHED_FIFO task,
    and checking the CPU usage with top, but we can investigate thoroughly
    if you think it is needed.

    Things go much better, for us, with the attached patch... Don't know if
    it is the best approach, but it solved the issue for us.

    Signed-off-by: Dario Faggioli
    Signed-off-by: Michael Trimarchi
    Acked-by: Peter Zijlstra
    Cc:
    Signed-off-by: Ingo Molnar

    Dario Faggioli
     
  • Impact: jiffies increment too fast.

    Hugh Dickins noted that with NOHZ=n and HIGHRES=n jiffies get
    incremented too fast. The reason is a wrong check in the broadcast
    enter/exit code, which keeps the local apic timer in periodic mode
    when the switch happens.

    Signed-off-by: Thomas Gleixner

    Thomas Gleixner
     

03 Oct, 2008

5 commits

  • This fixes a warning on latest -tip:

    kernel/cpuset.c: Dans la fonction «scan_for_empty_cpusets» :
    kernel/cpuset.c:1932: attention : passing argument 1 of «list_add_tail» discards qualifiers from pointer target type

    Actually the struct cpuset *root passed in parameter to scan_for_empty_cpusets
    is not supposed to be const since an entry is added on the tail of its list.
    Just correct the qualifier.

    Signed-off-by: Frederic Weisbecker
    Signed-off-by: Ingo Molnar

    Frederic Weisbecker
     
  • fix the !CONFIG_RCU_CPU_STALL_DETECTOR path:

    kernel/rcuclassic.c: In function '__rcu_pending':
    kernel/rcuclassic.c:609: error: too few arguments to function 'check_cpu_stall'

    Signed-off-by: Ingo Molnar

    Ingo Molnar
     
  • This patch adds stalled-CPU detection to Classic RCU. This capability
    is enabled by a new config variable CONFIG_RCU_CPU_STALL_DETECTOR, which
    defaults disabled.

    This is a debugging feature to detect infinite loops in kernel code, not
    something that non-kernel-hackers would be expected to care about.

    This feature can detect looping CPUs in !PREEMPT builds and looping CPUs
    with preemption disabled in PREEMPT builds. This is essentially a port of
    this functionality from the treercu patch, replacing the stall debug patch
    that is already in tip/core/rcu (commit 67182ae1c4).

    The changes from the patch in tip/core/rcu include making the config
    variable name match that in treercu, changing from seconds to jiffies to
    avoid spurious warnings, and printing a boot message when this feature
    is enabled.

    Signed-off-by: Paul E. McKenney
    Signed-off-by: Ingo Molnar

    Paul E. McKenney
     
  • Ingo Molnar
     
  • Found by static checker (http://repo.or.cz/w/smatch.git).

    Signed-off-by: Dan Carpenter
    Acked-by: Thomas Gleixner
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dan Carpenter
     

30 Sep, 2008

3 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:
    hrtimer: prevent migration of per CPU hrtimers
    hrtimer: mark migration state
    hrtimer: fix migration of CB_IRQSAFE_NO_SOFTIRQ hrtimers
    hrtimer: migrate pending list on cpu offline

    Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
    Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
    Tested-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>

    Linus Torvalds
     
  • This patch does following:
    o Removes unused variable and argument "rq".
    o Optimizes one of the "if" conditions in wake_affine() - i.e. if
    "balanced" is true, we need not do rest of the calculations in the
    condition.
    o If this cpu is same as the previous cpu (on which woken up task
    was running when it went to sleep), no need to call wake_affine at all.

    Signed-off-by: Amit K Arora
    Acked-by: Peter Zijlstra
    Signed-off-by: Ingo Molnar

    Amit K. Arora
     
  • This patch adds the CONFIG_FILE_LOCKING option which allows to remove
    support for advisory locks. With this patch enabled, the flock()
    system call, the F_GETLK, F_SETLK and F_SETLKW operations of fcntl()
    and NFS support are disabled. These features are not necessarly needed
    on embedded systems. It allows to save ~11 Kb of kernel code and data:

    text data bss dec hex filename
    1125436 118764 212992 1457192 163c28 vmlinux.old
    1114299 118564 212992 1445855 160fdf vmlinux
    -11137 -200 0 -11337 -2C49 +/-

    This patch has originally been written by Matt Mackall
    , and is part of the Linux Tiny project.

    Signed-off-by: Thomas Petazzoni
    Signed-off-by: Matt Mackall
    Cc: matthew@wil.cx
    Cc: linux-fsdevel@vger.kernel.org
    Cc: mpm@selenic.com
    Cc: akpm@linux-foundation.org
    Signed-off-by: J. Bruce Fields

    Thomas Petazzoni
     

29 Sep, 2008

5 commits

  • There's a race between mm->owner assignment and swapoff, more easily
    seen when task slab poisoning is turned on. The condition occurs when
    try_to_unuse() runs in parallel with an exiting task. A similar race
    can occur with callers of get_task_mm(), such as /proc//
    or ptrace or page migration.

    CPU0 CPU1
    try_to_unuse
    looks at mm = task0->mm
    increments mm->mm_users
    task 0 exits
    mm->owner needs to be updated, but no
    new owner is found (mm_users > 1, but
    no other task has task->mm = task0->mm)
    mm_update_next_owner() leaves
    mmput(mm) decrements mm->mm_users
    task0 freed
    dereferencing mm->owner fails

    The fix is to notify the subsystem via mm_owner_changed callback(),
    if no new owner is found, by specifying the new task as NULL.

    Jiri Slaby:
    mm->owner was set to NULL prior to calling cgroup_mm_owner_callbacks(), but
    must be set after that, so as not to pass NULL as old owner causing oops.

    Daisuke Nishimura:
    mm_update_next_owner() may set mm->owner to NULL, but mem_cgroup_from_task()
    and its callers need to take account of this situation to avoid oops.

    Hugh Dickins:
    Lockdep warning and hang below exec_mmap() when testing these patches.
    exit_mm() up_reads mmap_sem before calling mm_update_next_owner(),
    so exec_mmap() now needs to do the same. And with that repositioning,
    there's now no point in mm_need_new_owner() allowing for NULL mm.

    Reported-by: Hugh Dickins
    Signed-off-by: Balbir Singh
    Signed-off-by: Jiri Slaby
    Signed-off-by: Daisuke Nishimura
    Signed-off-by: Hugh Dickins
    Cc: KAMEZAWA Hiroyuki
    Cc: Paul Menage
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Balbir Singh
     
  • Impact: per CPU hrtimers can be migrated from a dead CPU

    The hrtimer code has no knowledge about per CPU timers, but we need to
    prevent the migration of such timers and warn when such a timer is
    active at migration time.

    Explicitely mark the timers as per CPU and use a more understandable
    mode descriptor for the interrupts safe unlocked callback mode, which
    is used by hrtimer_sleeper and the scheduler code.

    Signed-off-by: Thomas Gleixner

    Thomas Gleixner
     
  • Impact: during migration active hrtimers can be seen as inactive

    The migration code removes the hrtimers from the queues of the dead
    CPU and sets the state temporary to INACTIVE. The enqueue code sets it
    to ACTIVE/PENDING again.

    Prevent that the wrong state can be seen by using a separate migration
    state bit.

    Signed-off-by: Thomas Gleixner

    Thomas Gleixner
     
  • Impact: Stale timers after a CPU went offline.

    commit 37bb6cb4097e29ffee970065b74499cbf10603a3
    hrtimer: unlock hrtimer_wakeup

    changed the hrtimer sleeper callback mode to CB_IRQSAFE_NO_SOFTIRQ due
    to locking problems. A result of this change is that when enqueue is
    called for an already expired hrtimer the callback function is not
    longer called directly from the enqueue code. The normal callers have
    been fixed in the code, but the migration code which moves hrtimers
    from a dead CPU to a live CPU was not made aware of this.

    This can be fixed by checking the timer state after the call to
    enqueue in the migration code.

    Signed-off-by: Thomas Gleixner

    Thomas Gleixner
     
  • Impact: hrtimers which are on the pending list are not migrated at cpu
    offline and can be stale forever

    Add the pending list migration when CONFIG_HIGH_RES_TIMERS is enabled

    Signed-off-by: Thomas Gleixner

    Thomas Gleixner
     

26 Sep, 2008

2 commits

  • On the x86 arch, user space single step exceptions should be ignored
    if they occur in the kernel space, such as ptrace stepping through a
    system call.

    First check if it is kgdb that is executing a single step, then ensure
    it is not an accidental traversal into the user space, while in kgdb,
    any other time the TIF_SINGLESTEP is set, kgdb should ignore the
    exception.

    On x86, arm, mips and powerpc, the kgdb_contthread usage was
    inconsistent with the way single stepping is implemented in the kgdb
    core. The arch specific stub should always set the
    kgdb_cpu_doing_single_step correctly if it is single stepping. This
    allows kgdb to correctly process an instruction steps if ptrace
    happens to be requesting an instruction step over a system call.

    Signed-off-by: Jason Wessel

    Jason Wessel
     
  • On the ARM architecture, kgdb will crash the kernel if the last byte
    of valid memory is written due to a flush_icache_range flushing
    beyond the memory boundary.

    Signed-off-by: Atsuo Igarashi
    Signed-off-by: Jason Wessel

    Atsuo Igarashi