LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (http://www.linuxquestions.org/questions/programming-9/)
-   -   wfq (http://www.linuxquestions.org/questions/programming-9/wfq-794227/)

reta 03-09-2010 10:14 AM

wfq
 
Hi,

I Want to know how to implement sch_wfq.c or qdisc_wfq.c on linux

please help me

Thanks

neonsignal 03-10-2010 05:34 AM

If you have a look in linux-source/net/sched, you will find a number of different scheduling algorithm modules, with names like sch_xxx.c. These include the following:
  • Class Based Queueing (CBQ)
  • Hierarchical Token Bucket (HTB)
  • Hierarchical Fair Service Curve (HFSC)
  • ATM Virtual Circuits (ATM)
  • Multi Band Priority Queueing (PRIO)
  • Random Early Detection (RED)
  • Stochastic Fairness Queueing (SFQ)
  • True Link Equalizer (TEQL)
  • Token Bucket Filter (TBF)
  • Generic Random Early Detection (GRED)
  • Differentiated Services marker (DSMARK)

To implement another algorithm, you would need to create a new module. Have a look at sch_sfq.c as an example.

reta 03-10-2010 12:03 PM

Quote:

Originally Posted by neonsignal (Post 3892663)
If you have a look in linux-source/net/sched, you will find a number of different scheduling algorithm modules, with names like sch_xxx.c. These include the following:
  • Class Based Queueing (CBQ)
  • Hierarchical Token Bucket (HTB)
  • Hierarchical Fair Service Curve (HFSC)
  • ATM Virtual Circuits (ATM)
  • Multi Band Priority Queueing (PRIO)
  • Random Early Detection (RED)
  • Stochastic Fairness Queueing (SFQ)
  • True Link Equalizer (TEQL)
  • Token Bucket Filter (TBF)
  • Generic Random Early Detection (GRED)
  • Differentiated Services marker (DSMARK)

To implement another algorithm, you would need to create a new module. Have a look at sch_sfq.c as an example.


Hi neonsignal,

Thanks for your replay
I know there are number of scheduling algorithm in linux but I want to implement new algorithm , can you give me the steps to do that, I'm using kernel version 2.6.18 CentOs 5.2, I hope you will help me.

best regards

reta 03-14-2010 09:31 AM

any one help me please

pixellany 03-14-2010 10:05 AM

I think you will need to give us more information on what you are doing---and why. For example, what are the features that you want to have in the new algorithm? What is it supposed to do and how will it differ from the existing?

I infer from the earlier answer that you are working on a scheduling algorithm for the kernel----correct?

reta 03-15-2010 08:03 AM

Quote:

Originally Posted by pixellany (Post 3897759)
I think you will need to give us more information on what you are doing---and why. For example, what are the features that you want to have in the new algorithm? What is it supposed to do and how will it differ from the existing?

I infer from the earlier answer that you are working on a scheduling algorithm for the kernel----correct?


Hi pixellany,
I want to implelement algorithm like wfq (weighted fair queueing) in linux kernel to make QoS, I know there are many algorithm in linux can do that but I want to add new algorithm (wfq)to linux kernel.

regards

pixellany 03-15-2010 09:27 AM

So your question is how to put your custom code into the kernel?

Short answer:
Install the compiler suite (GCC)
Install the kernel source code (available from your distro maintainer or here: http://kernel.org/ )
Find the section of the code that performs the task of interest
Modify the code (or substitute your own)
Compile and install the kernel.

I've you have never compilied a Linux kernel, learn to do that first.

reta 03-16-2010 11:04 AM

Quote:

Originally Posted by pixellany (Post 3898998)
So your question is how to put your custom code into the kernel?

Short answer:
Install the compiler suite (GCC)
Install the kernel source code (available from your distro maintainer or here: http://kernel.org/ )
Find the section of the code that performs the task of interest
Modify the code (or substitute your own)
Compile and install the kernel.

I've you have never compilied a Linux kernel, learn to do that first.

Thanks pixellany for your answer
I'm newbie in programming linux kernel, please send me the previous steps in detail, this is part of my diploma and the remaining time is very short, please help me.

you can send the details here or to my email

reta.sg238@yahoo.com

Best regards

Sergei Steshenko 03-16-2010 11:09 AM

Quote:

Originally Posted by reta (Post 3900470)
Thanks pixellany for your answer
I'm newbie in programming linux kernel, please send me the previous steps in detail, this is part of my diploma and the remaining time is very short, please help me.

you can send the details here or to my email

reta.sg238@yahoo.com

Best regards

Use WEB search for, say,

Linux kernel compilation howto
.

I last compiled Linux kernal probably 10 years ago, and the written instruction were sufficient. AFAIR, there is even a GUI which helps to set kernel configuration, but you most likely won't need it.

Sergei Steshenko 03-16-2010 11:11 AM

reta, start from http://kernelnewbies.org/ .

reta 03-16-2010 11:32 AM

Quote:

Originally Posted by Sergei Steshenko (Post 3900478)
Use WEB search for, say,

Linux kernel compilation howto
.

I last compiled Linux kernal probably 10 years ago, and the written instruction were sufficient. AFAIR, there is even a GUI which helps to set kernel configuration, but you most likely won't need it.


Hi Sergei Steshenko,
did you know the steps to add new scheduling algorithm to linux,I need all the instruction to do that

I need to add the source code of the scheduling algorithm with all its header and use it by tc command.

Sergei Steshenko 03-16-2010 01:47 PM

Quote:

Originally Posted by reta (Post 3900505)
Hi Sergei Steshenko,
did you know the steps to add new scheduling algorithm to linux,I need all the instruction to do that

I need to add the source code of the scheduling algorithm with all its header and use it by tc command.

No way I am going to do your job.

reta 03-16-2010 03:21 PM

Quote:

Originally Posted by Sergei Steshenko (Post 3900690)
No way I am going to do your job.

I'm just want help, not to do my job,I'm ask if you do that before so you can help me ,I'm not want from you to search and do my job, I search about this subject for long time but not found any thing help, so I ask for help.

any way Thank you

Sergei Steshenko 03-16-2010 03:58 PM

Quote:

Originally Posted by reta (Post 3900787)
I'm just want help, not to do my job,I'm ask if you do that before so you can help me ,I'm not want from you to search and do my job, I search about this subject for long time but not found any thing help, so I ask for help.

any way Thank you

You've already got enough help from the participants, now it's your turn to start doing the real job, i.e. to start reading and trying.

For example, set yourself a goal of compiling the kernel identical to the one you have on your Linux box - it's the easiest way to compile a kernel because you just use the configuration file coming with distro as is.


All times are GMT -5. The time now is 02:34 AM.