<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/kernel/sched/core.c, branch v3.11</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v3.11</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v3.11'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2013-08-13T23:58:17Z</updated>
<entry>
<title>Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip</title>
<updated>2013-08-13T23:58:17Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2013-08-13T23:58:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=28fbc8b6a29c849a3f03a6b05010d4b584055665'/>
<id>urn:sha1:28fbc8b6a29c849a3f03a6b05010d4b584055665</id>
<content type='text'>
Pull scheduler fixes from Ingo Molnar:
 "Docbook fixes that make 99% of the diffstat, plus a oneliner fix"

* 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  sched: Ensure update_cfs_shares() is called for parents of continuously-running tasks
  sched: Fix some kernel-doc warnings
</content>
</entry>
<entry>
<title>sched: fix the theoretical signal_wake_up() vs schedule() race</title>
<updated>2013-08-13T15:19:26Z</updated>
<author>
<name>Oleg Nesterov</name>
<email>oleg@redhat.com</email>
</author>
<published>2013-08-12T16:14:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e0acd0a68ec7dbf6b7a81a87a867ebd7ac9b76c4'/>
<id>urn:sha1:e0acd0a68ec7dbf6b7a81a87a867ebd7ac9b76c4</id>
<content type='text'>
This is only theoretical, but after try_to_wake_up(p) was changed
to check p-&gt;state under p-&gt;pi_lock the code like

	__set_current_state(TASK_INTERRUPTIBLE);
	schedule();

can miss a signal. This is the special case of wait-for-condition,
it relies on try_to_wake_up/schedule interaction and thus it does
not need mb() between __set_current_state() and if(signal_pending).

However, this __set_current_state() can move into the critical
section protected by rq-&gt;lock, now that try_to_wake_up() takes
another lock we need to ensure that it can't be reordered with
"if (signal_pending(current))" check inside that section.

The patch is actually one-liner, it simply adds smp_wmb() before
spin_lock_irq(rq-&gt;lock). This is what try_to_wake_up() already
does by the same reason.

We turn this wmb() into the new helper, smp_mb__before_spinlock(),
for better documentation and to allow the architectures to change
the default implementation.

While at it, kill smp_mb__after_lock(), it has no callers.

Perhaps we can also add smp_mb__before/after_spinunlock() for
prepare_to_wait().

Signed-off-by: Oleg Nesterov &lt;oleg@redhat.com&gt;
Acked-by: Peter Zijlstra &lt;peterz@infradead.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>sched: Fix some kernel-doc warnings</title>
<updated>2013-07-18T07:58:21Z</updated>
<author>
<name>Yacine Belkadi</name>
<email>yacine.belkadi.1@gmail.com</email>
</author>
<published>2013-07-12T18:45:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e69f61862ab833e9b8d3c15b6ce07fd69f3bfecc'/>
<id>urn:sha1:e69f61862ab833e9b8d3c15b6ce07fd69f3bfecc</id>
<content type='text'>
When building the htmldocs (in verbose mode), scripts/kernel-doc
reports the follwing type of warnings:

  Warning(kernel/sched/core.c:936): No description found for return value of 'task_curr'
  ...

Fix those by:

 - adding the missing descriptions
 - using "Return" sections for the descriptions

Signed-off-by: Yacine Belkadi &lt;yacine.belkadi.1@gmail.com&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Link: http://lkml.kernel.org/r/1373654747-2389-1-git-send-email-yacine.belkadi.1@gmail.com
[ While at it, fix the cpupri_set() explanation. ]
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
</entry>
<entry>
<title>kernel: delete __cpuinit usage from all core kernel files</title>
<updated>2013-07-14T23:36:59Z</updated>
<author>
<name>Paul Gortmaker</name>
<email>paul.gortmaker@windriver.com</email>
</author>
<published>2013-06-19T18:53:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0db0628d90125193280eabb501c94feaf48fa9ab'/>
<id>urn:sha1:0db0628d90125193280eabb501c94feaf48fa9ab</id>
<content type='text'>
The __cpuinit type of throwaway sections might have made sense
some time ago when RAM was more constrained, but now the savings
do not offset the cost and complications.  For example, the fix in
commit 5e427ec2d0 ("x86: Fix bit corruption at CPU resume time")
is a good example of the nasty type of bugs that can be created
with improper use of the various __init prefixes.

After a discussion on LKML[1] it was decided that cpuinit should go
the way of devinit and be phased out.  Once all the users are gone,
we can then finally remove the macros themselves from linux/init.h.

This removes all the uses of the __cpuinit macros from C files in
the core kernel directories (kernel, init, lib, mm, and include)
that don't really have a specific maintainer.

[1] https://lkml.org/lkml/2013/5/20/589

Signed-off-by: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
</content>
</entry>
<entry>
<title>sched: Fix HRTICK</title>
<updated>2013-07-12T11:52:58Z</updated>
<author>
<name>Peter Zijlstra</name>
<email>peterz@infradead.org</email>
</author>
<published>2013-06-28T09:18:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=971ee28cbd1ccd87b3164facd9359a534c1d2892'/>
<id>urn:sha1:971ee28cbd1ccd87b3164facd9359a534c1d2892</id>
<content type='text'>
David reported that the HRTICK sched feature was borken; which was enough
motivation for me to finally fix it ;-)

We should not allow hrtimer code to do softirq wakeups while holding scheduler
locks. The hrtimer code only needs this when we accidentally try to program an
expired time. We don't much care about those anyway since we have the regular
tick to fall back to.

Reported-by: David Ahern &lt;dsahern@gmail.com&gt;
Tested-by: David Ahern &lt;dsahern@gmail.com&gt;
Signed-off-by: Peter Zijlstra &lt;peterz@infradead.org&gt;
Link: http://lkml.kernel.org/r/20130628091853.GE29209@dyad.programming.kicks-ass.net
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
</entry>
<entry>
<title>Merge tag 'v3.10' into sched/core</title>
<updated>2013-07-01T09:18:53Z</updated>
<author>
<name>Ingo Molnar</name>
<email>mingo@kernel.org</email>
</author>
<published>2013-07-01T09:16:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2fd1b487884310d0aa0c0640179dc7490ad86313'/>
<id>urn:sha1:2fd1b487884310d0aa0c0640179dc7490ad86313</id>
<content type='text'>
Merge in a recent upstream commit:

  c2853c8df57f include/linux/math64.h: add div64_ul()

because:

  72a4cf20cb71 sched: Change cfs_rq load avg to unsigned long

relies on it.

[ We don't rebase sched/core for this, because the handful of
  followup commits after the broken commit are not behavioral
  changes so are unlikely to be needed during bisection. ]

Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
</entry>
<entry>
<title>sched: Update cpu load after task_tick</title>
<updated>2013-06-27T08:07:33Z</updated>
<author>
<name>Alex Shi</name>
<email>alex.shi@intel.com</email>
</author>
<published>2013-06-20T02:18:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=83dfd5235ebd66c284b97befe6eabff7132333e6'/>
<id>urn:sha1:83dfd5235ebd66c284b97befe6eabff7132333e6</id>
<content type='text'>
To get the latest runnable info, we need do this cpuload update after
task_tick.

Signed-off-by: Alex Shi &lt;alex.shi@intel.com&gt;
Reviewed-by: Paul Turner &lt;pjt@google.com&gt;
Signed-off-by: Peter Zijlstra &lt;peterz@infradead.org&gt;
Link: http://lkml.kernel.org/r/1371694737-29336-6-git-send-email-alex.shi@intel.com
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
</entry>
<entry>
<title>sched: Set an initial value of runnable avg for new forked task</title>
<updated>2013-06-27T08:07:30Z</updated>
<author>
<name>Alex Shi</name>
<email>alex.shi@intel.com</email>
</author>
<published>2013-06-20T02:18:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a75cdaa915e42ef0e6f38dc7f2a6a1deca91d648'/>
<id>urn:sha1:a75cdaa915e42ef0e6f38dc7f2a6a1deca91d648</id>
<content type='text'>
We need to initialize the se.avg.{decay_count, load_avg_contrib} for a
new forked task. Otherwise random values of above variables cause a
mess when a new task is enqueued:

    enqueue_task_fair
        enqueue_entity
            enqueue_entity_load_avg

and make fork balancing imbalance due to incorrect load_avg_contrib.

Further more, Morten Rasmussen notice some tasks were not launched at
once after created. So Paul and Peter suggest giving a start value for
new task runnable avg time same as sched_slice().

PeterZ said:

&gt; So the 'problem' is that our running avg is a 'floating' average; ie. it
&gt; decays with time. Now we have to guess about the future of our newly
&gt; spawned task -- something that is nigh impossible seeing these CPU
&gt; vendors keep refusing to implement the crystal ball instruction.
&gt;
&gt; So there's two asymptotic cases we want to deal well with; 1) the case
&gt; where the newly spawned program will be 'nearly' idle for its lifetime;
&gt; and 2) the case where its cpu-bound.
&gt;
&gt; Since we have to guess, we'll go for worst case and assume its
&gt; cpu-bound; now we don't want to make the avg so heavy adjusting to the
&gt; near-idle case takes forever. We want to be able to quickly adjust and
&gt; lower our running avg.
&gt;
&gt; Now we also don't want to make our avg too light, such that it gets
&gt; decremented just for the new task not having had a chance to run yet --
&gt; even if when it would run, it would be more cpu-bound than not.
&gt;
&gt; So what we do is we make the initial avg of the same duration as that we
&gt; guess it takes to run each task on the system at least once -- aka
&gt; sched_slice().
&gt;
&gt; Of course we can defeat this with wakeup/fork bombs, but in the 'normal'
&gt; case it should be good enough.

Paul also contributed most of the code comments in this commit.

Signed-off-by: Alex Shi &lt;alex.shi@intel.com&gt;
Reviewed-by: Gu Zheng &lt;guz.fnst@cn.fujitsu.com&gt;
Reviewed-by: Paul Turner &lt;pjt@google.com&gt;
[peterz; added explanation of sched_slice() usage]
Signed-off-by: Peter Zijlstra &lt;peterz@infradead.org&gt;
Link: http://lkml.kernel.org/r/1371694737-29336-4-git-send-email-alex.shi@intel.com
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
</entry>
<entry>
<title>Revert "sched: Introduce temporary FAIR_GROUP_SCHED dependency for load-tracking"</title>
<updated>2013-06-27T08:07:22Z</updated>
<author>
<name>Alex Shi</name>
<email>alex.shi@intel.com</email>
</author>
<published>2013-06-26T05:05:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=141965c7494d984b2bf24efd361a3125278869c6'/>
<id>urn:sha1:141965c7494d984b2bf24efd361a3125278869c6</id>
<content type='text'>
Remove CONFIG_FAIR_GROUP_SCHED that covers the runnable info, then
we can use runnable load variables.

Also remove 2 CONFIG_FAIR_GROUP_SCHED setting which is not in reverted
patch(introduced in 9ee474f), but also need to revert.

Signed-off-by: Alex Shi &lt;alex.shi@intel.com&gt;
Signed-off-by: Peter Zijlstra &lt;peterz@infradead.org&gt;
Link: http://lkml.kernel.org/r/51CA76A3.3050207@intel.com
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
</entry>
<entry>
<title>Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip</title>
<updated>2013-06-20T18:18:35Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2013-06-20T18:18:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a3d5c3460a86f52ea435b3fb98be112bd18faabc'/>
<id>urn:sha1:a3d5c3460a86f52ea435b3fb98be112bd18faabc</id>
<content type='text'>
Pull scheduler fixes from Ingo Molnar:
 "Two smaller fixes - plus a context tracking tracing fix that is a bit
  bigger"

* 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  tracing/context-tracking: Add preempt_schedule_context() for tracing
  sched: Fix clear NOHZ_BALANCE_KICK
  sched/x86: Construct all sibling maps if smt
</content>
</entry>
</feed>
