<div dir="ltr"><div>I find that the free electrons LXR has the best search capabilities:<br><br><a href="http://lxr.free-electrons.com/source/include/linux/rbtree.h#L35">http://lxr.free-electrons.com/source/include/linux/rbtree.h#L35</a><br><br></div>-M<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Apr 16, 2015 at 10:56 AM, Ruben Safir <span dir="ltr"><<a href="mailto:ruben@mrbrklyn.com" target="_blank">ruben@mrbrklyn.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">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>
<br>
How do you search these things out?<br>
<br>
<br>
Ruben<br>
<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>
--<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>
<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>
</blockquote></div><br></div>