linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: peter enderborg <peter.enderborg@sonymobile.com>
Cc: devel@driverdev.osuosl.org, riandrews@android.com,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	arve@android.com, torvalds@linux-foundation.org
Subject: Re: [PATCH 1/3 staging-next] android: Collect statistics from lowmemorykiller
Date: Wed, 15 Feb 2017 06:29:14 -0800	[thread overview]
Message-ID: <20170215142914.GB11454@kroah.com> (raw)
In-Reply-To: <cd0b0197-4d5a-bef3-b4a4-69f5ad12f01c@sonymobile.com>

On Wed, Feb 15, 2017 at 09:22:10AM +0100, peter enderborg wrote:
> On 02/14/2017 05:50 PM, Greg KH wrote:
> > On Tue, Feb 14, 2017 at 05:09:30PM +0100, peter.enderborg@sonymobile.com wrote:
> >> From: Peter Enderborg <peter.enderborg@sonymobile.com>
> >>
> >> This collects stats for shrinker calls and how much
> >> waste work we do within the lowmemorykiller.
> >>
> >> Signed-off-by: Peter Enderborg <peter.enderborg@sonymobile.com>
> >> ---
> >>  drivers/staging/android/Kconfig                 | 11 ++++
> >>  drivers/staging/android/Makefile                |  1 +
> >>  drivers/staging/android/lowmemorykiller.c       |  9 ++-
> >>  drivers/staging/android/lowmemorykiller_stats.c | 85 +++++++++++++++++++++++++
> >>  drivers/staging/android/lowmemorykiller_stats.h | 29 +++++++++
> >>  5 files changed, 134 insertions(+), 1 deletion(-)
> >>  create mode 100644 drivers/staging/android/lowmemorykiller_stats.c
> >>  create mode 100644 drivers/staging/android/lowmemorykiller_stats.h
> >>
> >> diff --git a/drivers/staging/android/Kconfig b/drivers/staging/android/Kconfig
> >> index 6c00d6f..96e86c7 100644
> >> --- a/drivers/staging/android/Kconfig
> >> +++ b/drivers/staging/android/Kconfig
> >> @@ -24,6 +24,17 @@ config ANDROID_LOW_MEMORY_KILLER
> >>  	  scripts (/init.rc), and it defines priority values with minimum free memory size
> >>  	  for each priority.
> >>  
> >> +config ANDROID_LOW_MEMORY_KILLER_STATS
> >> +	bool "Android Low Memory Killer: collect statistics"
> >> +	depends on ANDROID_LOW_MEMORY_KILLER
> >> +	default n
> >> +	help
> >> +	  Create a file in /proc/lmkstats that includes
> >> +	  collected statistics about kills, scans and counts
> >> +	  and  interaction with the shrinker. Its content
> >> +	  will be different depeding on lmk implementation used.
> > Ick, no new /proc files please, this isn't a "process" value.  What's
> > wrong with debugfs?
> This is intended for android. Android users are very limited in their access
> to linux part of the system on commercial models and lmk activity has a bad impact on the performance
> of the device. Even the application developers has not much access so it seems to be fair to give
> the users the information about why there is a problem.

Why would you want to give "all users" this information at all?  This is
a debugging tool, your debugging userspace framework can use whatever
interface you create to access it (i.e. debugfs).

Again, do not add debugging stuff to /proc/ that's not ok, sorry.

thanks,

greg k-h

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2017-02-15 14:29 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-14 16:09 peter.enderborg
2017-02-14 16:09 ` [PATCH 2/3 staging-next] oom: Add notification for oom_score_adj peter.enderborg
2017-02-14 16:09 ` [PATCH 3/3 staging-next] mm: Remove RCU and tasklocks from lmk peter.enderborg
2017-02-14 16:50 ` [PATCH 1/3 staging-next] android: Collect statistics from lowmemorykiller Greg KH
2017-02-15  8:22   ` peter enderborg
2017-02-15 14:29     ` Greg KH [this message]
2017-02-14 16:51 ` Greg KH
2017-02-15  8:21   ` peter enderborg
2017-02-15 14:31     ` Greg KH
  -- strict thread matches above, loose matches on Subject: below --
2017-02-09 13:21 peter enderborg
2017-02-09 13:50 ` Greg Kroah-Hartman
2017-02-09 19:26 ` Michal Hocko
2017-02-09 20:07   ` Greg Kroah-Hartman
2017-02-09 20:54     ` Michal Hocko
2017-02-10  7:21       ` peter enderborg
2017-02-10  7:51         ` Greg Kroah-Hartman
2017-02-10  7:59           ` Michal Hocko
2017-02-10  9:05             ` peter enderborg
2017-02-10  9:15               ` Michal Hocko
2017-02-13 15:42                 ` peter enderborg
2017-02-10  9:05           ` peter enderborg
2017-02-10 10:34             ` Greg Kroah-Hartman

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=20170215142914.GB11454@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=arve@android.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=peter.enderborg@sonymobile.com \
    --cc=riandrews@android.com \
    --cc=torvalds@linux-foundation.org \
    /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