Skip to content

Conversation

eleanorLYJ
Copy link
Contributor

There are two commits:

  1. Remove unused DECLARE_TASKLET_OLD macro (no longer needed after switching to workqueues).
  2. Update description to mention workqueues instead of tasklets.

Keep the code and docs consistent, avoiding confusion.

Comment on lines +1988 to +2111
A common way to avoid blocking the interrupt for a significant duration
is to defer the time-consuming part to a workqueue.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Improve the writing for rationale.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you suggesting that the rationale behind the change needs more explanation, or
Is the issue with the tone and professionalism of the writing itself?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you suggesting that the rationale behind the change needs more explanation?

I meant that you can consolidate BH descriptions, such as the removal of tasklet.

Copy link
Contributor

@visitorckw visitorckw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

lkmpg.tex Outdated
such as memory management issues and unpredictable latencies.
Instead, they recommend more robust mechanisms like workqueues or softirqs.
To address tasklet shortcomings, Linux contributors introduced the BH workqueue,
activated with the WQ_BH flag. This workqueue retains critical features,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add \cpp to WQ_BH.
Split the sentence starting with "This workqueue" into a newline.

lkmpg.tex Outdated
Instead, they recommend more robust mechanisms like workqueues or softirqs.
To address tasklet shortcomings, Linux contributors introduced the BH workqueue,
activated with the WQ_BH flag. This workqueue retains critical features,
such as execution in atomic (softirq) context on the same CPU and the inability to sleep.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Add \textbf{softirq} for consistency

Commit 3682d9e ("Move bottom-half to workqueue for safe sleep")
migrated the example code away from tasklets to workqueues.

However, the compatibility macro DECLARE_TASKLET_OLD was left behind
even though tasklets are no longer used. Remove the unused macro for
consistency and clarity.
Since commit 3682d9e ("Move bottom-half to workqueue for safe sleep")
switched the implementation to workqueues, update the description
accordingly to avoid confusion and reflect the modern approach to
bottom-half handling.

Explain the issues with tasklets and introduce the BH workqueue as the
new, reliable alternative.
Copy link
Collaborator

@EricccTaiwan EricccTaiwan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@jserv jserv merged commit 6e66ca7 into sysprog21:master Sep 4, 2025
1 check passed
@jserv
Copy link
Contributor

jserv commented Sep 4, 2025

Thank @eleanorLYJ for contributing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants