Re: Kernel thread scheduling

2015-04-17 Thread Ruben Safir
And just for the record, I have no financial interest in Coverity or its parent company. I've been a user of their system at a couple of companies I've worked for now, but that and my usage of their free service is the only connection I have with them. Jeff Haran Jeff, FWIW, I have

RE: Kernel thread scheduling

2015-04-17 Thread Silvan Jegen
Am 2015-04-16 23:41, schrieb Jeff Haran: I often read emails on this list from people looking to help and get started in kernel development. Well, here's a good place to start. Submit patches to fix some of those Coverity identified kernel bugs. Some of them will be false positives, but some

Re: Kernel thread scheduling

2015-04-17 Thread Ruben Safir
:0596554672 (pages: 267-272). -Original Message- From: nick [mailto:xerofo...@gmail.com] Sent: Sunday, April 12, 2015 12:16 AM To: Ruben Safir; kernelnewbies@kernelnewbies.org; Mohammed Ghriga Subject: Re: Kernel thread scheduling On 2015-04-11 11:02 PM, Ruben Safir wrote

Re: Kernel thread scheduling

2015-04-17 Thread Ruben Safir
=ptbm=bksq=isbn:0596554672 (pages: 267-272). -Original Message- From: nick [mailto:xerofo...@gmail.com] Sent: Sunday, April 12, 2015 12:16 AM To: Ruben Safir; kernelnewbies@kernelnewbies.org; Mohammed Ghriga Subject: Re: Kernel thread scheduling On 2015-04-11 11:02 PM, Ruben

Re: Kernel thread scheduling

2015-04-16 Thread Ruben Safir
I'm trying to find rb_node's structure and I can't find it with ctags or in the http://lxr.linux.no website. How do you search these things out? Ruben On Thu, Apr 09, 2015 at 10:52:03PM -0400, nick wrote: On 2015-04-09 10:12 PM, Ruben Safir wrote: On 04/09/2015 10:00 PM, nick wrote:

Re: Kernel thread scheduling

2015-04-16 Thread Ricardo Ribalda Delgado
On Thu, Apr 16, 2015 at 4:56 PM, Ruben Safir ru...@mrbrklyn.com wrote: I'm trying to find rb_node's structure and I can't find it with ctags or in the http://lxr.linux.no website. How do you search these things out? When everything else fails, I use grep

Re: Kernel thread scheduling

2015-04-16 Thread Ruben Safir
On 04/16/2015 11:07 AM, Ricardo Ribalda Delgado wrote: On Thu, Apr 16, 2015 at 4:56 PM, Ruben Safir ru...@mrbrklyn.com wrote: I'm trying to find rb_node's structure and I can't find it with ctags or in the http://lxr.linux.no website. How do you search these things out? When everything

Re: Kernel thread scheduling

2015-04-16 Thread Mark P
I find that the free electrons LXR has the best search capabilities: http://lxr.free-electrons.com/source/include/linux/rbtree.h#L35 -M On Thu, Apr 16, 2015 at 10:56 AM, Ruben Safir ru...@mrbrklyn.com wrote: I'm trying to find rb_node's structure and I can't find it with ctags or in the

Re: Kernel thread scheduling

2015-04-16 Thread Ruben Safir
On 04/16/2015 11:07 AM, Ricardo Ribalda Delgado wrote: On Thu, Apr 16, 2015 at 4:56 PM, Ruben Safir ru...@mrbrklyn.com wrote: I'm trying to find rb_node's structure and I can't find it with ctags or in the http://lxr.linux.no website. How do you search these things out? When everything

Re: Kernel thread scheduling

2015-04-16 Thread Aruna Hewapathirane
I'm trying to find rb_node's structure and I can't find it with ctags or in the http://lxr.linux.no website. Please use this: Linux 2.6.11 and later http://lxr.linux.no/linux At the top right there is a text box please type what your searching for, in this rb_node. It will show you on the

Re: Kernel thread scheduling

2015-04-16 Thread Ricardo Ribalda Delgado
On Thu, Apr 16, 2015 at 5:12 PM, Ruben Safir ru...@mrbrklyn.com wrote: On 04/16/2015 11:07 AM, Ricardo Ribalda Delgado wrote: When everything else fails, I use grep ricardo@neopili:~/curro/qtec/qt5022/kernel-cesium$ git grep rb_node { include/ include/linux/rbtree.h:struct rb_node {

Re: Kernel thread scheduling

2015-04-16 Thread Ruben Safir
On 04/16/2015 11:10 AM, Aruna Hewapathirane wrote: I'm trying to find rb_node's structure and I can't find it with ctags or in the http://lxr.linux.no website. Please use this: Linux 2.6.11 and later http://lxr.linux.no/linux 91 responses is not a useful search...

Re: Kernel thread scheduling

2015-04-16 Thread Ruben Safir
On 04/16/2015 12:31 PM, Jeff Haran wrote: From: kernelnewbies-boun...@kernelnewbies.org [mailto:kernelnewbies-boun...@kernelnewbies.org] On Behalf Of Mark P Sent: Thursday, April 16, 2015 8:12 AM To: Ruben Safir Cc: nick; kernelnewbies@kernelnewbies.org Subject: Re: Kernel thread scheduling

RE: Kernel thread scheduling

2015-04-16 Thread Jeff Haran
From: kernelnewbies-boun...@kernelnewbies.org [mailto:kernelnewbies-boun...@kernelnewbies.org] On Behalf Of Mark P Sent: Thursday, April 16, 2015 8:12 AM To: Ruben Safir Cc: nick; kernelnewbies@kernelnewbies.org Subject: Re: Kernel thread scheduling I find that the free electrons LXR has

RE: Kernel thread scheduling

2015-04-16 Thread Jeff Haran
-Original Message- From: kernelnewbies-boun...@kernelnewbies.org [mailto:kernelnewbies- boun...@kernelnewbies.org] On Behalf Of Ruben Safir Sent: Thursday, April 16, 2015 10:09 AM To: kernelnewbies@kernelnewbies.org Subject: Re: Kernel thread scheduling On 04/16/2015 12:31 PM

Re: Kernel thread scheduling

2015-04-16 Thread Silvan Jegen
On Thu, Apr 16, 2015 at 02:42:07PM -0400, Ruben Safir wrote: On 04/16/2015 02:32 PM, John de la Garza wrote: On Thu, Apr 16, 2015 at 10:56:46AM -0400, Ruben Safir wrote: I'm trying to find rb_node's structure and I can't find it with ctags or in the http://lxr.linux.no website. How do

RE: Kernel thread scheduling

2015-04-16 Thread Jeff Haran
-Original Message- From: valdis.kletni...@vt.edu [mailto:valdis.kletni...@vt.edu] Sent: Thursday, April 16, 2015 11:48 AM To: Ruben Safir Cc: Jeff Haran; kernelnewbies@kernelnewbies.org Subject: Re: Kernel thread scheduling On Thu, 16 Apr 2015 14:28:59 -0400, Ruben Safir said

Re: Kernel thread scheduling

2015-04-16 Thread Ruben Safir
On 04/16/2015 02:47 PM, valdis.kletni...@vt.edu wrote: We're comparing closed Coverty-as-a-service with closed Google-as-a-service. Seems like a good analogy to me. well it isn't. It is not demonizing them to state the facts. First of all, search engines do something you can't do with

Re: Kernel thread scheduling

2015-04-16 Thread Ruben Safir
First off, if it is not available as free Software, then I won't use it. That is of course your choice to make. And it is the correct decision to make. People who make another decision would not care about the damage they do to themselves and others by promoting the use of a

Re: Kernel thread scheduling

2015-04-16 Thread John de la Garza
On Thu, Apr 16, 2015 at 10:56:46AM -0400, Ruben Safir wrote: I'm trying to find rb_node's structure and I can't find it with ctags or in the http://lxr.linux.no website. How do you search these things out? I run: make ctags run vim type: :ts rb_node then I scanned the

Re: Kernel thread scheduling

2015-04-16 Thread Ruben Safir
On 04/16/2015 02:32 PM, John de la Garza wrote: On Thu, Apr 16, 2015 at 10:56:46AM -0400, Ruben Safir wrote: I'm trying to find rb_node's structure and I can't find it with ctags or in the http://lxr.linux.no website. THANK YOU - This is for my archive of useful Linux Hints!! How do you

Re: Kernel thread scheduling

2015-04-16 Thread Ruben Safir
On 04/16/2015 02:32 PM, John de la Garza wrote: On Thu, Apr 16, 2015 at 10:56:46AM -0400, Ruben Safir wrote: I'm trying to find rb_node's structure and I can't find it with ctags or in the http://lxr.linux.no website. How do you search these things out? That is truly beautiful. Is that

Re: Kernel thread scheduling

2015-04-16 Thread Valdis . Kletnieks
On Thu, 16 Apr 2015 14:28:59 -0400, Ruben Safir said: Others may come to different conclusions. I use www.google.com on a regular basis even though I can't download it. That is not even a good analogy. We're comparing closed Coverty-as-a-service with closed Google-as-a-service. Seems like

Re: Kernel thread scheduling

2015-04-12 Thread nick
On April 12, 2015 1:06:57 AM EDT, Ruben Safir ru...@mrbrklyn.com wrote: On 04/12/2015 12:36 AM, Mohammed Ghriga wrote: In addition to the suggestions that were offered, I recommend you try reading Chapter 16: https://www.google.com/search?tbo=ptbm=bksq=isbn:0596554672 (pages: 267-272).

Re: Kernel thread scheduling

2015-04-11 Thread Ruben Safir
On 04/12/2015 12:16 AM, nick wrote: This finds the next node in the red black tree for sched_enities. Basically rb_next finds the next node in the tree. The argument is the rb_node structure embedded in the structure using a red black tree. The problem is this struct mystruc {

Re: Kernel thread scheduling

2015-04-11 Thread Ruben Safir
On 04/11/2015 10:21 PM, Ruben Safir wrote: On 04/10/2015 09:09 AM, nick wrote: On 2015-04-09 11:37 PM, Ruben Safir wrote: On 04/09/2015 10:52 PM, nick wrote: Before asking questions again like this please look into either using lxr or ctags to navigate the kernel tree for answers as can

Re: Kernel thread scheduling

2015-04-11 Thread Ruben Safir
On 04/12/2015 12:36 AM, Mohammed Ghriga wrote: In addition to the suggestions that were offered, I recommend you try reading Chapter 16: https://www.google.com/search?tbo=ptbm=bksq=isbn:0596554672 (pages: 267-272). http://it-ebooks.info/book/481/ FWIW I found this lovely wait example in

Re: Kernel thread scheduling

2015-04-11 Thread nick
On 2015-04-11 11:02 PM, Ruben Safir wrote: On 04/11/2015 10:21 PM, Ruben Safir wrote: On 04/10/2015 09:09 AM, nick wrote: On 2015-04-09 11:37 PM, Ruben Safir wrote: On 04/09/2015 10:52 PM, nick wrote: Before asking questions again like this please look into either using lxr or ctags to

Re: Kernel thread scheduling

2015-04-11 Thread Ruben Safir
On 04/10/2015 09:09 AM, nick wrote: On 2015-04-09 11:37 PM, Ruben Safir wrote: On 04/09/2015 10:52 PM, nick wrote: Before asking questions again like this please look into either using lxr or ctags to navigate the kernel tree for answers as can be faster then waiting for me or

Re: Kernel thread scheduling

2015-03-22 Thread Ruben Safir
On 03/22/2015 07:30 PM, nick wrote: I would recommend reading Chapters 3 and 4 of Linux Kernel Development by Robert Love as when I was learning the scheduler and process management how much has the scheduler changed since then. It was completely overhauled when the CFS was created

Re: Kernel thread scheduling

2015-03-22 Thread nick
On 2015-03-22 08:05 PM, Ruben Safir wrote: On 03/22/2015 07:30 PM, nick wrote: I would recommend reading Chapters 3 and 4 of Linux Kernel Development by Robert Love as when I was learning the scheduler and process management how much has the scheduler changed since then. It was

Re: Kernel thread scheduling

2015-03-22 Thread Vincenzo Scotti
Thank you for the example. I understand what are the scheduling mechanics depending on task-state. But suppose another situation. Let's say I change current state to TASK_INTERRUPTIBLE. If I start now some long operation, then shouldn't the scheduler kick in as soon as he can and put my thread

Re: Kernel thread scheduling

2015-03-22 Thread nick
On 2015-03-22 07:14 PM, Vincenzo Scotti wrote: Thank you for the example. I understand what are the scheduling mechanics depending on task-state. But suppose another situation. Let's say I change current state to TASK_INTERRUPTIBLE. If I start now some long operation, then shouldn't

Re: Kernel thread scheduling

2015-03-21 Thread Anand Moon
...@kernelnewbies.org [mailto:kernelnewbies-boun...@kernelnewbies.org] On Behalf Of Vincenzo Scotti Sent: Friday, March 20, 2015 4:20 PM To: kernelnewbies@kernelnewbies.org Subject: Kernel thread scheduling Hello, I am actually studying kernel threads, and I have some doubts about them. Let's take

RE: Kernel thread scheduling

2015-03-20 Thread Jeff Haran
-Original Message- From: kernelnewbies-boun...@kernelnewbies.org [mailto:kernelnewbies-boun...@kernelnewbies.org] On Behalf Of Vincenzo Scotti Sent: Friday, March 20, 2015 4:20 PM To: kernelnewbies@kernelnewbies.org Subject: Kernel thread scheduling Hello, I am actually studying kernel

Kernel thread scheduling

2015-03-20 Thread Vincenzo Scotti
Hello, I am actually studying kernel threads, and I have some doubts about them. Let's take for example this snippet of code static int thread_function(void *data) { while (!kthread_should_stop()) { schedule(); } pr_err(Stopped); return 0; } This