Re: [PATCH] rust: shrinker: add shrinker abstraction

Gary Guo
2024-09-14T16:04:40Z

On Sat, 14 Sep 2024 14:07:45 +0100
Gary Guo <gary@garyguo.net> wrote:

> > +}
> > +
> > +/// This struct is used to pass information from page reclaim to the shrinkers.
> > +pub struct ShrinkControl<'a> {
> > + ptr: NonNull<bindings::shrink_control>,
> > + _phantom: PhantomData<&'a bindings::shrink_control>,
> > +}
>
> I feel like this can just be a wrapper of `Opaque<ShrinkControl>` and
> we hand out `&'a ShrinkControl`?

Correction: I meant `&'a mut ShrinkControl`.

Best,
Gary