|
Revision 7 as of 2026-06-15 19:59:11
Size: 18149
Comment: Fixed links and minor details
|
Revision 8 as of 2026-06-18 19:01:26
Size: 15109
Comment: merge and assign changes from the NFS module together as discussed with Agatha
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 162: | Line 162: |
| == #007: Use `clear_and_wake_up_bit()` in `nfs_clear_invalid_mapping()` == * Creation Date: 2026-06-15 * Last Update: 2026-06-15 * Assigned To: NOT ASSIGNED |
== #007: Use `clear_and_wake_up_bit()` in NFS == * Creation Date: 2026-06-15 * Last Update: 2026-06-18 * Assigned To: Arnaud Bonnet |
| Line 185: | Line 185: |
| * File(s): fs/nfs/inode.c (line 1545) === Relevant History === The new function was introduced by [[https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=8236b0ae31c83|'commit 8236b0ae31c83 ("bdi: wake up concurrent wb_shutdown() callers.")']]. <<Anchor(task_008)>> == #008: Use `clear_and_wake_up_bit()` in `pnfs_clear_first_layoutget()` == * Creation Date: 2026-06-15 * Last Update: 2026-06-15 * Assigned To: NOT ASSIGNED * Suggested-By: Agatha Isabelle Moreira * Link: https://kernelnewbies.org/Beginner%20Cleanup%20and%20Refactor%20Tasks%20by%20Agatha%20Isabelle%20Moreira#task_008 The `clear_and_wake_up_bit()` function was introduced because sometimes developers were forgetting to make a call for `wake_up_bit()` after `clear_bit_unlock()` in some contexts where the same kind of operation was done. Since the new helper completely replaces call to the sequence: {{{ clear_bit_unlock(); smp_mb__after_atomic(); wake_up_bit(); }}} it makes much more sense to use the new helper instead of calling the sequence, standardizing the code path. === Additional Details === The assignee is expected to inspect for the appropriateness of the change, if the new call really replaces appropriately the sequence, and to do proper testing it according to the [[https://docs.kernel.org/process/submitting-patches.html|kernel official documentation]]. Refer to [[https://lore.kernel.org/all/ag4PEP52c8rxrYPc@guidai/|this patch]] for an example. * File(s): fs/nfs/pnfs.c (line 2107) === Relevant History === The new function was introduced by [[https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=8236b0ae31c83|'commit 8236b0ae31c83 ("bdi: wake up concurrent wb_shutdown() callers.")']]. <<Anchor(task_009)>> == #009: Use `clear_and_wake_up_bit()` in `pnfs_clear_layoutcommitting()` == * Creation Date: 2026-06-15 * Last Update: 2026-06-15 * Assigned To: NOT ASSIGNED * Suggested-By: Agatha Isabelle Moreira * Link: https://kernelnewbies.org/Beginner%20Cleanup%20and%20Refactor%20Tasks%20by%20Agatha%20Isabelle%20Moreira#task_009 The `clear_and_wake_up_bit()` function was introduced because sometimes developers were forgetting to make a call for `wake_up_bit()` after `clear_bit_unlock()` in some contexts where the same kind of operation was done. Since the new helper completely replaces call to the sequence: {{{ clear_bit_unlock(); smp_mb__after_atomic(); wake_up_bit(); }}} it makes much more sense to use the new helper instead of calling the sequence, standardizing the code path. === Additional Details === The assignee is expected to inspect for the appropriateness of the change, if the new call really replaces appropriately the sequence, and to do proper testing it according to the [[https://docs.kernel.org/process/submitting-patches.html|kernel official documentation]]. Refer to [[https://lore.kernel.org/all/ag4PEP52c8rxrYPc@guidai/|this patch]] for an example. * File(s): fs/nfs/pnfs.c (line 3280) === Relevant History === The new function was introduced by [[https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=8236b0ae31c83|'commit 8236b0ae31c83 ("bdi: wake up concurrent wb_shutdown() callers.")']]. |
* File(s): fs/nfs/inode.c (line 1545), fs/nfs/pnfs.c (line 2107), fs/nfs/pnfs.c (line 3280) === Relevant History === The new function was introduced by [[https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=8236b0ae31c83|'commit 8236b0ae31c83 ("bdi: wake up concurrent wb_shutdown() callers.")']]. |
A simple tasklist of beginner-friendly tasks collected so far mostly by scripts to target known needed cleanups, refactors, etc.
Tasklist Maintainer
Tasklist Maintainer Information:
Maintainer: Agatha Isabelle Moreira
Email: <code AT DONT SPAM ME agatha DOT dev>
- Availability: Available for review and on-demand at the email above
Contact Channels: The email above or with the nickname agatha at irc.oftc.net
General Information
This tasklist is based on home baked scripts (see #task_source_scripts) crafted to look up for cleanup/refactoring of code known to have a better replacement.
Whoever wants to work on those tasks will have to, before submitting a patch, check if the replacement is 100% correct and carefully test the new code.
Please, before submitting any patches, read carefully the following mandatory documentation:
Please note that submitting patches inappropriately or low quality patches consume reviewer and maintainer time, so please do your best effort to make sure everything is okay.
Copy (Cc:) the tasklist maintainer when sending the patch, and also add to your commit message using the tags below according to the values specified in the task.
Suggested-By: See Per Task Link: https://kernelnewbies.org/Beginner%20Cleanup%20and%20Refactor%20Tasks%20by%20Agatha%20Isabelle%20Moreira
Getting the Task Assigned
You can get the task assigned to you by just editing the wiki here or contacting the tasklist maintainer.
Please, don't work on tasks that have been assigned to avoid having two people working on the same task.
If you cannot complete the task, remove yourself from the assigned field or reach out to the tasklist maintainer by email to release it for someone else.
Open Tasks
#001: Use `clear_and_wake_up_bit()` in `merge_shutdown()`
- Creation Date: 2026-06-15
- Last Update: 2026-06-15
- Assigned To: NOT ASSIGNED
- Suggested-By: Agatha Isabelle Moreira
The clear_and_wake_up_bit() function was introduced because sometimes developers were forgetting to make a call for wake_up_bit() after clear_bit_unlock() in some contexts where the same kind of operation was done.
Since the new helper completely replaces call to the sequence:
clear_bit_unlock();
smp_mb__after_atomic();
wake_up_bit();it makes much more sense to use the new helper instead of calling the sequence, standardizing the code path.
Additional Details
The assignee is expected to inspect for the appropriateness of the change, if the new call really replaces appropriately the sequence, and to do proper testing according to the kernel official documentation.
Refer to this patch for an example.
Files: drivers/md/dm-snap.c
Relevant History
The new function was introduced by 'commit 8236b0ae31c83 ("bdi: wake up concurrent wb_shutdown() callers.")'.
#002: use `clear_and_wake_up_bit()` in `dmz_mblock_bio_end_io()`
- Creation Date: 2026-06-15
- Last Update: 2026-06-15
- Assigned To: NOT ASSIGNED
- Suggested-By: Agatha Isabelle Moreira
The clear_and_wake_up_bit() function was introduced because sometimes developers were forgetting to make a call for wake_up_bit() after clear_bit_unlock() in some contexts where the same kind of operation was done.
Since the new helper completely replaces call to the sequence:
clear_bit_unlock();
smp_mb__after_atomic();
wake_up_bit();it makes much more sense to use the new helper instead of calling the sequence, standardizing the code path.
Additional Details
The assignee is expected to inspect for the appropriateness of the change, if the new call really replaces appropriately the sequence, and to do proper testing it according to the kernel official documentation.
Refer to this patch for an example.
- File(s): drivers/md/dm-zoned-metadata.c (line 522)
Relevant History
The new function was introduced by 'commit 8236b0ae31c83 ("bdi: wake up concurrent wb_shutdown() callers.")'.
#003: Use `clear_and_wake_up_bit()` in `dmz_unlock_zone_reclaim()`
- Creation Date: 2026-06-15
- Last Update: 2026-06-15
- Assigned To: NOT ASSIGNED
- Suggested-By: Agatha Isabelle Moreira
The clear_and_wake_up_bit() function was introduced because sometimes developers were forgetting to make a call for wake_up_bit() after clear_bit_unlock() in some contexts where the same kind of operation was done.
Since the new helper completely replaces call to the sequence:
clear_bit_unlock();
smp_mb__after_atomic();
wake_up_bit();it makes much more sense to use the new helper instead of calling the sequence, standardizing the code path.
Additional Details
The assignee is expected to inspect for the appropriateness of the change, if the new call really replaces appropriately the sequence, and to do proper testing it according to the kernel official documentation.
Refer to this patch for an example.
- File(s): drivers/md/dm-zoned-metadata.c (line 1913)
Relevant History
The new function was introduced by 'commit 8236b0ae31c83 ("bdi: wake up concurrent wb_shutdown() callers.")'.
#004: Use `clear_and_wake_up_bit()` in `dmz_reclaim_kcopy_end()`
- Creation Date: 2026-06-15
- Last Update: 2026-06-15
- Assigned To: NOT ASSIGNED
- Suggested-By: Agatha Isabelle Moreira
The clear_and_wake_up_bit() function was introduced because sometimes developers were forgetting to make a call for wake_up_bit() after clear_bit_unlock() in some contexts where the same kind of operation was done.
Since the new helper completely replaces call to the sequence:
clear_bit_unlock();
smp_mb__after_atomic();
wake_up_bit();it makes much more sense to use the new helper instead of calling the sequence, standardizing the code path.
Additional Details
The assignee is expected to inspect for the appropriateness of the change, if the new call really replaces appropriately the sequence, and to do proper testing it according to the kernel official documentation.
Refer to this patch for an example.
- File(s): drivers/md/dm-zoned-reclaim.c (line 109)
Relevant History
The new function was introduced by 'commit 8236b0ae31c83 ("bdi: wake up concurrent wb_shutdown() callers.")'.
#007: Use `clear_and_wake_up_bit()` in NFS
- Creation Date: 2026-06-15
- Last Update: 2026-06-18
- Assigned To: Arnaud Bonnet
- Suggested-By: Agatha Isabelle Moreira
The clear_and_wake_up_bit() function was introduced because sometimes developers were forgetting to make a call for wake_up_bit() after clear_bit_unlock() in some contexts where the same kind of operation was done.
Since the new helper completely replaces call to the sequence:
clear_bit_unlock();
smp_mb__after_atomic();
wake_up_bit();it makes much more sense to use the new helper instead of calling the sequence, standardizing the code path.
Additional Details
The assignee is expected to inspect for the appropriateness of the change, if the new call really replaces appropriately the sequence, and to do proper testing it according to the kernel official documentation.
Refer to this patch for an example.
- File(s): fs/nfs/inode.c (line 1545), fs/nfs/pnfs.c (line 2107), fs/nfs/pnfs.c (line 3280)
Relevant History
The new function was introduced by 'commit 8236b0ae31c83 ("bdi: wake up concurrent wb_shutdown() callers.")'.
#010: Use `clear_and_wake_up_bit()` in `cifs_revalidate_mapping()`
- Creation Date: 2026-06-15
- Last Update: 2026-06-15
- Assigned To: NOT ASSIGNED
- Suggested-By: Agatha Isabelle Moreira
The clear_and_wake_up_bit() function was introduced because sometimes developers were forgetting to make a call for wake_up_bit() after clear_bit_unlock() in some contexts where the same kind of operation was done.
Since the new helper completely replaces call to the sequence:
clear_bit_unlock();
smp_mb__after_atomic();
wake_up_bit();it makes much more sense to use the new helper instead of calling the sequence, standardizing the code path.
Additional Details
The assignee is expected to inspect for the appropriateness of the change, if the new call really replaces appropriately the sequence, and to do proper testing it according to the kernel official documentation.
Refer to this patch for an example.
- File(s): fs/smb/client/inode.c (line 2787)
Relevant History
The new function was introduced by 'commit 8236b0ae31c83 ("bdi: wake up concurrent wb_shutdown() callers.")'.
Closed Tasks
#005: Use `clear_and_wake_up_bit()` in `unlock_buffer()`
- Creation Date: 2026-05-20
- Last Update: 2026-06-01
- Status: CLOSED
- Assigned To: Agatha Isabelle Moreira
- Suggested-By: shuo chen
Link: https://lore.kernel.org/kernelnewbies/agzoqV835-co4kAN@guidai/T/#t
The clear_and_wake_up_bit() function was introduced because sometimes developers were forgetting to make a call for wake_up_bit() after clear_bit_unlock() in some contexts where the same kind of operation was done.
Since the new helper completely replaces call to the sequence:
clear_bit_unlock();
smp_mb__after_atomic();
wake_up_bit();it makes much more sense to use the new helper instead of calling the sequence, standardizing the code path.
Additional Details
The assignee is expected to inspect for the appropriateness of the change, if the new call really replaces appropriately the sequence, and to do proper testing it according to the kernel official documentation.
Refer to this patch for an example.
- File(s): fs/buffer.c (line 77)
Relevant History
The new function was introduced by 'commit 8236b0ae31c83 ("bdi: wake up concurrent wb_shutdown() callers.")'.
Resolution
Patch merged: https://lore.kernel.org/all/ag4SD-mkmn5IbuN7@guidai/
#006: Use `clear_and_wake_up_bit()` in `journal_end_buffer_io_sync()`
- Creation Date: 2026-06-15
- Last Update: 2026-06-15 (Closed)
- Assigned To: Agatha Isabelle Moreira
The clear_and_wake_up_bit() function was introduced because sometimes developers were forgetting to make a call for wake_up_bit() after clear_bit_unlock() in some contexts where the same kind of operation was done.
Since the new helper completely replaces call to the sequence:
clear_bit_unlock();
smp_mb__after_atomic();
wake_up_bit();it makes much more sense to use the new helper instead of calling the sequence, standardizing the code path.
Additional Details
The assignee is expected to inspect for the appropriateness of the change, if the new call really replaces appropriately the sequence, and to do proper testing it according to the kernel official documentation.
Refer to this patch for an example.
- File(s): fs/jbd2/commit.c (line 42)
Relevant History
The new function was introduced by 'commit 8236b0ae31c83 ("bdi: wake up concurrent wb_shutdown() callers.")'.
Resolution
Patch merged: https://lore.kernel.org/all/ag4SrrOl7R2DcLLi@guidai/
Task Sourcing Scripts
The following scripts were used to bring up those tasks.
`clear_bit_unlock()`
To detect instances where clear_bit_unlock(), smp_mb__after_atomic() and wake_up_bit() sequences needs to be replaced by clear_and_wake_up_bit(), the following shell command was crafted and applied to the kernel tree:
$ global -rl clear_bit_unlock | xargs awk '
/clear_bit_unlock\s*\(/ { file=FILENAME; line=FNR; lock=$0; getline; mid=$0; getline; wake=$0;
if (mid ~ /smp_mb__after_atomic\s*\(\s*\)/ && wake ~ /wake_up_bit\s*\(/)
print file ":" line ": " lock "\n" file ":" (line+1) ": " mid "\n" file ":" (line+2) ": " wake "\n"
}
'