<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">>> I'm trying to find rb_node's structure and I can't find it with ctags or<br>>> in the <a href="http://lxr.linux.no" target="_blank">http://lxr.linux.no</a> website.<br><br>Please use this: <a href="http://lxr.linux.no/linux">Linux 2.6.11 and later</a>
        <br><br></div><div class="gmail_quote">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 right the search results.<br><br><span class="">The Structure is defined here:</span>
<span class="">
<a href="http://lxr.linux.no/linux+*/include/linux/rbtree.h#L35">
include/linux/rbtree.h, line 35 </a><span class=""></span></span><br><br></div><div class="gmail_quote">and here it is in case you have difficulties:<br></div><div class="gmail_quote"><pre class="" id="ed/60/502394d00e86bac20d83ce8afc6e953be0e7_3/0">struct <a href="http://lxr.linux.no/linux+*/+code=rb_node" class="">rb_node</a> {
<a href="http://lxr.linux.no/linux+*/include/linux/rbtree.h#L36" id="L36" class="" name="L36"> 36</a> unsigned long <a href="http://lxr.linux.no/linux+*/+code=__rb_parent_color" class="">__rb_parent_color</a>;
<a href="http://lxr.linux.no/linux+*/include/linux/rbtree.h#L37" id="L37" class="" name="L37"> 37</a> struct <a href="http://lxr.linux.no/linux+*/+code=rb_node" class="">rb_node</a> *<a href="http://lxr.linux.no/linux+*/+code=rb_right" class="">rb_right</a>;
<a href="http://lxr.linux.no/linux+*/include/linux/rbtree.h#L38" id="L38" class="" name="L38"> 38</a> struct <a href="http://lxr.linux.no/linux+*/+code=rb_node" class="">rb_node</a> *<a href="http://lxr.linux.no/linux+*/+code=rb_left" class="">rb_left</a>;
<a href="http://lxr.linux.no/linux+*/include/linux/rbtree.h#L39" id="L39" class="" name="L39"> 39</a>} <a href="http://lxr.linux.no/linux+*/+code=__attribute__" class="">__attribute__</a>((<a href="http://lxr.linux.no/linux+*/+code=aligned" class="">aligned</a>(sizeof(long))));
<a href="http://lxr.linux.no/linux+*/include/linux/rbtree.h#L40" id="L40" class="" name="L40"> 40</a> <span class="">/* The alignment might seem pointless, but allegedly CRIS needs it */</span></pre><br></div><div class="gmail_quote">Thank's - Aruna<br></div><div class="gmail_quote"><br><br><br><br><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
<br>
Ruben<br>
<div><div class="h5"><br>
On Thu, Apr 09, 2015 at 10:52:03PM -0400, nick wrote:<br>
><br>
><br>
> On 2015-04-09 10:12 PM, Ruben Safir wrote:<br>
> > On 04/09/2015 10:00 PM, nick wrote:<br>
> >><br>
> >><br>
> >> On 2015-04-09 09:51 PM, Ruben Safir wrote:<br>
> >>><br>
> >>> It is passover so I've read over much of this text, but I have to say<br>
> >>> that in general, I'm way ahead of this book. Although I have limited<br>
> >>> knowledge of Kernel technology in the specific, the C code, data<br>
> >>> structs, and programming concepts are spoon feed in this text and its<br>
> >>> wasting too much time with words that are more easily explained with<br>
> >>> coding examples and UML charts. I don't need a chapter explaining how<br>
> >>> to use ps and the basis of Unix architecture. This text is targeted to<br>
> >>> a different audience, and FWIW, I'm not certain it does a good job of<br>
> >>> that either. The guys who write these texts fall in love with their own<br>
> >>> voices. I know, I've suffered this disease myself when I've written<br>
> >>> tech articles and books.<br>
> >>><br>
> >>> I can''t recommend this book to anyone. Anyone who doesn't understand<br>
> >>> the basics of I/O processer blocks is not going to understand<br>
> >>><br>
> >>> static void update_curr(struct cfs_rq *cfs_rq)<br>
> >>><br>
> >>><br>
> >>> and OTOH void update_curr(struct cfs_rq *cfs_rq) is not explained well<br>
> >>> enough for coders unfamiliar with the kernel data structs of which BTW<br>
> >>> struct cfs_rq is not one defined in the text.<br>
> >>><br>
> >>> :(<br>
> >>><br>
> >>> I'm looking for something more like this, but flushed out more as a textbook<br>
> >>><br>
> >>> <a href="http://www.ibm.com/developerworks/library/l-completely-fair-scheduler/index.html" target="_blank">http://www.ibm.com/developerworks/library/l-completely-fair-scheduler/index.html</a>,<br>
> >>> and some mentoring, I hope.<br>
> >>><br>
> >>><br>
> >>> Ruben<br>
> >>><br>
><br>
> >> Ruben,<br>
> >> The book is for an intro to the kernel not a complete walk through of each subsystem.<br>
> >> If that is the case,why not read the subsystem code and docs in the kernel. I am a<br>
> >> novice myself in terms of patch and coding experience but will be glad to explain the<br>
> >> code as I have read lots of it.<br>
> ><br>
> ><br>
> > Thank you nick. Yes, I downloaded the entire source from Kernel.org and<br>
> > it is sitting on both my laptop and in virtual machines where I have<br>
> > already compiled some stuff and not broken my VMs yets :)<br>
> ><br>
> > I'm looking over /home/ruben/linux-3.19.3/Documentation/scheduler<br>
> > [ruben@stat13 scheduler]$ ls<br>
> ><br>
> > 00-INDEX sched-deadline.txt sched-rt-group.txt<br>
> > media=legal -o sides=two-sided-long-edg sched-design-CFS.txt<br>
> > sched-stats.txt sched-arch.txt sched-domains.txt<br>
> > sched-bwc.txt sched-nice-design.txt<br>
> ><br>
> ><br>
> > I also see in the code there is significant documentation.<br>
> ><br>
> > Right now I am trying to figure out what is the relationship between<br>
> > struct sched_entity and<br>
> > struct cfs_rq and<br>
> > struct rq_of<br>
> ><br>
> > why do we have both??<br>
> ><br>
> The way that these structures are related is sched_enity is the entity for the task's scheduling<br>
> information or the task_struct of the a excuting process to be exact. Furthermore cfs_rq is the<br>
> runquenue on which the task is running or selected to run on by schedule,the main scheduling function<br>
> of the kernel. Finally here is the function definition for rq_of to answer your question,<br>
> static inline struct rq *rq_of(struct cfs_rq *cfs_rq)<br>
> {<br>
> return cfs_rq->rq;<br>
> }<br>
> Before asking questions again like this please look into either using lxr or ctags<br>
> to navigate the kernel tree for answers as can be faster then waiting for me or<br>
> someone else to respond.<br>
> Thanks,<br>
> Nick<br>
> > there is a cast in update_curr<br>
> > u64 now = rq_of(cfs_rq)->clock;<br>
> ><br>
> > or is rq_of a function that returns a pointer is a struct that I missed?<br>
> ><br>
> ><br>
> ><br>
> ><br>
> ><br>
> >> Nick<br>
> >>> On 03/22/2015 08:35 PM, nick wrote:<br>
> >>>><br>
> >>>><br>
> >>>> On 2015-03-22 08:05 PM, Ruben Safir wrote:<br>
> >>>>> On 03/22/2015 07:30 PM, nick wrote:<br>
> >>>>>> I would recommend reading Chapters 3 and 4 of Linux Kernel Development by Robert Love<br>
> >>>>>> as when I was learning the scheduler and process management<br>
> >>>>><br>
> >>>>><br>
> >>>>> how much has the scheduler changed since then. It was completely<br>
> >>>>> overhauled when the CFS was created<br>
> >>>>><br>
> >>>>><br>
> >>>>><br>
> >>>> The 3rd edition of this book was written after CFS was in the kernel so the chapters<br>
> >>>> are pretty up to date.<br>
> >>>> Nick<br>
> >>>>> _______________________________________________<br>
> >>>>> Kernelnewbies mailing list<br>
> >>>>> <a href="mailto:Kernelnewbies@kernelnewbies.org">Kernelnewbies@kernelnewbies.org</a><br>
> >>>>> <a href="http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies" target="_blank">http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a><br>
> >>>>><br>
> >>>><br>
> >>>> _______________________________________________<br>
> >>>> Kernelnewbies mailing list<br>
> >>>> <a href="mailto:Kernelnewbies@kernelnewbies.org">Kernelnewbies@kernelnewbies.org</a><br>
> >>>> <a href="http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies" target="_blank">http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a><br>
> >>>><br>
> >>>> .<br>
> >>>><br>
> >>><br>
> >>><br>
> >>> _______________________________________________<br>
> >>> Kernelnewbies mailing list<br>
> >>> <a href="mailto:Kernelnewbies@kernelnewbies.org">Kernelnewbies@kernelnewbies.org</a><br>
> >>> <a href="http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies" target="_blank">http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a><br>
> >>><br>
> >><br>
> >><br>
> ><br>
><br>
> _______________________________________________<br>
> Kernelnewbies mailing list<br>
> <a href="mailto:Kernelnewbies@kernelnewbies.org">Kernelnewbies@kernelnewbies.org</a><br>
> <a href="http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies" target="_blank">http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a><br>
<br>
</div></div>--<br>
So many immigrant groups have swept through our town<br>
that Brooklyn, like Atlantis, reaches mythological<br>
proportions in the mind of the world - RI Safir 1998<br>
<a href="http://www.mrbrklyn.com" target="_blank">http://www.mrbrklyn.com</a><br>
<br>
DRM is THEFT - We are the STAKEHOLDERS - RI Safir 2002<br>
<a href="http://www.nylxs.com" target="_blank">http://www.nylxs.com</a> - Leadership Development in Free Software<br>
<a href="http://www2.mrbrklyn.com/resources" target="_blank">http://www2.mrbrklyn.com/resources</a> - Unpublished Archive<br>
<a href="http://www.coinhangout.com" target="_blank">http://www.coinhangout.com</a> - coins!<br>
<a href="http://www.brooklyn-living.com" target="_blank">http://www.brooklyn-living.com</a><br>
<br>
Being so tracked is for FARM ANIMALS and and extermination camps,<br>
but incompatible with living as a free human being. -RI Safir 2013<br>
<div class=""><div class="h5"><br>
<br>
_______________________________________________<br>
Kernelnewbies mailing list<br>
<a href="mailto:Kernelnewbies@kernelnewbies.org">Kernelnewbies@kernelnewbies.org</a><br>
<a href="http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies" target="_blank">http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a><br>
</div></div></blockquote></div><br></div></div>