All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael wang <wangyun@linux.vnet.ibm.com>
To: Daniel Lezcano <daniel.lezcano@linaro.org>,
	raistlin@linux.it, juri.lelli@gmail.com
Cc: Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [BUG] [ tip/sched/core ] System unresponsive after booting
Date: Wed, 15 Jan 2014 17:25:55 +0800	[thread overview]
Message-ID: <52D65423.2070706@linux.vnet.ibm.com> (raw)
In-Reply-To: <52D64676.4040000@linaro.org>

Hi, Daniel

On 01/15/2014 04:27 PM, Daniel Lezcano wrote:
[snip]
> commit d50dde5a10f305253cbc3855307f608f8a3c5f73
> Author: Dario Faggioli <raistlin@linux.it>
> Date:   Thu Nov 7 14:43:36 2013 +0100
> 
>     sched: Add new scheduler syscalls to support an extended scheduling
> parameters ABI
> 
>     Add the syscalls needed for supporting scheduling algorithms
>     with extended scheduling parameters (e.g., SCHED_DEADLINE).

Will this do any helps?

Regards,
Michael Wang

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 0326c06..bf4a6ed 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -3464,6 +3464,10 @@ int sched_setscheduler(struct task_struct *p, int
policy,
                .sched_policy   = policy,
                .sched_priority = param->sched_priority
        };
+
+       if (fair_policy(policy))
+               attr.sched_nice = PRIO_TO_NICE(attr.sched_priority);
+
        return __sched_setscheduler(p, &attr, true);
 }
 EXPORT_SYMBOL_GPL(sched_setscheduler);
@@ -3494,6 +3498,10 @@ int sched_setscheduler_nocheck(struct task_struct
*p, int policy,
                .sched_policy   = policy,
                .sched_priority = param->sched_priority
        };
+
+       if (fair_policy(policy))
+               attr.sched_nice = PRIO_TO_NICE(attr.sched_priority);
+
        return __sched_setscheduler(p, &attr, false);
 }



> 
> 
> [ ... ]
> 
> 
>     Signed-off-by: Dario Faggioli <raistlin@linux.it>
>     [ Rewrote to use sched_attr. ]
>     Signed-off-by: Juri Lelli <juri.lelli@gmail.com>
>     [ Removed sched_setscheduler2() for now. ]
>     Signed-off-by: Peter Zijlstra <peterz@infradead.org>
>     Link:
> http://lkml.kernel.org/r/1383831828-15501-3-git-send-email-juri.lelli@gmail.com
> 
>     Signed-off-by: Ingo Molnar <mingo@kernel.org>
> 


  parent reply	other threads:[~2014-01-15  9:32 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-15  8:27 [BUG] [ tip/sched/core ] System unresponsive after booting Daniel Lezcano
2014-01-15  9:22 ` Ingo Molnar
2014-01-15 10:39   ` Peter Zijlstra
2014-01-15 11:00   ` Peter Zijlstra
2014-01-15 14:05     ` Peter Zijlstra
2014-01-15  9:25 ` Michael wang [this message]
2014-01-15 11:30   ` Peter Zijlstra
2014-01-15 13:28     ` Daniel Lezcano
2014-01-16 13:40     ` [tip:sched/core] sched: Preserve the nice level over sched_setscheduler() and sched_setparam() calls tip-bot for Peter Zijlstra
2014-01-15 13:27   ` [BUG] [ tip/sched/core ] System unresponsive after booting Daniel Lezcano
2014-01-15 12:04 ` Peter Zijlstra
2014-01-15 12:24   ` Ingo Molnar
2014-01-15 13:45     ` Daniel Lezcano
2014-01-15 13:09   ` Daniel Lezcano
2014-01-16 13:48   ` Daniel Lezcano
2014-01-16 14:17     ` Peter Zijlstra
2014-01-16 14:20       ` Daniel Lezcano
2014-01-16 14:25         ` Peter Zijlstra
2014-01-16 14:30           ` Daniel Lezcano
2014-01-16 15:42             ` Peter Zijlstra
2014-01-16 15:50               ` Daniel Lezcano
2014-01-16 16:54                 ` [PATCH] sched: Fix __sched_setscheduler() nice test Peter Zijlstra
2014-01-16 18:33                   ` Peter Zijlstra
2014-01-16 18:39                   ` [tip:sched/core] " tip-bot for Peter Zijlstra
2014-01-16 15:28           ` [BUG] [ tip/sched/core ] System unresponsive after booting Daniel Lezcano
2014-01-16 15:48             ` Peter Zijlstra
2014-01-16 15:51               ` Daniel Lezcano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52D65423.2070706@linux.vnet.ibm.com \
    --to=wangyun@linux.vnet.ibm.com \
    --cc=daniel.lezcano@linaro.org \
    --cc=juri.lelli@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=raistlin@linux.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.