linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH v3 0/3] sched: simplify the select_task_rq_fair()
@ 2013-01-29  9:08 Michael Wang
  2013-01-29  9:09 ` [RFC PATCH v3 1/3] sched: schedule balance map foundation Michael Wang
                   ` (4 more replies)
  0 siblings, 5 replies; 55+ messages in thread
From: Michael Wang @ 2013-01-29  9:08 UTC (permalink / raw)
  To: LKML, Ingo Molnar, Peter Zijlstra
  Cc: Paul Turner, Mike Galbraith, Andrew Morton, alex.shi, Ram Pai,
	Nikunj A. Dadhania, Namhyung Kim

v3 change log:
	Fix small logical issues (Thanks to Mike Galbraith).
	Change the way of handling WAKE.

This patch set is trying to simplify the select_task_rq_fair() with
schedule balance map.

After get rid of the complex code and reorganize the logical, pgbench show
the improvement, more the clients, bigger the improvement.

				Prev:		Post:

	| db_size | clients |	|  tps  |	|  tps  |
        +---------+---------+   +-------+       +-------+
        | 22 MB   |       1 |   | 10788 |       | 10881 |
        | 22 MB   |       2 |   | 21617 |       | 21837 |
        | 22 MB   |       4 |   | 41597 |       | 42645 |
        | 22 MB   |       8 |   | 54622 |       | 57808 |
        | 22 MB   |      12 |   | 50753 |       | 54527 |
        | 22 MB   |      16 |   | 50433 |       | 56368 |	+11.77%
        | 22 MB   |      24 |   | 46725 |       | 54319 |	+16.25%
        | 22 MB   |      32 |   | 43498 |       | 54650 |	+25.64%
        | 7484 MB |       1 |   |  7894 |       |  8301 |
        | 7484 MB |       2 |   | 19477 |       | 19622 |
        | 7484 MB |       4 |   | 36458 |       | 38242 |
        | 7484 MB |       8 |   | 48423 |       | 50796 |
        | 7484 MB |      12 |   | 46042 |       | 49938 |
        | 7484 MB |      16 |   | 46274 |       | 50507 |	+9.15%
        | 7484 MB |      24 |   | 42583 |       | 49175 |	+15.48%
        | 7484 MB |      32 |   | 36413 |       | 49148 |	+34.97%
        | 15 GB   |       1 |   |  7742 |       |  7876 |
        | 15 GB   |       2 |   | 19339 |       | 19531 |
        | 15 GB   |       4 |   | 36072 |       | 37389 |
        | 15 GB   |       8 |   | 48549 |       | 50570 |
        | 15 GB   |      12 |   | 45716 |       | 49542 |
        | 15 GB   |      16 |   | 46127 |       | 49647 |	+7.63%
        | 15 GB   |      24 |   | 42539 |       | 48639 |	+14.34%
        | 15 GB   |      32 |   | 36038 |       | 48560 |	+34.75%

Please check the patch for more details about schedule balance map.

Support the NUMA domain but not well tested.
Support the rebuild of domain but not tested.

Comments are very welcomed.

Behind the v3:
	Some changes has been applied to the way of handling WAKE.

	And that's all around one question, whether we should do load balance
	for WAKE or not?

	In the old world, the only chance to do load balance for WAKE is when
	prev cpu and curr cpu are not cache affine, but that doesn't make sense.

	I suppose the real meaning behind that logical is, do balance only if
	cache benefit nothing after changing cpu.

	However, select_idle_sibling() is not only designed for the purpose to
	take care of cache, it also benefit latency, and cost less than the
	balance path.

	Besides, it's impossible to estimate the benefit of doing load balance
	at that point of time.

	And that's come out the v3, no load balance for WAKE.

Test with:
	12 cpu X86 server and linux-next 3.8.0-rc3.

Michael Wang (3):
	[RFC PATCH v3 1/3] sched: schedule balance map foundation
	[RFC PATCH v3 2/3] sched: build schedule balance map
	[RFC PATCH v3 3/3] sched: simplify select_task_rq_fair() with schedule balance map

Signed-off-by: Michael Wang <wangyun@linux.vnet.ibm.com>
---
 b/kernel/sched/core.c  |   44 +++++++++++++++
 b/kernel/sched/fair.c  |  135 ++++++++++++++++++++++++++-----------------------
 b/kernel/sched/sched.h |   14 +++++
 kernel/sched/core.c    |   67 ++++++++++++++++++++++++
 4 files changed, 199 insertions(+), 61 deletions(-)


^ permalink raw reply	[flat|nested] 55+ messages in thread

end of thread, other threads:[~2013-02-22 14:42 UTC | newest]

Thread overview: 55+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-29  9:08 [RFC PATCH v3 0/3] sched: simplify the select_task_rq_fair() Michael Wang
2013-01-29  9:09 ` [RFC PATCH v3 1/3] sched: schedule balance map foundation Michael Wang
2013-02-20 13:21   ` Peter Zijlstra
2013-02-21  4:52     ` Michael Wang
2013-02-20 13:25   ` Peter Zijlstra
2013-02-21  4:58     ` Michael Wang
2013-02-21 11:37       ` Peter Zijlstra
2013-02-22  2:53         ` Michael Wang
2013-02-22  3:33           ` Alex Shi
2013-02-22  4:19             ` Michael Wang
2013-02-22  4:46               ` Alex Shi
2013-02-22  5:05                 ` Michael Wang
2013-01-29  9:09 ` [RFC PATCH v3 2/3] sched: build schedule balance map Michael Wang
2013-01-29  9:10 ` [RFC PATCH v3 3/3] sched: simplify select_task_rq_fair() with " Michael Wang
2013-02-18  5:52 ` [RFC PATCH v3 0/3] sched: simplify the select_task_rq_fair() Michael Wang
2013-02-20 10:49 ` Ingo Molnar
2013-02-20 13:32   ` Peter Zijlstra
2013-02-20 14:05     ` Mike Galbraith
2013-02-21  5:21       ` Michael Wang
2013-02-21  5:14     ` Michael Wang
2013-02-21  4:51   ` Michael Wang
2013-02-21  6:11     ` Mike Galbraith
2013-02-21  7:00       ` Michael Wang
2013-02-21  8:10         ` Mike Galbraith
2013-02-21  9:08           ` Michael Wang
2013-02-21  9:43             ` Mike Galbraith
2013-02-22  2:36               ` Michael Wang
2013-02-22  5:02                 ` Mike Galbraith
2013-02-22  5:26                   ` Michael Wang
2013-02-22  6:13                     ` Mike Galbraith
2013-02-22  6:42                   ` Michael Wang
2013-02-22  8:17                     ` Mike Galbraith
2013-02-22  8:35                       ` Michael Wang
2013-02-22  8:21                 ` Peter Zijlstra
2013-02-22  9:10                   ` Michael Wang
2013-02-22  9:39                     ` Peter Zijlstra
2013-02-22  9:58                       ` Michael Wang
2013-02-21  9:20           ` Michael Wang
2013-02-21 10:20     ` Peter Zijlstra
2013-02-22  2:37       ` Michael Wang
2013-02-22  5:08         ` Mike Galbraith
2013-02-22  6:06           ` Michael Wang
2013-02-22  6:19             ` Mike Galbraith
2013-02-22  8:36         ` Peter Zijlstra
2013-02-22  9:11           ` Michael Wang
2013-02-22  9:57             ` Peter Zijlstra
2013-02-22 10:08               ` Michael Wang
2013-02-22  9:40           ` Mike Galbraith
2013-02-22  9:54             ` Ingo Molnar
2013-02-22 10:01               ` Mike Galbraith
2013-02-22 12:11                 ` Ingo Molnar
2013-02-22 12:35                   ` Mike Galbraith
2013-02-22 13:06                     ` Ingo Molnar
2013-02-22 14:30                       ` Mike Galbraith
2013-02-22 14:42                         ` Mike Galbraith

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).