openzfs / zfs

OpenZFS on Linux and FreeBSD
https://openzfs.github.io/openzfs-docs
Other
10.63k stars 1.75k forks source link

`shrinker` replacements for 6.7+ #15582

Open RaitoBezarius opened 11 months ago

RaitoBezarius commented 11 months ago

Describe the feature would like to see added to OpenZFS

In Linux 6.7, the shrinker APIs are all GPL-only symbols (shrinker_register, shrinker_alloc, shrinker_free). It is not clear to me what is the way forward, except by rebuilding this set of APIs.

How will this feature improve OpenZFS?

ARC compatibility with the memory management unit of Linux in 6.7+.

Additional context

Introducing commit: f2383e01507eeee8a1c1283d61a117a97d6c4ebe.

snajpa commented 11 months ago

Is there any reason why this can't be wrapped by a set of new SPL functions? (I don't think I understand what the issue is, this seems like an obvious solution to me?)

RaitoBezarius commented 11 months ago

What function do you wrap from the kernel? There's no non-GPL-only entrypoints anymore, is there?

Vlad1mir-D commented 11 months ago

But SPL is GPL.

RaitoBezarius commented 11 months ago

Missed this obvious thing :). I am writing an SPL wrapper for it, it's a bit tedious because the new API require dynamic allocations and the whole thing was operating under assumption this is part of the object global variable space.

ryao commented 11 months ago

But SPL is GPL.

Historically, we do not do this. Oracle got in trouble for doing this.

ryao commented 11 months ago

I sent an email to the author asking him to change the symbol exports to EXPORT_SYMBOL(). Hopefully, he will agree.