<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/kernel/sched.c, branch v2.6.13</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=v2.6.13</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v2.6.13'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2005-08-18T19:53:58Z</updated>
<entry>
<title>[PATCH] Make RLIMIT_NICE ranges consistent with getpriority(2)</title>
<updated>2005-08-18T19:53:58Z</updated>
<author>
<name>Matt Mackall</name>
<email>mpm@selenic.com</email>
</author>
<published>2005-08-18T18:24:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=024f474795af7a0d41bd6d60061d78bd66d13f56'/>
<id>urn:sha1:024f474795af7a0d41bd6d60061d78bd66d13f56</id>
<content type='text'>
As suggested by Michael Kerrisk &lt;mtk-manpages@gmx.net&gt;, make RLIMIT_NICE
consistent with getpriority before it becomes available in released glibc.

Signed-off-by: Matt Mackall &lt;mpm@selenic.com&gt;
Acked-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Acked-by: Chris Wright &lt;chrisw@osdl.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] fix MAX_USER_RT_PRIO and MAX_RT_PRIO</title>
<updated>2005-07-26T22:40:00Z</updated>
<author>
<name>Steven Rostedt</name>
<email>rostedt@goodmis.org</email>
</author>
<published>2005-07-25T20:28:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d46523ea32a79fbc8cd1237f9441f45cc3f02456'/>
<id>urn:sha1:d46523ea32a79fbc8cd1237f9441f45cc3f02456</id>
<content type='text'>
Here's the patch again to fix the code to handle if the values between
MAX_USER_RT_PRIO and MAX_RT_PRIO are different.

Without this patch, an SMP system will crash if the values are
different.

Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Dean Nelson &lt;dcn@sgi.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] Fix RLIMIT_RTPRIO breakage</title>
<updated>2005-07-26T22:30:51Z</updated>
<author>
<name>Andreas Steinmetz</name>
<email>ast@domdv.de</email>
</author>
<published>2005-07-23T11:42:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=18586e721636527cb5177467fb17e2350615978a'/>
<id>urn:sha1:18586e721636527cb5177467fb17e2350615978a</id>
<content type='text'>
RLIMIT_RTPRIO is supposed to grant non privileged users the right to use
SCHED_FIFO/SCHED_RR scheduling policies with priorites bounded by the
RLIMIT_RTPRIO value via sched_setscheduler(). This is usually used by
audio users.

Unfortunately this is broken in 2.6.13rc3 as you can see in the excerpt
from sched_setscheduler below:

        /*
         * Allow unprivileged RT tasks to decrease priority:
         */
        if (!capable(CAP_SYS_NICE)) {
                /* can't change policy */
                if (policy != p-&gt;policy)
                        return -EPERM;

After the above unconditional test which causes sched_setscheduler to
fail with no regard to the RLIMIT_RTPRIO value the following check is made:

               /* can't increase priority */
                if (policy != SCHED_NORMAL &amp;&amp;
                    param-&gt;sched_priority &gt; p-&gt;rt_priority &amp;&amp;
                    param-&gt;sched_priority &gt;
                                p-&gt;signal-&gt;rlim[RLIMIT_RTPRIO].rlim_cur)
                        return -EPERM;

Thus I do believe that the RLIMIT_RTPRIO value must be taken into
account for the policy check, especially as the RLIMIT_RTPRIO limit is
of no use without this change.

The attached patch fixes this problem.

Signed-off-by: Andreas Steinmetz &lt;ast@domdv.de&gt;
Acked-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] cond_resched(): fix bogus might_sleep() warning</title>
<updated>2005-07-08T01:23:47Z</updated>
<author>
<name>Ingo Molnar</name>
<email>mingo@elte.hu</email>
</author>
<published>2005-07-08T00:57:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5bbcfd9000887c0da7d57cc7b3ac869fc0dd5aa9'/>
<id>urn:sha1:5bbcfd9000887c0da7d57cc7b3ac869fc0dd5aa9</id>
<content type='text'>
The BKS might be reacquired before we have dropped PREEMPT_ACTIVE, which
could trigger a second could trigger a second cond_resched() call.  Bug
found by Hirofumi Ogawa.

Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] Tweak idle thread setup semantics</title>
<updated>2005-06-28T21:56:51Z</updated>
<author>
<name>Ingo Molnar</name>
<email>mingo@elte.hu</email>
</author>
<published>2005-06-28T14:40:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f340c0d1a3f40fdcba69cd291530a4debc58748f'/>
<id>urn:sha1:f340c0d1a3f40fdcba69cd291530a4debc58748f</id>
<content type='text'>
This patch tweaks idle thread setup semantics a bit: instead of setting
NEED_RESCHED in init_idle(), we do an explicit schedule() before calling
into cpu_idle().

This patch, while having no negative side-effects, enables wider use of
cond_resched()s.  (which might happen in the stock kernel too, but it's
particulary important for voluntary-preempt)

Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] Update cfq io scheduler to time sliced design</title>
<updated>2005-06-27T21:33:29Z</updated>
<author>
<name>Jens Axboe</name>
<email>axboe@suse.de</email>
</author>
<published>2005-06-27T08:55:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=22e2c507c301c3dbbcf91b4948b88f78842ee6c9'/>
<id>urn:sha1:22e2c507c301c3dbbcf91b4948b88f78842ee6c9</id>
<content type='text'>
This updates the CFQ io scheduler to the new time sliced design (cfq
v3).  It provides full process fairness, while giving excellent
aggregate system throughput even for many competing processes.  It
supports io priorities, either inherited from the cpu nice value or set
directly with the ioprio_get/set syscalls.  The latter closely mimic
set/getpriority.

This import is based on my latest from -mm.

Signed-off-by: Jens Axboe &lt;axboe@suse.de&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>Merge Christoph's freeze cleanup patch</title>
<updated>2005-06-26T00:16:53Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@ppc970.osdl.org</email>
</author>
<published>2005-06-26T00:16:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2031d0f586839bc68f35bcf8580b18947f8491d4'/>
<id>urn:sha1:2031d0f586839bc68f35bcf8580b18947f8491d4</id>
<content type='text'>
</content>
</entry>
<entry>
<title>[PATCH] Cleanup patch for process freezing</title>
<updated>2005-06-26T00:10:13Z</updated>
<author>
<name>Christoph Lameter</name>
<email>christoph@lameter.com</email>
</author>
<published>2005-06-25T06:13:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3e1d1d28d99dabe63c64f7f40f1ca1d646de1f73'/>
<id>urn:sha1:3e1d1d28d99dabe63c64f7f40f1ca1d646de1f73</id>
<content type='text'>
1. Establish a simple API for process freezing defined in linux/include/sched.h:

   frozen(process)		Check for frozen process
   freezing(process)		Check if a process is being frozen
   freeze(process)		Tell a process to freeze (go to refrigerator)
   thaw_process(process)	Restart process
   frozen_process(process)	Process is frozen now

2. Remove all references to PF_FREEZE and PF_FROZEN from all
   kernel sources except sched.h

3. Fix numerous locations where try_to_freeze is manually done by a driver

4. Remove the argument that is no longer necessary from two function calls.

5. Some whitespace cleanup

6. Clear potential race in refrigerator (provides an open window of PF_FREEZE
   cleared before setting PF_FROZEN, recalc_sigpending does not check
   PF_FROZEN).

This patch does not address the problem of freeze_processes() violating the rule
that a task may only modify its own flags by setting PF_FREEZE. This is not clean
in an SMP environment. freeze(process) is therefore not SMP safe!

Signed-off-by: Christoph Lameter &lt;christoph@lameter.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] Dynamic sched domains: sched changes</title>
<updated>2005-06-25T23:24:45Z</updated>
<author>
<name>Dinakar Guniguntala</name>
<email>dino@in.ibm.com</email>
</author>
<published>2005-06-25T21:57:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1a20ff27ef75d866730ee796acd811a925af762f'/>
<id>urn:sha1:1a20ff27ef75d866730ee796acd811a925af762f</id>
<content type='text'>
The following patches add dynamic sched domains functionality that was
extensively discussed on lkml and lse-tech.  I would like to see this added to
-mm

o The main advantage with this feature is that it ensures that the scheduler
  load balacing code only balances against the cpus that are in the sched
  domain as defined by an exclusive cpuset and not all of the cpus in the
  system. This removes any overhead due to load balancing code trying to
  pull tasks outside of the cpu exclusive cpuset only to be prevented by
  the tasks' cpus_allowed mask.
o cpu exclusive cpusets are useful for servers running orthogonal
  workloads such as RT applications requiring low latency and HPC
  applications that are throughput sensitive

o It provides a new API partition_sched_domains in sched.c
  that makes dynamic sched domains possible.
o cpu_exclusive cpusets sets are now associated with a sched domain.
  Which means that the users can dynamically modify the sched domains
  through the cpuset file system interface
o ia64 sched domain code has been updated to support this feature as well
o Currently, this does not support hotplug. (However some of my tests
  indicate hotplug+preempt is currently broken)
o I have tested it extensively on x86.
o This should have very minimal impact on performance as none of
  the fast paths are affected

Signed-off-by: Dinakar Guniguntala &lt;dino@in.ibm.com&gt;
Acked-by: Paul Jackson &lt;pj@sgi.com&gt;
Acked-by: Nick Piggin &lt;nickpiggin@yahoo.com.au&gt;
Acked-by: Matthew Dobson &lt;colpatch@us.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] Changing RT priority without CAP_SYS_NICE</title>
<updated>2005-06-25T23:24:44Z</updated>
<author>
<name>Olivier Croquette</name>
<email>ocroquette@free.fr</email>
</author>
<published>2005-06-25T21:57:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=37e4ab3f0cba13adf3535d373fd98e5ee47b5410'/>
<id>urn:sha1:37e4ab3f0cba13adf3535d373fd98e5ee47b5410</id>
<content type='text'>
Presently, a process without the capability CAP_SYS_NICE can not change
its own policy, which is OK.

But it can also not decrease its RT priority (if scheduled with policy
SCHED_RR or SCHED_FIFO), which is what this patch changes.

The rationale is the same as for the nice value: a process should be
able to require less priority for itself. Increasing the priority is
still not allowed.

This is for example useful if you give a multithreaded user process a RT
priority, and the process would like to organize its internal threads
using priorities also. Then you can give the process the highest
priority needed N, and the process starts its threads with lower
priorities: N-1, N-2...

The POSIX norm says that the permissions are implementation specific, so
I think we can do that.

In a sense, it makes the permissions consistent whatever the policy is:
with this patch, process scheduled by SCHED_FIFO, SCHED_RR and
SCHED_OTHER can all decrease their priority.

From: Ingo Molnar &lt;mingo@elte.hu&gt;

cleaned up and merged to -mm.

Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
</feed>
