From: Greg KH <gregkh@linuxfoundation.org>
To: Hang Lu <hangl@codeaurora.org>
Cc: tkjos@google.com, tkjos@android.com, maco@android.com,
arve@android.com, joel@joelfernandes.org, christian@brauner.io,
hridya@google.com, surenb@google.com, rdunlap@infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4] binder: tell userspace to dump current backtrace when detected oneway spamming
Date: Fri, 9 Apr 2021 08:25:35 +0200 [thread overview]
Message-ID: <YG/zX7ofY3RpkqUg@kroah.com> (raw)
In-Reply-To: <17cf5552-8fec-3aca-a671-f5fbc9344c95@codeaurora.org>
On Fri, Apr 09, 2021 at 02:21:58PM +0800, Hang Lu wrote:
> On 4/9/2021 2:08 PM, Greg KH wrote:
> > On Fri, Apr 09, 2021 at 11:40:57AM +0800, Hang Lu wrote:
> >> When async binder buffer got exhausted, some normal oneway transactions
> >> will also be discarded and may cause system or application failures. By
> >> that time, the binder debug information we dump may not be relevant to
> >> the root cause. And this issue is difficult to debug if without the
> >> backtrace of the thread sending spam.
> >>
> >> This change will send BR_ONEWAY_SPAM_SUSPECT to userspace when oneway
> >> spamming is detected, request to dump current backtrace. Oneway spamming
> >> will be reported only once when exceeding the threshold (target process
> >> dips below 80% of its oneway space, and current process is responsible for
> >> either more than 50 transactions, or more than 50% of the oneway space).
> >> And the detection will restart when the async buffer has returned to a
> >> healthy state.
> >>
> >> Signed-off-by: Hang Lu <hangl@codeaurora.org>
> >> ---
> >> v4: add missing BR_FROZEN_REPLY in binder_return_strings and change the size of binder_stats.br array
> >
> > Should the BR_FROZEN_REPLY string be a separate patch as it's a fix for
> > the "binder frozen feature", not this new feature, right? Or does this
> > patch require that change and the frozen patch did not?
>
> Yes, BR_FROZEN_REPLY string is a fix and seems should to be separated from this new feature. But I'm still wondering how to submit these 2 separate patches as they edit the same place(maybe merge conflict). Do you know which of the following two commit methods is more suitable? Thanks!
>
> 1. char-misc-next HEAD --> BR_FROZEN_REPLY fix patch --> new feature patch
Yes, do it this way, a 2 patch series is fine.
thanks,
greg k-h
prev parent reply other threads:[~2021-04-09 6:25 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-31 7:34 [PATCH] binder: tell userspace to dump current backtrace when detecting " Hang Lu
2021-03-31 7:44 ` Greg KH
2021-04-01 8:05 ` Hang Lu
2021-04-01 8:28 ` [PATCH v2] " Hang Lu
2021-04-06 20:26 ` Todd Kjos
2021-04-07 3:14 ` [PATCH v3] " Hang Lu
2021-04-07 4:11 ` [PATCH v4] " Hang Lu
2021-04-07 19:38 ` Todd Kjos
2021-04-09 3:40 ` [PATCH v4] binder: tell userspace to dump current backtrace when detected " Hang Lu
2021-04-09 6:08 ` Greg KH
2021-04-09 6:21 ` Hang Lu
2021-04-09 6:25 ` Greg KH [this message]
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=YG/zX7ofY3RpkqUg@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=arve@android.com \
--cc=christian@brauner.io \
--cc=hangl@codeaurora.org \
--cc=hridya@google.com \
--cc=joel@joelfernandes.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maco@android.com \
--cc=rdunlap@infradead.org \
--cc=surenb@google.com \
--cc=tkjos@android.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
all inboxes | Powered by JetHome®