Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1243814

Re: CFS scheduler unfairly prefers pinned tasks

From Wanpeng Li <wanpeng.li@hotmail.com>
Newsgroups linux.kernel
Subject Re: CFS scheduler unfairly prefers pinned tasks
Date 2015-10-10 06:10 +0200
Message-ID <qhTDP-6oh-1@gated-at.bofh.it> (permalink)
References <qglXB-37e-27@gated-at.bofh.it> <qgqud-1kk-1@gated-at.bofh.it> <qheKm-6pG-17@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hi Paul,
On 10/8/15 4:19 PM, Mike Galbraith wrote:
> On Tue, 2015-10-06 at 04:45 +0200, Mike Galbraith wrote:
>> On Tue, 2015-10-06 at 08:48 +1100, paul.szabo@sydney.edu.au wrote:
>>> The Linux CFS scheduler prefers pinned tasks and unfairly
>>> gives more CPU time to tasks that have set CPU affinity.
>>> This effect is observed with or without CGROUP controls.
>>>
>>> To demonstrate: on an otherwise idle machine, as some user
>>> run several processes pinned to each CPU, one for each CPU
>>> (as many as CPUs present in the system) e.g. for a quad-core
>>> non-HyperThreaded machine:
>>>
>>>    taskset -c 0 perl -e 'while(1){1}' &
>>>    taskset -c 1 perl -e 'while(1){1}' &
>>>    taskset -c 2 perl -e 'while(1){1}' &
>>>    taskset -c 3 perl -e 'while(1){1}' &
>>>
>>> and (as that same or some other user) run some without
>>> pinning:
>>>
>>>    perl -e 'while(1){1}' &
>>>    perl -e 'while(1){1}' &
>>>
>>> and use e.g.   top   to observe that the pinned processes get
>>> more CPU time than "fair".

Interesting, I can reproduce it w/ your simple script. However, they are 
fair when the number of pinned perl tasks is equal to unpinned perl 
tasks. I will dig into it more deeply.

Regards,
Wanpeng Li
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: CFS scheduler unfairly prefers pinned tasks Mike Galbraith <umgwanakikbuti@gmail.com> - 2015-10-06 04:50 +0200
  Re: CFS scheduler unfairly prefers pinned tasks paul.szabo@sydney.edu.au - 2015-10-06 12:10 +0200
    Re: CFS scheduler unfairly prefers pinned tasks Mike Galbraith <umgwanakikbuti@gmail.com> - 2015-10-06 14:20 +0200
      Re: CFS scheduler unfairly prefers pinned tasks paul.szabo@sydney.edu.au - 2015-10-06 22:50 +0200
        Re: CFS scheduler unfairly prefers pinned tasks Mike Galbraith <umgwanakikbuti@gmail.com> - 2015-10-07 03:30 +0200
  Re: CFS scheduler unfairly prefers pinned tasks Mike Galbraith <umgwanakikbuti@gmail.com> - 2015-10-08 10:30 +0200
    Re: CFS scheduler unfairly prefers pinned tasks paul.szabo@sydney.edu.au - 2015-10-08 13:00 +0200
      Re: CFS scheduler unfairly prefers pinned tasks Peter Zijlstra <peterz@infradead.org> - 2015-10-08 13:30 +0200
        [patch] sched: disable task group re-weighting on the desktop Mike Galbraith <umgwanakikbuti@gmail.com> - 2015-10-10 15:30 +0200
          Re: [patch] sched: disable task group re-weighting on the desktop Peter Zijlstra <peterz@infradead.org> - 2015-10-10 19:10 +0200
            Re: [patch] sched: disable task group re-weighting on the desktop Peter Zijlstra <peterz@infradead.org> - 2015-10-10 19:20 +0200
            Re: [patch] sched: disable task group re-weighting on the desktop Mike Galbraith <umgwanakikbuti@gmail.com> - 2015-10-11 04:30 +0200
              4.3 group scheduling regression Mike Galbraith <umgwanakikbuti@gmail.com> - 2015-10-11 19:50 +0200
                Re: 4.3 group scheduling regression Peter Zijlstra <peterz@infradead.org> - 2015-10-12 09:30 +0200
                Re: 4.3 group scheduling regression Mike Galbraith <umgwanakikbuti@gmail.com> - 2015-10-12 09:50 +0200
                Re: 4.3 group scheduling regression Peter Zijlstra <peterz@infradead.org> - 2015-10-12 10:10 +0200
                Re: 4.3 group scheduling regression Yuyang Du <yuyang.du@intel.com> - 2015-10-12 10:50 +0200
                Re: 4.3 group scheduling regression Peter Zijlstra <peterz@infradead.org> - 2015-10-12 11:20 +0200
                Re: 4.3 group scheduling regression Yuyang Du <yuyang.du@intel.com> - 2015-10-12 12:10 +0200
                Re: 4.3 group scheduling regression Mike Galbraith <umgwanakikbuti@gmail.com> - 2015-10-12 12:30 +0200
                Re: 4.3 group scheduling regression Yuyang Du <yuyang.du@intel.com> - 2015-10-13 05:50 +0200
                Re: 4.3 group scheduling regression Mike Galbraith <umgwanakikbuti@gmail.com> - 2015-10-13 06:10 +0200
                Re: 4.3 group scheduling regression Yuyang Du <yuyang.du@intel.com> - 2015-10-13 06:40 +0200
                Re: 4.3 group scheduling regression Peter Zijlstra <peterz@infradead.org> - 2015-10-13 10:10 +0200
                Re: 4.3 group scheduling regression Peter Zijlstra <peterz@infradead.org> - 2015-10-13 10:20 +0200
                Re: 4.3 group scheduling regression Yuyang Du <yuyang.du@intel.com> - 2015-10-13 10:30 +0200
                Re: 4.3 group scheduling regression Yuyang Du <yuyang.du@intel.com> - 2015-10-13 10:30 +0200
                Re: 4.3 group scheduling regression Peter Zijlstra <peterz@infradead.org> - 2015-10-12 13:50 +0200
                Re: 4.3 group scheduling regression Mike Galbraith <umgwanakikbuti@gmail.com> - 2015-10-13 04:30 +0200
                Re: 4.3 group scheduling regression Yuyang Du <yuyang.du@intel.com> - 2015-10-13 05:30 +0200
                Re: 4.3 group scheduling regression Peter Zijlstra <peterz@infradead.org> - 2015-10-13 10:10 +0200
                Re: 4.3 group scheduling regression Mike Galbraith <umgwanakikbuti@gmail.com> - 2015-10-12 10:50 +0200
          Re: [patch] sched: disable task group re-weighting on the desktop paul.szabo@sydney.edu.au - 2015-10-10 22:20 +0200
            Re: [patch] sched: disable task group re-weighting on the desktop Mike Galbraith <umgwanakikbuti@gmail.com> - 2015-10-11 04:40 +0200
              Re: [patch] sched: disable task group re-weighting on the desktop paul.szabo@sydney.edu.au - 2015-10-11 11:30 +0200
                Re: [patch] sched: disable task group re-weighting on the desktop Mike Galbraith <umgwanakikbuti@gmail.com> - 2015-10-11 15:00 +0200
          Re: [patch] sched: disable task group re-weighting on the desktop paul.szabo@sydney.edu.au - 2015-10-11 21:50 +0200
            Re: [patch] sched: disable task group re-weighting on the desktop Mike Galbraith <umgwanakikbuti@gmail.com> - 2015-10-12 04:00 +0200
      Re: CFS scheduler unfairly prefers pinned tasks Mike Galbraith <umgwanakikbuti@gmail.com> - 2015-10-08 16:30 +0200
        Re: CFS scheduler unfairly prefers pinned tasks paul.szabo@sydney.edu.au - 2015-10-09 00:00 +0200
          Re: CFS scheduler unfairly prefers pinned tasks Mike Galbraith <umgwanakikbuti@gmail.com> - 2015-10-09 04:00 +0200
          Re: CFS scheduler unfairly prefers pinned tasks Mike Galbraith <umgwanakikbuti@gmail.com> - 2015-10-09 04:50 +0200
            Re: CFS scheduler unfairly prefers pinned tasks paul.szabo@sydney.edu.au - 2015-10-11 11:50 +0200
    Re: CFS scheduler unfairly prefers pinned tasks Wanpeng Li <wanpeng.li@hotmail.com> - 2015-10-10 06:10 +0200
      Re: CFS scheduler unfairly prefers pinned tasks Wanpeng Li <wanpeng.li@hotmail.com> - 2015-10-10 10:00 +0200

csiph-web