Page MenuHomeFreeBSD

linuxkpi: Add tag support to radix tree
Needs ReviewPublic

Authored by dumbbell on Sun, Jan 4, 10:32 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Jan 12, 11:33 PM
Unknown Object (File)
Sun, Jan 11, 6:00 PM
Unknown Object (File)
Fri, Jan 9, 2:06 AM
Unknown Object (File)
Thu, Jan 8, 9:38 PM
Unknown Object (File)
Thu, Jan 8, 4:21 AM
Unknown Object (File)
Thu, Jan 8, 3:10 AM
Unknown Object (File)
Mon, Jan 5, 5:54 AM
Unknown Object (File)
Mon, Jan 5, 2:34 AM

Details

Reviewers
christos
Group Reviewers
linuxkpi
Summary

The tag is used to perform lookup in a different way.

New functions were introduced:

  • to set, check and clear a tag
  • to walk through a radix tree based on a given tag

Furthermore, the radix_tree_delete() function was modified to clear tags on deletion.

The amdgpu DRM driver started to use this in Linux 6.10.

While here, the radix_tree_gang_lookup() function was added because it is very close to radix_tree_gang_lookup_tag(), but it is not used by the DRM drivers as of this commit.

This is part of the update of DRM drivers to Linux 6.10.

Sponsored by: The FreeBSD Foundation

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

I'll likely not be able to review this before next week; I hope someone else will pick it up so v6.10 can go in.

sys/compat/linuxkpi/common/include/linux/radix-tree.h
103

This changes the KPI but I cannot easily find a consumer outside sys/compat/linuxkpi so it's likely fine. Despite its name it is likely not a public KPI function anyway.

christos added inline comments.
sys/compat/linuxkpi/common/src/linux_radix.c
178

In Linux code I see this block here:

		if (radix_tree_is_internal_node(results[ret])) {
			slot = radix_tree_iter_retry(&iter);
			continue;
		}

We don't need it?

204

Ditto.