mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: Carlos Llamas <cmllamas@google.com>
Cc: "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Arve Hjønnevåg" <arve@android.com>,
	"Todd Kjos" <tkjos@android.com>,
	"Martijn Coenen" <maco@android.com>,
	"Joel Fernandes" <joel@joelfernandes.org>,
	"Christian Brauner" <brauner@kernel.org>,
	"Suren Baghdasaryan" <surenb@google.com>,
	linux-kernel@vger.kernel.org, kernel-team@android.com,
	"Liam R. Howlett" <Liam.Howlett@oracle.com>
Subject: Re: [PATCH v4 4/9] binder: remove struct binder_lru_page
Date: Wed, 20 Nov 2024 02:45:21 +0000	[thread overview]
Message-ID: <Zz1NQXgk96vqHHFr@casper.infradead.org> (raw)
In-Reply-To: <ZzzyBwWIDy6Z2W4k@google.com>

On Tue, Nov 19, 2024 at 08:16:07PM +0000, Carlos Llamas wrote:
> 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?

Something like that, yes.  Although you wouldn't even need to use
page->private for it; you'd be able to use page->memdesc directly,
and then not be in the way of shrinking to 8 bytes.

  reply	other threads:[~2024-11-20  2:45 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-19 18:32 [PATCH v4 0/9] binder: faster page installations Carlos Llamas
2024-11-19 18:32 ` [PATCH v4 1/9] Revert "binder: switch alloc->mutex to spinlock_t" Carlos Llamas
2024-11-19 18:32 ` [PATCH v4 2/9] binder: concurrent page installation Carlos Llamas
2024-11-19 18:32 ` [PATCH v4 3/9] binder: select correct nid for pages in LRU Carlos Llamas
2024-11-19 18:32 ` [PATCH v4 4/9] binder: remove struct binder_lru_page Carlos Llamas
2024-11-19 19:10   ` Matthew Wilcox
2024-11-19 20:00     ` Greg Kroah-Hartman
2024-11-19 20:16     ` Carlos Llamas
2024-11-20  2:45       ` Matthew Wilcox [this message]
2024-11-21  5:56         ` Carlos Llamas
2024-11-19 18:32 ` [PATCH v4 5/9] binder: replace alloc->vma with alloc->mapped Carlos Llamas
2024-11-19 18:32 ` [PATCH v4 6/9] binder: rename alloc->buffer to vm_start Carlos Llamas
2024-11-19 18:32 ` [PATCH v4 7/9] binder: use per-vma lock in page installation Carlos Llamas
2024-11-19 18:32 ` [PATCH v4 8/9] binder: propagate vm_insert_page() errors Carlos Llamas
2024-11-22 15:49   ` Suren Baghdasaryan
2024-11-19 18:32 ` [PATCH v4 9/9] binder: use per-vma lock in page reclaiming Carlos Llamas
2024-11-22 16:12   ` Suren Baghdasaryan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Zz1NQXgk96vqHHFr@casper.infradead.org \
    --to=willy@infradead.org \
    --cc=Liam.Howlett@oracle.com \
    --cc=arve@android.com \
    --cc=brauner@kernel.org \
    --cc=cmllamas@google.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=joel@joelfernandes.org \
    --cc=kernel-team@android.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maco@android.com \
    --cc=surenb@google.com \
    --cc=tkjos@android.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®