From: pratyushpatel.1995@gmail.com (Pratyush Patel)
To: kernelnewbies@lists.kernelnewbies.org
Subject: hrtimer_clock_base and hrtimer_cpu_base
Date: Tue, 22 Mar 2016 13:08:21 +0530 [thread overview]
Message-ID: <CAAnMKKYsazrASEDFST++X4Q-qfT1H3uoAhpt8V2b9chr9uzTiA@mail.gmail.com> (raw)
Hello,
I am unable to understand what exactly "clock_base" and "cpu_base", or
simply "base" means (I am seeking an intuitive idea).
I understand that hrtimer subsystem stores its timers in a red-black
tree data structure, and the node for each timer can be found in
struct hrtimer. And if I understand correctly, these red-black trees
are stored per-CPU, each of which is processed differently, leading to
a "hrtimer_cpu_base"? However, as mentioned in a comment in the
hrtimer.h, the "active" attribute in "hrtimer_clock_base" stores the
root node of the red-black tree. Does this mean that each CPU has
multiple clock_bases, and hence multiple red-black trees? Also, could
someone please let me know, or perhaps point to a relevant resource,
which explains what a "timer_base" means?
Relevant files:
1) http://lxr.free-electrons.com/source/include/linux/hrtimer.h
2) http://lxr.free-electrons.com/source/kernel/time/hrtimer.c
Thank you,
Pratyush
reply other threads:[~2016-03-22 7:38 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=CAAnMKKYsazrASEDFST++X4Q-qfT1H3uoAhpt8V2b9chr9uzTiA@mail.gmail.com \
--to=pratyushpatel.1995@gmail.com \
--cc=kernelnewbies@lists.kernelnewbies.org \
/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;
as well as URLs for NNTP newsgroup(s).