15 Oct, 2007

40 commits

  • Add interface to control cpu bandwidth allocation to task-groups.

    (not yet configurable, due to missing CONFIG_CONTAINERS)

    Signed-off-by: Srivatsa Vaddagiri
    Signed-off-by: Dhaval Giani
    Signed-off-by: Ingo Molnar
    Signed-off-by: Peter Zijlstra

    Srivatsa Vaddagiri
     
  • fix SMP migration latencies: the vruntimes of different CPUs are
    at incompatible offsets so they have to be fixed up when migrating
    a task across CPUs.

    Signed-off-by: Mike Galbraith
    Signed-off-by: Ingo Molnar
    Signed-off-by: Peter Zijlstra
    Reviewed-by: Thomas Gleixner

    Mike Galbraith
     
  • Better min_vruntime tracking: update it every time 'curr' is
    updated - not just when a task is enqueued into the tree.

    Signed-off-by: Peter Zijlstra
    Signed-off-by: Ingo Molnar
    Signed-off-by: Mike Galbraith
    Reviewed-by: Thomas Gleixner

    Peter Zijlstra
     
  • sched.o gets smaller and faster if we compile it with -fomit-frame-pointers,
    so make this a config option. The cost is the loss of multi-depth wchan
    lookups - but SysRq-T is a sufficient replacement for them anyway, so their
    utility is much lower these days.

    the size difference is significant:

    text data bss dec hex filename
    34005 3462 24 37491 9273 sched.o.before
    33470 3462 24 36956 905c sched.o.after

    Signed-off-by: Ingo Molnar
    Signed-off-by: Peter Zijlstra
    Signed-off-by: Mike Galbraith
    Reviewed-by: Thomas Gleixner

    Ingo Molnar
     
  • Better placement of #ifdef CONFIG_SCHEDSTAT block in dequeue_entity().

    Signed-off-by: Dmitry Adamushko
    Signed-off-by: Ingo Molnar
    Signed-off-by: Mike Galbraith
    Signed-off-by: Peter Zijlstra
    Reviewed-by: Thomas Gleixner

    Dmitry Adamushko
     
  • remove wait_runtime based fields and features, now that the CFS
    math has been changed over to the vruntime metric.

    Signed-off-by: Ingo Molnar
    Signed-off-by: Peter Zijlstra
    Signed-off-by: Mike Galbraith
    Reviewed-by: Thomas Gleixner

    Ingo Molnar
     
  • remove the wait_runtime-limit fields and the code depending on it, now
    that the math has been changed over to rely on the vruntime metric.

    Signed-off-by: Ingo Molnar
    Signed-off-by: Peter Zijlstra
    Signed-off-by: Mike Galbraith
    Reviewed-by: Thomas Gleixner

    Ingo Molnar
     
  • 'struct load_stat' is redundant now so let's get rid of it.

    Signed-off-by: Dmitry Adamushko
    Signed-off-by: Ingo Molnar
    Signed-off-by: Peter Zijlstra
    Signed-off-by: Mike Galbraith
    Reviewed-by: Thomas Gleixner

    Dmitry Adamushko
     
  • micro-optimization: update cfs_rq->exec_clock only if
    CONFIG_SCHED_DEBUG=y.

    Signed-off-by: Ingo Molnar
    Signed-off-by: Peter Zijlstra
    Signed-off-by: Mike Galbraith
    Reviewed-by: Thomas Gleixner

    Ingo Molnar
     
  • add more vruntime statistics.

    Signed-off-by: Ingo Molnar
    Signed-off-by: Mike Galbraith
    Signed-off-by: Peter Zijlstra
    Reviewed-by: Thomas Gleixner

    Ingo Molnar
     
  • Handle vruntime overflow by centering the key space around min_vruntime.

    ( otherwise we could overflow 64-bit vruntime in a few days with SCHED_IDLE
    tasks - or in a few years with nice +19. )

    Signed-off-by: Peter Zijlstra
    Signed-off-by: Ingo Molnar
    Signed-off-by: Mike Galbraith
    Reviewed-by: Thomas Gleixner

    Peter Zijlstra
     
  • add support for tree based vruntime averages.

    Signed-off-by: Peter Zijlstra
    Signed-off-by: Ingo Molnar
    Signed-off-by: Mike Galbraith
    Reviewed-by: Thomas Gleixner

    Peter Zijlstra
     
  • remove SCHED_FEAT_SKIP_INITIAL - it was off by default and even
    when enabled it never made any real difference.

    Signed-off-by: Ingo Molnar
    Reviewed-by: Thomas Gleixner

    Ingo Molnar
     
  • debug se->vruntime fields.

    Signed-off-by: Ingo Molnar
    Signed-off-by: Peter Zijlstra
    Signed-off-by: Mike Galbraith

    Ingo Molnar
     
  • clean up new task placement.

    Signed-off-by: Peter Zijlstra
    Signed-off-by: Ingo Molnar
    Signed-off-by: Mike Galbraith

    Peter Zijlstra
     
  • increase wakeup granularity - we were overscheduling a bit.

    Signed-off-by: Ingo Molnar
    Signed-off-by: Peter Zijlstra
    Signed-off-by: Mike Galbraith

    Ingo Molnar
     
  • simplify the check_preempt() methods.

    Signed-off-by: Ingo Molnar
    Signed-off-by: Peter Zijlstra
    Signed-off-by: Mike Galbraith

    Ingo Molnar
     
  • simplify adaptive latency.

    Signed-off-by: Peter Zijlstra
    Signed-off-by: Ingo Molnar
    Signed-off-by: Mike Galbraith
    Reviewed-by: Thomas Gleixner

    Peter Zijlstra
     
  • add proper new task placement for the vruntime based math too.

    ( note: introduces a swap() macro, but the swap token is too
    widely used in the kernel namespace for a generic version
    to be added without changing non-scheduler code - so this
    cleanup will be done separately. )

    Signed-off-by: Peter Zijlstra
    Signed-off-by: Ingo Molnar
    Signed-off-by: Mike Galbraith
    Reviewed-by: Thomas Gleixner

    Peter Zijlstra
     
  • optimize vruntime based scheduling.

    Signed-off-by: Ingo Molnar
    Signed-off-by: Peter Zijlstra
    Signed-off-by: Mike Galbraith
    Reviewed-by: Thomas Gleixner

    Ingo Molnar
     
  • move sched_feat() definitions so that it can be used sooner by generic
    code too.

    Signed-off-by: Ingo Molnar
    Signed-off-by: Peter Zijlstra
    Signed-off-by: Mike Galbraith
    Reviewed-by: Thomas Gleixner

    Ingo Molnar
     
  • introduce se->vruntime as a sum of weighted delta-exec's, and use that
    as the key into the tree.

    the idea to use absolute virtual time as the basic metric of scheduling
    has been first raised by William Lee Irwin, advanced by Tong Li and first
    prototyped by Roman Zippel in the "Really Fair Scheduler" (RFS) patchset.

    also see:

    http://lkml.org/lkml/2007/9/2/76

    for a simpler variant of this patch.

    Signed-off-by: Ingo Molnar
    Signed-off-by: Peter Zijlstra
    Signed-off-by: Mike Galbraith
    Reviewed-by: Thomas Gleixner

    Ingo Molnar
     
  • clean up calc_weighted() - we always use the normalized shift so
    it's not needed to pass that in. Also, push the non-nice0 branch
    into the function.

    Signed-off-by: Ingo Molnar
    Signed-off-by: Peter Zijlstra
    Signed-off-by: Mike Galbraith
    Reviewed-by: Thomas Gleixner

    Ingo Molnar
     
  • speed up update_load_add/_sub() by not delaying the division - this
    reduces CPU pipeline dependencies.

    Signed-off-by: Ingo Molnar
    Signed-off-by: Peter Zijlstra
    Signed-off-by: Mike Galbraith
    Reviewed-by: Thomas Gleixner

    Ingo Molnar
     
  • suggested by Roman Zippel: uninline __enqueue_entity() and
    __dequeue_entity().

    this reduces code size:

    text data bss dec hex filename
    25385 2386 16 27787 6c8b sched.o.before
    25257 2386 16 27659 6c0b sched.o.after

    Signed-off-by: Ingo Molnar
    Signed-off-by: Peter Zijlstra
    Signed-off-by: Mike Galbraith
    Reviewed-by: Thomas Gleixner

    Ingo Molnar
     
  • Peter Zijlstra suggested to simplify SCHED_FEAT_* checks via the
    sched_feat(x) macro.

    No code changed:

    text data bss dec hex filename
    38895 3550 24 42469 a5e5 sched.o.before
    38895 3550 24 42469 a5e5 sched.o.after

    Signed-off-by: Peter Zijlstra
    Signed-off-by: Ingo Molnar
    Signed-off-by: Mike Galbraith
    Reviewed-by: Thomas Gleixner

    Peter Zijlstra
     
  • cleanup: simplify cfs_rq_curr() methods - now that the cfs_rq->curr
    pointer is unconditionally present, remove the wrappers.

    kernel/sched.o:
    text data bss dec hex filename
    11784 224 2012 14020 36c4 sched.o.before
    11784 224 2012 14020 36c4 sched.o.after

    Signed-off-by: Ingo Molnar
    Signed-off-by: Peter Zijlstra
    Signed-off-by: Mike Galbraith
    Reviewed-by: Thomas Gleixner

    Ingo Molnar
     
  • Noticed by Roman Zippel: use cfs_rq->curr in the !group-scheduling
    case too. Small micro-optimization and cleanup effect:

    text data bss dec hex filename
    36269 3482 24 39775 9b5f sched.o.before
    36177 3486 24 39687 9b07 sched.o.after

    Signed-off-by: Ingo Molnar
    Signed-off-by: Peter Zijlstra
    Signed-off-by: Mike Galbraith
    Reviewed-by: Thomas Gleixner

    Ingo Molnar
     
  • continued removal of precise CPU load calculations.

    Signed-off-by: Ingo Molnar
    Signed-off-by: Peter Zijlstra
    Signed-off-by: Mike Galbraith
    Reviewed-by: Thomas Gleixner

    Ingo Molnar
     
  • CPU load calculations are statistical anyway, and there's little benefit
    from having it calculated on every scheduling event. So remove this code,
    it gets rid of a divide from the scheduler wakeup and context-switch
    fastpath.

    Signed-off-by: Ingo Molnar
    Signed-off-by: Peter Zijlstra
    Signed-off-by: Mike Galbraith
    Reviewed-by: Thomas Gleixner

    Ingo Molnar
     
  • remove the stat_gran code - it was disabled by default and it causes
    unnecessary overhead.

    Signed-off-by: Ingo Molnar
    Signed-off-by: Peter Zijlstra
    Signed-off-by: Mike Galbraith
    Reviewed-by: Thomas Gleixner

    Ingo Molnar
     
  • use constants if !CONFIG_SCHED_DEBUG.

    this speeds up the code and reduces code-size:

    text data bss dec hex filename
    27464 3014 16 30494 771e sched.o.before
    26929 3010 20 29959 7507 sched.o.after

    Signed-off-by: Ingo Molnar
    Signed-off-by: Peter Zijlstra
    Signed-off-by: Mike Galbraith
    Reviewed-by: Thomas Gleixner

    Ingo Molnar
     
  • use the same defaults on both UP and SMP.

    Signed-off-by: Ingo Molnar
    Signed-off-by: Peter Zijlstra
    Signed-off-by: Mike Galbraith
    Reviewed-by: Thomas Gleixner

    Ingo Molnar
     
  • track the maximum amount of time a task has executed while
    the CPU load was at least 2x. (i.e. at least two nice-0
    tasks were runnable)

    Signed-off-by: Ingo Molnar
    Signed-off-by: Peter Zijlstra
    Signed-off-by: Mike Galbraith
    Reviewed-by: Thomas Gleixner

    Ingo Molnar
     
  • small kernel/sched_debug.c cleanup - break up
    multi-variable assignment.

    no code changed:

    text data bss dec hex filename
    38869 3550 24 42443 a5cb sched.o.before
    38869 3550 24 42443 a5cb sched.o.after

    Signed-off-by: Ingo Molnar
    Signed-off-by: Peter Zijlstra
    Signed-off-by: Mike Galbraith
    Reviewed-by: Thomas Gleixner

    Ingo Molnar
     
  • Use list_for_each_entry_safe() instead of list_for_each_safe() in
    __wake_up_common()

    Signed-off-by: Matthias Kaehlcke
    Signed-off-by: Ingo Molnar
    Signed-off-by: Peter Zijlstra
    Signed-off-by: Mike Galbraith
    Reviewed-by: Thomas Gleixner

    Matthias Kaehlcke
     
  • to get full child-runs-first semantics make sure the parent is
    rescheduled.

    Signed-off-by: Ingo Molnar
    Signed-off-by: Peter Zijlstra
    Signed-off-by: Mike Galbraith
    Reviewed-by: Thomas Gleixner

    Ingo Molnar
     
  • fix the sched_child_runs_first flag: always call into ->task_new()
    if we are on the same CPU, as SCHED_OTHER tasks depend on it for
    correct initial setup.

    Signed-off-by: Ingo Molnar
    Signed-off-by: Peter Zijlstra
    Signed-off-by: Mike Galbraith
    Reviewed-by: Thomas Gleixner

    Ingo Molnar
     
  • Make sure the mmc_spi driver can build without CONFIG_BLOCK.
    Issue noted by "Avuton Olrich" and randconfig.

    While that won't be a common configuration, sometimes embedded
    boards use SDIO to interface WLAN or Bluetooth chips (vs some
    parallel interface), and don't provide an MMC/SD socket for use
    with flash memory cards.

    Signed-off-by: David Brownell
    Signed-off-by: Linus Torvalds

    David Brownell
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/tglx/linux-2.6-x86:
    x86: force timer broadcast on late AMD C1E detection
    x86: move local APIC timer init to the end of start_secondary()
    clockevents: introduce force broadcast notifier
    x86: fix missing include for vsyscall

    Linus Torvalds