kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: cvs268@gmail.com (Chinmay V S)
To: kernelnewbies@lists.kernelnewbies.org
Subject: Queries on bottom halves
Date: Tue, 28 Aug 2018 00:01:29 +0530	[thread overview]
Message-ID: <CAK-9PRCNQ30p7h0ayy+Zto=FfwPEGiZ_M40xMUEoWM+xRoB9Cg@mail.gmail.com> (raw)
In-Reply-To: <CAHJZ6qEsmN+imts=8mf=17DtR+T9gpQAiBLm6uofzNNdbrhhVA@mail.gmail.com>

> 1. Which stack does the bottom halves use for their execution ?
Modern "bottom-half" implementations built on top of kernel threads
use the stack of the underlying thread.
(just like how any thread on the system does)

> 2. Why can't we sleep in bottom halves ?
We can!
Modern bottom half implementations can sleep i.e. relinquish CPU to
other threads.


Q. What are Bottom Halves?

Ans. A piece of code that is...

a. scheduled/executed asynchronously from the triggering event (interrupt).
(compared to the "top-half" i.e. the ISR that is executed synchronously)

b. and usually can take significant amount of time.
(compared to the time taken by the "top-half" i.e. ISR)

Over the years, several implementations of the "Bottom Halves" concept
have been developed on the Linux kernel. Co-incidentally, one of the
oldest (now deprecated) implementation was itself called Bottom-Halves.

There are several modern implementations of bottom-halves :
Soft-IRQs, Tasklets, and Workqueues. The latter/recent approaches to
implementing bottom-halves are wrappers around Linux kernel threads.

I have tried to summarize these various "Bottom Half" implementations
within the Linux kernel and provide some commentary of their
development over the years in the following slide deck:
https://thecodeartist.blogspot.com/2018/06/bottom-halves-on-linux.html

For more details,
checkout the various links to wikis and articles in
the last slide "References / Recommended Reading" in the above slide-deck.

regards
CVS

  reply	other threads:[~2018-08-27 18:31 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-27 17:14 Queries on bottom halves Abhinav Misra
2018-08-27 18:31 ` Chinmay V S [this message]
2018-09-01  8:05   ` Abhinav Misra
2018-09-02 10:54     ` Larry Chen
2018-09-02 15:28       ` Abhinav Misra
2018-09-02 17:39         ` valdis.kletnieks at vt.edu
2018-09-02 17:44           ` Greg KH
2018-09-03  4:23         ` Larry Chen

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='CAK-9PRCNQ30p7h0ayy+Zto=FfwPEGiZ_M40xMUEoWM+xRoB9Cg@mail.gmail.com' \
    --to=cvs268@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).