All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: Sched_class documentation
       [not found] ` <20100525071147.GC5985@elte.hu>
@ 2010-06-17 17:02   ` sebastiano spicuglia
  2010-06-17 17:13     ` Peter Zijlstra
  0 siblings, 1 reply; 2+ messages in thread
From: sebastiano spicuglia @ 2010-06-17 17:02 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: a.p.zijlstra, linux-kernel

Hi Ingo,

I made many progress. But I have two doubts yet.
First: what does hrtick_start do?
I think that: if I call hrtick_start(rq, 500)  then, after 500ns, the
task_tick function will be invocated.
Is it right?
Second: if my schedule_class decides to preempt the current task, it
has to call resched_task(rq->curr).
Is it right?

Thanks in advance.
Kind Regards.
Sebastiano.

On Tue, May 25, 2010 at 9:11 AM, Ingo Molnar <mingo@elte.hu> wrote:
>
> Hi,
>
> * sebastiano.spicuglia@mail.polimi.it <sebastiano.spicuglia@mail.polimi.it> wrote:
>
>> Hi Ingo,
>>
>> excuse me for contacting you in this way.
>> I don't want hurt you.
>> I am implementing a new schedule class for my bachelor
>> project degree at Politecnico di Milano.
>> I experienced many problems but sometimes the kernel starts.
>> The main problem is the documentation.
>> Could you explain me when sched.c calls sched_class functions (
>> enqueue_task, dequeue_task, etc... )
>> and what sched_class functions should do?
>> My reverse engineering skills don't work very well and
>> in internet there are not many information about this and
>> however they are generic and incomplete.
>>
>> I am working with version 2.6.34.
>
> There's a couple of files in Documentation/sched/ which give a high-level
> description - but some of that info is outdated. Most of the documentation is
> the code itself, as usual ;-)
>
> If you have any questions, please also Cc: lkml and Peter Zijstra
> (co-maintainer of the scheduler):
>
>  Peter Zijlstra <a.p.zijlstra@chello.nl>
>
> Thanks,
>
>        Ingo
>

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

* Re: Sched_class documentation
  2010-06-17 17:02   ` Sched_class documentation sebastiano spicuglia
@ 2010-06-17 17:13     ` Peter Zijlstra
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Zijlstra @ 2010-06-17 17:13 UTC (permalink / raw)
  To: sebastiano spicuglia; +Cc: Ingo Molnar, linux-kernel

On Thu, 2010-06-17 at 19:02 +0200, sebastiano spicuglia wrote:
> Hi Ingo,
> 
> I made many progress. But I have two doubts yet.
> First: what does hrtick_start do?

higher resolution ticks

> I think that: if I call hrtick_start(rq, 500)  then, after 500ns, the
> task_tick function will be invocated.
> Is it right?

Yep, instead of waiting for the next system tick is programs a hrtimer
to deliver it -- its disabled by default though, since programming
timers is rather expensive :/

> Second: if my schedule_class decides to preempt the current task, it
> has to call resched_task(rq->curr).
> Is it right?

Either that or resched_cpu(), depending on which is most convenient.

It sets TIF_RESCHED and possibly IPIs the remote CPU. The TIF flag is
then observed (on re-entry to userspace in case of the IPI) and we call
into schedule().

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

end of thread, other threads:[~2010-06-17 17:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20100523144912.jfmkhsp50kcgk8os@webmail-stud.polimi.it>
     [not found] ` <20100525071147.GC5985@elte.hu>
2010-06-17 17:02   ` Sched_class documentation sebastiano spicuglia
2010-06-17 17:13     ` Peter Zijlstra

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.