Page MenuHomeFreeBSD

linuxkpi: Add `shrinker_alloc()` and `shrinker_free()`
ClosedPublic

Authored by dumbbell on Jan 31 2025, 2:14 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Oct 12, 6:17 PM
Unknown Object (File)
Wed, Oct 8, 8:50 PM
Unknown Object (File)
Wed, Oct 1, 3:08 AM
Unknown Object (File)
Fri, Sep 26, 11:00 AM
Unknown Object (File)
Thu, Sep 25, 7:58 AM
Unknown Object (File)
Wed, Sep 24, 11:44 AM
Unknown Object (File)
Wed, Sep 24, 3:53 AM
Unknown Object (File)
Sun, Sep 21, 1:32 AM
Subscribers

Details

Summary

Why

They are used by the DRM drivers in Linux 6.7.

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

Sponsored by: The FreeBSD Foundation

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Add diff context. No other changes.

bz added a subscriber: bz.

Seems fine to me for as much as I can say. Beware that it breaks KBI if struct shrinker is embedded into drivers.

sys/compat/linuxkpi/common/include/linux/shrinker.h
57

I thin in general we do not put the space between * and function name.

65

Has VA_OPT moved from C++ to C standard as well? I cannot find any prior use in sys/ but contrib/llvm seems to know about it. Hopefully gcc as well.

This revision is now accepted and ready to land.Feb 8 2025, 8:49 PM

@bz: Is there something I should do to document the breakage?

@bz: Is there something I should do to document the breakage?

At least drm-kmod 6.1-lts struct i915_gem_mm seems to embed struct shrinker. So moving fields will need this recompiled most likely (ttm pool most likely too, though there you could get away with adding the flags field to the end of the structure). I suppose at least bump __FreeBSD_version and document it docs. Not sure how drm-kmod ports are handled in these cases if they need to be recompiled.

Are you planning to MFC this?