[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAH5fLgjqksLOOzEyPBDN6Ym9DKpuifdxte2a+NJ-GNQoyUe35g@mail.gmail.com>
Date: Mon, 14 Oct 2024 15:25:24 +0200
From: Alice Ryhl <aliceryhl@...gle.com>
To: Gary Guo <gary@...yguo.net>
Cc: Miguel Ojeda <ojeda@...nel.org>, Andrew Morton <akpm@...ux-foundation.org>,
Dave Chinner <david@...morbit.com>, Qi Zheng <zhengqi.arch@...edance.com>,
Roman Gushchin <roman.gushchin@...ux.dev>, Muchun Song <muchun.song@...ux.dev>,
Boqun Feng <boqun.feng@...il.com>, Björn Roy Baron <bjorn3_gh@...tonmail.com>,
Benno Lossin <benno.lossin@...ton.me>, Andreas Hindborg <a.hindborg@...sung.com>,
Trevor Gross <tmgross@...ch.edu>, linux-kernel@...r.kernel.org, linux-mm@...ck.org,
rust-for-linux@...r.kernel.org
Subject: Re: [PATCH] rust: shrinker: add shrinker abstraction
On Sat, Sep 14, 2024 at 3:07 PM Gary Guo <gary@...yguo.net> wrote:
>
> On Thu, 12 Sep 2024 09:54:01 +0000
> Alice Ryhl <aliceryhl@...gle.com> 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
Powered by blists - more mailing lists