Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1581346
| From | Greg KH <gregkh@linuxfoundation.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 1/3 staging-next] android: Collect statistics from lowmemorykiller |
| Date | 2017-02-15 15:30 +0100 |
| Message-ID | <tb8KK-170-11@gated-at.bofh.it> (permalink) |
| References | <taNZD-44x-11@gated-at.bofh.it> <taOCl-4hz-5@gated-at.bofh.it> <tb38m-5Vs-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH 1/3 staging-next] android: Collect statistics from lowmemorykiller <peter.enderborg@sonymobile.com> - 2017-02-14 17:20 +0100
[PATCH 2/3 staging-next] oom: Add notification for oom_score_adj <peter.enderborg@sonymobile.com> - 2017-02-14 17:20 +0100
[PATCH 3/3 staging-next] mm: Remove RCU and tasklocks from lmk <peter.enderborg@sonymobile.com> - 2017-02-14 17:20 +0100
Re: [PATCH 1/3 staging-next] android: Collect statistics from lowmemorykiller Greg KH <gregkh@linuxfoundation.org> - 2017-02-14 18:00 +0100
Re: [PATCH 1/3 staging-next] android: Collect statistics from lowmemorykiller peter enderborg <peter.enderborg@sonymobile.com> - 2017-02-15 09:30 +0100
Re: [PATCH 1/3 staging-next] android: Collect statistics from lowmemorykiller Greg KH <gregkh@linuxfoundation.org> - 2017-02-15 15:40 +0100
Re: [PATCH 1/3 staging-next] android: Collect statistics from lowmemorykiller Greg KH <gregkh@linuxfoundation.org> - 2017-02-14 18:00 +0100
Re: [PATCH 1/3 staging-next] android: Collect statistics from lowmemorykiller peter enderborg <peter.enderborg@sonymobile.com> - 2017-02-15 09:30 +0100
Re: [PATCH 1/3 staging-next] android: Collect statistics from lowmemorykiller Greg KH <gregkh@linuxfoundation.org> - 2017-02-15 15:30 +0100
csiph-web