mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peter Williams <pwil3058@bigpond.net.au>
To: Pankaj Parakh <me.pankajparakh@gmail.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	XingChao Wang <wxc200@gmail.com>
Subject: Re: How to add scheduler
Date: Wed, 28 Oct 2009 16:01:22 +1000	[thread overview]
Message-ID: <4AE7DE32.1050001@bigpond.net.au> (raw)
In-Reply-To: <27a8ee1b0910270030k555d1201if6a3f6f0576580df@mail.gmail.com>

On 27/10/09 17:30, Pankaj Parakh wrote:
> On Sat, Oct 24, 2009 at 6:07 AM, Peter Williams<pwil3058@bigpond.net.au>  wrote:
>> On 24/10/09 01:10, Pankaj Parakh wrote:
>>>
>>> Hi Peter,
>>>
>>> Thanks for showing your interest, I am student and I am working on a
>>> project similar to yours i.e. to have a facility where in one can swap
>>> scheduler in run-time, but I am in very initial state of learning so I
>>> wanted to try a simple RR scheduler, objective of doing it is to learn
>>> about different interfaces in modular design(introduced from 2.6.23
>>> with CFS). I do not have any constraint with version of linux. I am
>>> ready to take part with you provided you do not have any issue.
>>
>> No.  That's good.
>>
>> I've attached two patches which contain the work I've done so far.  They
>> should be applied in the following order:
>>
>> define_prelim_cpu_pisch_drv.patch
>> implement_spbrr_cpu_pisch_dvr.patch
>>
>> and will result in two schedulers: the default CFS 'fair' (cfs_fair)
>> scheduler and a simple priority based round robin (spbrr) scheduler; being
>> available for selection at boot time and run time.
>>
>> To select a scheduler at boot time just add 'cpu_pisch=cfs_fair' or
>> 'cpu_pisch=spbrr' to the boot command line.
>>
>> To select a scheduler at run time (as root) do:
>>
>> echo -n 'cfs_fair'>  /sys/kernel/cpu_pisch/name
>>
>> or
>>
>> echo -n 'spbrr'>  /sys/kernel/cpu_pisch/name
>>
>> The first step in adding your own scheduler would be to make a copy of the
>> file kernel/cpu_pisch_spbrr.c and then modify it.  You will also need to
>> modify:
>>
>> kernel/sched.c
>> kernel/cpu_pisch_drv.c
>> kernel/Kconfig.cpu_pisch
>>
>> Hopefully, the required changes are obvious.  If not don't hesitate to ask
>> questions.  Also if you feel the need to modify the scheduler interface
>> (defined in include/linux/cpu_pisch_drv.h) feel free BUT think very
>> carefully about it and try not to make things too complex.
>>
>> I am working on another scheduler (a simple entitlement based round robin
>> (sebrr) scheduler) which I hope to have finished before I publicly release
>> the patches.
>>
>> If you wish to have your scheduler included just send it to me as a patch
>> which applies on top of the ones that I've attached.
>>
>> Cheers
>> Peter
>> --
>> Peter Williams                                   pwil3058@bigpond.net.au
>>
>> "Learning, n. The kind of ignorance distinguishing the studious."
>>   -- Ambrose Bierce
>>
>
> Hi Peter,
>
> To which version of Linux Kernel should I apply the given patch.
>
>

Those patches were against 2.6.32-rc5 but they may also apply cleanly to 
later versions.

-- 
Peter Williams                                   pwil3058@bigpond.net.au

"Learning, n. The kind of ignorance distinguishing the studious."
  -- Ambrose Bierce

      reply	other threads:[~2009-10-28  6:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <27a8ee1b0910100017h75579306i42463e309bd26712@mail.gmail.com>
2009-10-10  7:18 ` Pankaj Parakh
2009-10-11 23:54   ` Peter Williams
2009-10-23 15:10     ` Pankaj Parakh
2009-10-24  0:37       ` Peter Williams
2009-10-27  7:30         ` Pankaj Parakh
2009-10-28  6:01           ` Peter Williams [this message]

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=4AE7DE32.1050001@bigpond.net.au \
    --to=pwil3058@bigpond.net.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=me.pankajparakh@gmail.com \
    --cc=wxc200@gmail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®