Page MenuHomeFreeBSD

LinuxKPI: Add compiler barriers to list_for_each_entry_lockless macro
ClosedPublic

Authored by wulf on Jun 16 2021, 11:55 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Nov 26, 9:07 PM
Unknown Object (File)
Wed, Nov 26, 3:30 PM
Unknown Object (File)
Sun, Nov 16, 10:50 PM
Unknown Object (File)
Sun, Nov 16, 6:53 PM
Unknown Object (File)
Nov 4 2025, 3:03 AM
Unknown Object (File)
Oct 28 2025, 6:54 AM
Unknown Object (File)
Oct 28 2025, 6:28 AM
Unknown Object (File)
Oct 28 2025, 6:28 AM

Details

Summary

so this list-traversal primitive may safely run concurrently with
the _rcu list-mutation primitives such as list_add_rcu()
as long as the traversal is guarded by rcu_read_lock().

Do it with reusing of list_for_each_entry_rcu macro which
does the same. On Linux it implements some additional
lockdep stuff which we skip.

Also move the macro to linux/rculist.h where it resides on Linux.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 39941
Build 36830: arc lint + arc unit

Event Timeline

wulf requested review of this revision.Jun 16 2021, 11:55 PM

The commit message has some spelling errors - can you fix?

wulf retitled this revision from LinuxKPI: Use list_for_each_entry_rcu macro as a base to to LinuxKPI: Add compiler barriers to list_for_each_entry_lockless macro.Jun 17 2021, 11:41 AM
wulf edited the summary of this revision. (Show Details)

The commit message has some spelling errors - can you fix?

Did it with copy-paste from Linux header

Spelling:

Do it with reusing of list_for_each_entry_rcu macro which
does the same. On Linux it implements some additional
lockdep stuff which we skip.

Corrected:

Do it by reusing the "list_for_each_entry_rcu" macro which
does the same. On Linux it implements some additional
lockdep stuff which we skip.

This revision is now accepted and ready to land.Jun 17 2021, 1:14 PM

Thank you! I replaced my spelling with yours in my local git repo.