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
F102721466: D30795.id.diff
Sat, Nov 16, 8:38 AM
Unknown Object (File)
Sat, Nov 16, 12:43 AM
Unknown Object (File)
Sep 27 2024, 4:46 PM
Unknown Object (File)
Sep 27 2024, 7:51 AM
Unknown Object (File)
Sep 6 2024, 3:47 AM
Unknown Object (File)
Aug 31 2024, 5:24 AM
Unknown Object (File)
Aug 27 2024, 5:53 AM
Unknown Object (File)
Aug 17 2024, 4:14 PM

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
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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.