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)
Mar 7 2024, 8:43 PM
Unknown Object (File)
Dec 23 2023, 12:41 AM
Unknown Object (File)
Dec 20 2023, 11:03 AM
Unknown Object (File)
Dec 14 2023, 10:28 PM
Unknown Object (File)
Aug 16 2023, 9:49 AM
Unknown Object (File)
Jun 16 2023, 3:39 AM
Unknown Object (File)
Jun 3 2023, 8:26 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
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.