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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Sep 14, 2024 at 3:07 PM Gary Guo <gary@xxxxxxxxxxx> wrote:
>
> On Thu, 12 Sep 2024 09:54:01 +0000
> Alice Ryhl <aliceryhl@xxxxxxxxxx> 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`?

We need mutable access, but using a pinned mutable reference is too
inconvenient. I prefer this.

Alice





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux