[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZzzyBwWIDy6Z2W4k@google.com>
Date: Tue, 19 Nov 2024 20:16:07 +0000
From: Carlos Llamas <cmllamas@...gle.com>
To: Matthew Wilcox <willy@...radead.org>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Arve Hjønnevåg <arve@...roid.com>,
Todd Kjos <tkjos@...roid.com>, Martijn Coenen <maco@...roid.com>,
Joel Fernandes <joel@...lfernandes.org>,
Christian Brauner <brauner@...nel.org>,
Suren Baghdasaryan <surenb@...gle.com>,
linux-kernel@...r.kernel.org, kernel-team@...roid.com,
"Liam R. Howlett" <Liam.Howlett@...cle.com>
Subject: Re: [PATCH v4 4/9] binder: remove struct binder_lru_page
On Tue, Nov 19, 2024 at 07:10:49PM +0000, Matthew Wilcox wrote:
> On Tue, Nov 19, 2024 at 06:32:37PM +0000, Carlos Llamas wrote:
> > Remove the redundant struct binder_lru_page concept. Instead, let's use
> > available struct page->lru and page->private members directly to achieve
> > the same functionality.
>
> I'm not entirely happy to see this. I expect to start a patch series in
> the next six months which will remove users of page->lru. page->private
> is OK for now. The goal is to shrink struct page to 8 bytes, but I
> accept that 16 bytes may be the best we can do.
I see. I don't think that would be a problem. I'm only going after the
wasted duplication in binder. However, if page->lru is getting removed
I'd be happy to move to whatever is suggested as a replacement.
If you are planning to keep page->private, I think we can just hang our
binder items in there. Something like...
struct binder_page_items *bp;
struct page *p;
bp = kzalloc(sizeof(*bp), GFP_KERNEL);
bp->alloc = alloc;
INIT_LIST_HEAD(&bp->lru);
bp->index = index;
p = alloc_page(...);
p->private = (unsigned long)bp;
This would be absolutely fine in binder. Is this what you had in mind
for current users of page->lru?
Powered by blists - more mailing lists