1. 31 3月, 2011 4 次提交
    • S
      sched: Fix rebalance interval calculation · 3436ae12
      Sisir Koppaka 提交于
      The interval for checking scheduling domains if they are due to be
      balanced currently depends on boot state NR_CPUS, which may not
      accurately reflect the number of online CPUs at the time of check.
      
      Thus replace NR_CPUS with num_online_cpus().
      
       (ed: Should only affect those who set NR_CPUS really high, such as 4096
            or so :-)
      Signed-off-by: NSisir Koppaka <sisir.koppaka@gmail.com>
      Signed-off-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      LKML-Reference: <AANLkTikqHWid2Q93F5U5Qw5snJH8C5PXoa7J6=6hYO94@mail.gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      3436ae12
    • B
      sched, doc: Beef up load balancing description · e2495b57
      Borislav Petkov 提交于
      Correct all function names pertaining to load balancing and explain
      shortly how load balancing is performed.
      Signed-off-by: NBorislav Petkov <bp@alien8.de>
      Signed-off-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      LKML-Reference: <1301241433-3790-1-git-send-email-bp@alien8.de>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      e2495b57
    • D
      sched: Leave sched_setscheduler() earlier if possible, do not disturb SCHED_FIFO tasks · a51e9198
      Dario Faggioli 提交于
      sched_setscheduler() (in sched.c) is called in order of changing the
      scheduling policy and/or the real-time priority of a task. Thus,
      if we find out that neither of those are actually being modified, it
      is possible to return earlier and save the overhead of a full
      deactivate+activate cycle of the task in question.
      
      Beside that, if we have more than one SCHED_FIFO task with the same
      priority on the same rq (which means they share the same priority queue)
      having one of them changing its position in the priority queue because of
      a sched_setscheduler (as it happens by means of the deactivate+activate)
      that does not actually change the priority violates POSIX which states,
      for SCHED_FIFO:
      
        "If a thread whose policy or priority has been modified by
         pthread_setschedprio() is a running thread or is runnable, the effect on
         its position in the thread list depends on the direction of the
         modification, as follows: a. <...> b. If the priority is unchanged, the
         thread does not change position in the thread list. c. <...>"
      
           http://pubs.opengroup.org/onlinepubs/009695399/functions/xsh_chap02_08.html
      
       (ed: And the POSIX specification here does, briefly and somewhat unexpectedly,
            match what common sense tells us as well. )
      Signed-off-by: NDario Faggioli <raistlin@linux.it>
      Signed-off-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      LKML-Reference: <1300971618.3960.82.camel@Palantir>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      a51e9198
    • L
      Merge branch 'irq-fixes-for-linus' of... · 6aba74f2
      Linus Torvalds 提交于
      Merge branch 'irq-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
      
      * 'irq-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
        avr32: Fix missing irq namespace conversion
        powerpc: qe_ic: Rename get_irq_desc_data and get_irq_desc_chip
        genirq: Remove the now obsolete config options and select statements
        arm: versatile : Fix typo introduced in irq namespace cleanup
        sound: Fixup the last user of the old irq functions
        genirq: Remove obsolete comment
        genirq: Remove now obsolete set_irq_wake()
        sh: Fix irq cleanup fallout
        x86: apb_timer: Fixup genirq fallout
        genirq: Fix misnamed label in handle_edge_eoi_irq
      
      Fix up crazy conflict in arch/powerpc/include/asm/qe_ic.h:
      
       - commit eead4d5c ("powerpc: qe_ic: Rename get_irq_desc_data and
         get_irq_desc_chip") made the helper functions use
         irq_desc_get_handler_data() instead of the legacy (and no longer
         existing) get_irq_desc_data.
      
       - commit d4db35e8 ("powerpc/qe_ic: Fix another breakage from the
         irq_data conversion") used irq_desc_get_chip_data() instead.
      
      According to Thomas, the former is the correct direct conversion, but it
      does look like both should work (arch/powerpc/sysdev/qe_lib/qe_ic.c
      seems to initialize both to the same thing), and the chip data in some
      ways is the more logical.  Somebody should really decide on one of the
      other.
      
      This merge picks irq_desc_get_handler_data() as the straightforward pure
      conversion to new names, as per Thomas.
      6aba74f2
  2. 30 3月, 2011 36 次提交