All of lore.kernel.org
 help / color / mirror / Atom feed
From: Carlos Llamas <cmllamas@google.com>
To: "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>
Cc: linux-kernel@vger.kernel.org, kernel-team@android.com,
	Nhat Pham <nphamcs@gmail.com>,
	Johannes Weiner <hannes@cmpxchg.org>,
	Barry Song <v-songbaohua@oppo.com>
Subject: Re: [PATCH 8/8] binder: use per-vma lock in page installation
Date: Tue, 5 Nov 2024 21:44:28 +0000	[thread overview]
Message-ID: <ZyqRvLlPdvKknbWE@google.com> (raw)
In-Reply-To: <20241105200258.2380168-9-cmllamas@google.com>

On Tue, Nov 05, 2024 at 08:02:50PM +0000, Carlos Llamas wrote:
> +static struct page *binder_page_lookup(struct mm_struct *mm,
> +				       struct vm_area_struct *vma,
> +				       unsigned long addr,
> +				       bool mm_locked)
> +{
> +	struct folio_walk fw;
> +	struct page *page;
> +
> +	/* folio_walk_start() requires the mmap_lock */
> +	if (!mm_locked)
> +		mmap_read_lock(mm);
> +
> +	if (!folio_walk_start(&fw, vma, addr, 0))
> +		return NULL;

Just realized that mmap_lock need to be released if folio_walk_start()
fails and !mm_locked. I'll add the fix for v2.

  reply	other threads:[~2024-11-05 21:44 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-05 20:02 [PATCH 0/8] binder: faster page installations Carlos Llamas
2024-11-05 20:02 ` [PATCH 1/8] Revert "binder: switch alloc->mutex to spinlock_t" Carlos Llamas
2024-11-05 20:02 ` [PATCH 2/8] binder: concurrent page installation Carlos Llamas
2024-11-05 20:02 ` [PATCH 3/8] binder: select correct nid for pages in LRU Carlos Llamas
2024-11-05 20:02 ` [PATCH 4/8] binder: remove struct binder_lru_page Carlos Llamas
2024-11-05 20:02 ` [PATCH 5/8] binder: use alloc->mapped to save the vma state Carlos Llamas
2024-11-05 20:02 ` [PATCH 6/8] binder: remove cached alloc->vma pointer Carlos Llamas
2024-11-05 20:02 ` [PATCH 7/8] binder: rename alloc->buffer to vm_start Carlos Llamas
2024-11-05 20:02 ` [PATCH 8/8] binder: use per-vma lock in page installation Carlos Llamas
2024-11-05 21:44   ` Carlos Llamas [this message]
2024-11-06 22:55   ` Hillf Danton
2024-11-07  3:23     ` Carlos Llamas

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=ZyqRvLlPdvKknbWE@google.com \
    --to=cmllamas@google.com \
    --cc=arve@android.com \
    --cc=brauner@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hannes@cmpxchg.org \
    --cc=joel@joelfernandes.org \
    --cc=kernel-team@android.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maco@android.com \
    --cc=nphamcs@gmail.com \
    --cc=surenb@google.com \
    --cc=tkjos@android.com \
    --cc=v-songbaohua@oppo.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.