From: Greg KH <gregkh@linuxfoundation.org>
To: Martijn Coenen <maco@android.com>
Cc: john.stultz@linaro.org, tkjos@google.com, arve@android.com,
amit.pundir@linaro.org, devel@driverdev.osuosl.org,
maco@google.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ANDROID: binder: show high watermark of alloc->pages.
Date: Mon, 13 Nov 2017 10:49:53 +0100 [thread overview]
Message-ID: <20171113094953.GB22645@kroah.com> (raw)
In-Reply-To: <20171113090656.60754-1-maco@android.com>
On Mon, Nov 13, 2017 at 10:06:56AM +0100, Martijn Coenen wrote:
> Show the high watermark of the index into the alloc->pages
> array, to facilitate sizing the buffer on a per-process
> basis.
>
> Signed-off-by: Martijn Coenen <maco@android.com>
> ---
> drivers/android/binder_alloc.c | 4 ++++
> drivers/android/binder_alloc.h | 2 ++
> 2 files changed, 6 insertions(+)
>
> diff --git a/drivers/android/binder_alloc.c b/drivers/android/binder_alloc.c
> index 6f6f745605af..0dba2308125c 100644
> --- a/drivers/android/binder_alloc.c
> +++ b/drivers/android/binder_alloc.c
> @@ -281,6 +281,9 @@ static int binder_update_page_range(struct binder_alloc *alloc, int allocate,
> goto err_vm_insert_page_failed;
> }
>
> + if (index + 1 > alloc->pages_high)
> + alloc->pages_high = index + 1;
> +
> trace_binder_alloc_page_end(alloc, index);
> /* vm_insert_page does not seem to increment the refcount */
> }
> @@ -853,6 +856,7 @@ void binder_alloc_print_pages(struct seq_file *m,
> }
> mutex_unlock(&alloc->mutex);
> seq_printf(m, " pages: %d:%d:%d\n", active, lru, free);
> + seq_printf(m, " pages high watermark: %zu\n", alloc->pages_high);
Who can use this? A userspace tool? Or something else?
This is ok for 4.15-rc1, right?
thanks,
greg k-h
next prev parent reply other threads:[~2017-11-13 9:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-13 9:06 [PATCH] ANDROID: binder: show high watermark of alloc->pages Martijn Coenen
2017-11-13 9:49 ` Greg KH [this message]
2017-11-13 9:59 ` Martijn Coenen
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=20171113094953.GB22645@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=amit.pundir@linaro.org \
--cc=arve@android.com \
--cc=devel@driverdev.osuosl.org \
--cc=john.stultz@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maco@android.com \
--cc=maco@google.com \
--cc=tkjos@google.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