05 Jan, 2009

18 commits


04 Jan, 2009

6 commits

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

    * 'cpus4096-for-linus-3' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (77 commits)
    x86: setup_per_cpu_areas() cleanup
    cpumask: fix compile error when CONFIG_NR_CPUS is not defined
    cpumask: use alloc_cpumask_var_node where appropriate
    cpumask: convert shared_cpu_map in acpi_processor* structs to cpumask_var_t
    x86: use cpumask_var_t in acpi/boot.c
    x86: cleanup some remaining usages of NR_CPUS where s/b nr_cpu_ids
    sched: put back some stack hog changes that were undone in kernel/sched.c
    x86: enable cpus display of kernel_max and offlined cpus
    ia64: cpumask fix for is_affinity_mask_valid()
    cpumask: convert RCU implementations, fix
    xtensa: define __fls
    mn10300: define __fls
    m32r: define __fls
    h8300: define __fls
    frv: define __fls
    cris: define __fls
    cpumask: CONFIG_DISABLE_OBSOLETE_CPUMASK_FUNCTIONS
    cpumask: zero extra bits in alloc_cpumask_var_node
    cpumask: replace for_each_cpu_mask_nr with for_each_cpu in kernel/time/
    cpumask: convert mm/
    ...

    Linus Torvalds
     
  • * 'cputime' of git://git390.osdl.marist.edu/pub/scm/linux-2.6:
    [PATCH] fast vdso implementation for CLOCK_THREAD_CPUTIME_ID
    [PATCH] improve idle cputime accounting
    [PATCH] improve precision of idle time detection.
    [PATCH] improve precision of process accounting.
    [PATCH] idle cputime accounting
    [PATCH] fix scaled & unscaled cputime accounting

    Linus Torvalds
     
  • Impact: prevents panic from stack overflow on numa-capable machines.

    Some of the "removal of stack hogs" changes in kernel/sched.c by using
    node_to_cpumask_ptr were undone by the early cpumask API updates, and
    causes a panic due to stack overflow. This patch undoes those changes
    by using cpumask_of_node() which returns a 'const struct cpumask *'.

    In addition, cpu_coregoup_map is replaced with cpu_coregroup_mask further
    reducing stack usage. (Both of these updates removed 9 FIXME's!)

    Also:
    Pick up some remaining changes from the old 'cpumask_t' functions to
    the new 'struct cpumask *' functions.

    Optimize memory traffic by allocating each percpu local_cpu_mask on the
    same node as the referring cpu.

    Signed-off-by: Mike Travis
    Acked-by: Rusty Russell
    Signed-off-by: Ingo Molnar

    Mike Travis
     
  • Impact: build fix on ia64

    ia64's default_affinity_write() still had old cpumask_t usage:

    /home/mingo/tip/kernel/irq/proc.c: In function `default_affinity_write':
    /home/mingo/tip/kernel/irq/proc.c:114: error: incompatible type for argument 1 of `is_affinity_mask_valid'
    make[3]: *** [kernel/irq/proc.o] Error 1
    make[3]: *** Waiting for unfinished jobs....

    update it to cpumask_var_t.

    Signed-off-by: Ingo Molnar

    Ingo Molnar
     
  • Impact: cleanup

    This warning:

    kernel/rcuclassic.c: In function ‘rcu_start_batch’:
    kernel/rcuclassic.c:397: warning: passing argument 1 of ‘cpumask_andnot’ from incompatible pointer type

    triggers because one usage site of rcp->cpumask was not converted
    to to_cpumask(rcp->cpumask). There's no ill effects of this bug.

    Signed-off-by: Ingo Molnar

    Ingo Molnar
     
  • …ux-2.6-cpumask into merge-rr-cpumask

    Conflicts:
    arch/x86/kernel/io_apic.c
    kernel/rcuclassic.c
    kernel/sched.c
    kernel/time/tick-sched.c

    Signed-off-by: Mike Travis <travis@sgi.com>
    [ mingo@elte.hu: backmerged typo fix for io_apic.c ]
    Signed-off-by: Ingo Molnar <mingo@elte.hu>

    Mike Travis
     

03 Jan, 2009

1 commit

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

    * 'cpus4096-for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (66 commits)
    x86: export vector_used_by_percpu_irq
    x86: use logical apicid in x2apic_cluster's x2apic_cpu_mask_to_apicid_and()
    sched: nominate preferred wakeup cpu, fix
    x86: fix lguest used_vectors breakage, -v2
    x86: fix warning in arch/x86/kernel/io_apic.c
    sched: fix warning in kernel/sched.c
    sched: move test_sd_parent() to an SMP section of sched.h
    sched: add SD_BALANCE_NEWIDLE at MC and CPU level for sched_mc>0
    sched: activate active load balancing in new idle cpus
    sched: bias task wakeups to preferred semi-idle packages
    sched: nominate preferred wakeup cpu
    sched: favour lower logical cpu number for sched_mc balance
    sched: framework for sched_mc/smt_power_savings=N
    sched: convert BALANCE_FOR_xx_POWER to inline functions
    x86: use possible_cpus=NUM to extend the possible cpus allowed
    x86: fix cpu_mask_to_apicid_and to include cpu_online_mask
    x86: update io_apic.c to the new cpumask code
    x86: Introduce topology_core_cpumask()/topology_thread_cpumask()
    x86: xen: use smp_call_function_many()
    x86: use work_on_cpu in x86/kernel/cpu/mcheck/mce_amd_64.c
    ...

    Fixed up trivial conflict in kernel/time/tick-sched.c manually

    Linus Torvalds
     

01 Jan, 2009

14 commits

  • Impact: cleanup

    Simple replacement, now the _nr is redundant.

    Signed-off-by: Rusty Russell
    Signed-off-by: Mike Travis
    Cc: Ingo Molnar

    Rusty Russell
     
  • Impact: Reduce stack usage, use new cpumask API.

    Mainly changing cpumask_t to 'struct cpumask' and similar simple API
    conversion. Two conversions worth mentioning:

    1) we use cpumask_any_but to avoid a temporary in kernel/softlockup.c,
    2) Use cpumask_var_t in taskstats_user_cmd().

    Signed-off-by: Rusty Russell
    Signed-off-by: Mike Travis
    Cc: Balbir Singh
    Cc: Ingo Molnar

    Rusty Russell
     
  • Impact: Reduce kernel stack and memory usage, use new cpumask API.

    Use cpumask_var_t for take_cpu_down() stack var, and frozen_cpus.

    Note that notify_cpu_starting() can be called before core_initcall
    allocates frozen_cpus, but the NULL check is optimized out by gcc for
    the CONFIG_CPUMASK_OFFSTACK=n case.

    Signed-off-by: Rusty Russell

    Rusty Russell
     
  • Impact: Reduce kernel memory usage, use new cpumask API.

    Avoid a static cpumask_t for prof_cpu_mask, and an on-stack cpumask_t
    in prof_cpu_mask_write_proc. Both become cpumask_var_t.

    prof_cpu_mask is only allocated when profiling is on, but the NULL
    checks are optimized out by gcc for the !CPUMASK_OFFSTACK case.

    Also removed some strange and unnecessary casts.

    Signed-off-by: Rusty Russell

    Rusty Russell
     
  • Impact: use new cpumask API.

    rcu_ctrlblk contains a cpumask, and it's highly optimized so I don't want
    a cpumask_var_t (ie. a pointer) for the CONFIG_CPUMASK_OFFSTACK case. It
    could use a dangling bitmap, and be allocated in __rcu_init to save memory,
    but for the moment we use a bitmap.

    (Eventually 'struct cpumask' will be undefined for CONFIG_CPUMASK_OFFSTACK,
    so we use a bitmap here to show we really mean it).

    We remove on-stack cpumasks, using cpumask_var_t for
    rcu_torture_shuffle_tasks() and for_each_cpu_and in force_quiescent_state().

    Signed-off-by: Rusty Russell

    Rusty Russell
     
  • Impact: Reduce stack usage, use new cpumask API. ALPHA mod!

    Main change is that irq_default_affinity becomes a cpumask_var_t, so
    treat it as a pointer (this effects alpha).

    Signed-off-by: Rusty Russell

    Rusty Russell
     
  • Impact: Use new APIs

    Convert kernel/time functions to use struct cpumask *.

    Note the ugly bitmap declarations in tick-broadcast.c. These should
    be cpumask_var_t, but there was no obvious initialization function to
    put the alloc_cpumask_var() calls in. This was safe.

    (Eventually 'struct cpumask' will be undefined for CONFIG_CPUMASK_OFFSTACK,
    so we use a bitmap here to show we really mean it).

    Signed-off-by: Rusty Russell
    Signed-off-by: Mike Travis

    Rusty Russell
     
  • Impact: Reduce memory usage, use new cpumask API.

    cpu_populated_map becomes a cpumask_var_t, and cpu_singlethread_map is
    simply a cpumask pointer: it's simply the cpumask containing the first
    possible CPU anyway.

    Signed-off-by: Rusty Russell

    Rusty Russell
     
  • Impact: Reduce stack usage, use new cpumask API.

    Straightforward conversion; cpumasks' size is given by cpumask_size() (now
    a variable rather than fixed) and on-stack cpu masks use cpumask_var_t.

    Signed-off-by: Rusty Russell

    Rusty Russell
     
  • Impact: Remove obsolete API usage

    any_online_cpu() is a good name, but it takes a cpumask_t, not a
    pointer.

    There are several places where any_online_cpu() doesn't really want a
    mask arg at all. Replace all callers with cpumask_any() and
    cpumask_any_and().

    Signed-off-by: Rusty Russell
    Signed-off-by: Mike Travis

    Rusty Russell
     
  • Impact: Reduce future memory usage, use new cpumask API.

    Since the last patch was created and acked, more old cpumask users
    slipped into kernel/trace.

    Mostly trivial conversions, except struct trace_iterator's "started"
    member becomes a cpumask_var_t.

    Signed-off-by: Rusty Russell

    Rusty Russell
     
  • Impact: Reduce future memory usage, use new cpumask API.

    (Eventually, cpumask_var_t will be allocated based on nr_cpu_ids, not NR_CPUS).

    Convert kernel trace functions to use struct cpumask API:
    1) Use cpumask_copy/cpumask_test_cpu/for_each_cpu.
    2) Use cpumask_var_t and alloc_cpumask_var/free_cpumask_var everywhere.
    3) Use on_each_cpu instead of playing with current->cpus_allowed.

    Signed-off-by: Rusty Russell
    Signed-off-by: Mike Travis
    Acked-by: Steven Rostedt

    Rusty Russell
     
  • Impact: cleanup

    In future, all cpumask ops will only be valid (in general) for bit
    numbers < nr_cpu_ids. So use that instead of NR_CPUS in iterators
    and other comparisons.

    This is always safe: no cpu number can be >= nr_cpu_ids, and
    nr_cpu_ids is initialized to NR_CPUS at boot.

    Signed-off-by: Rusty Russell
    Signed-off-by: Mike Travis
    Acked-by: Ingo Molnar
    Acked-by: James Morris
    Cc: Eric Biederman

    Rusty Russell
     
  • …l/git/tip/linux-2.6-tip

    * 'irq-fixes-for-linus-4' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    sparseirq: move __weak symbols into separate compilation unit
    sparseirq: work around __weak alias bug
    sparseirq: fix hang with !SPARSE_IRQ
    sparseirq: set lock_class for legacy irq when sparse_irq is selected
    sparseirq: work around compiler optimizing away __weak functions
    sparseirq: fix desc->lock init
    sparseirq: do not printk when migrating IRQ descriptors
    sparseirq: remove duplicated arch_early_irq_init()
    irq: simplify for_each_irq_desc() usage
    proc: remove ifdef CONFIG_SPARSE_IRQ from stat.c
    irq: for_each_irq_desc() move to irqnr.h
    hrtimer: remove #include <linux/irq.h>

    Linus Torvalds
     

31 Dec, 2008

1 commit

  • The cpu time spent by the idle process actually doing something is
    currently accounted as idle time. This is plain wrong, the architectures
    that support VIRT_CPU_ACCOUNTING=y can do better: distinguish between the
    time spent doing nothing and the time spent by idle doing work. The first
    is accounted with account_idle_time and the second with account_system_time.
    The architectures that use the account_xxx_time interface directly and not
    the account_xxx_ticks interface now need to do the check for the idle
    process in their arch code. In particular to improve the system vs true
    idle time accounting the arch code needs to measure the true idle time
    instead of just testing for the idle process.
    To improve the tick based accounting as well we would need an architecture
    primitive that can tell us if the pt_regs of the interrupted context
    points to the magic instruction that halts the cpu.

    In addition idle time is no more added to the stime of the idle process.
    This field now contains the system time of the idle process as it should
    be. On systems without VIRT_CPU_ACCOUNTING this will always be zero as
    every tick that occurs while idle is running will be accounted as idle
    time.

    This patch contains the necessary common code changes to be able to
    distinguish idle system time and true idle time. The architectures with
    support for VIRT_CPU_ACCOUNTING need some changes to exploit this.

    Signed-off-by: Martin Schwidefsky

    Martin Schwidefsky