* [PATCH] staging: android: lowmemorykiller: Don't wait more than one second for a process to die
@ 2012-01-13 18:21 Anton Vorontsov
2012-01-13 18:31 ` Greg KH
0 siblings, 1 reply; 3+ messages in thread
From: Anton Vorontsov @ 2012-01-13 18:21 UTC (permalink / raw)
To: Greg Kroah-Hartman, Arve Hjønnevåg
Cc: kernel-team, linaro-kernel, linux-kernel
From: Arve Hjønnevåg <arve@android.com>
If a process forked and the child process was killed by the
lowmemorykiller, the lowmemory killer would be disabled until
the parent process reaped the child or it died itself.
Signed-off-by: Arve Hjønnevåg <arve@android.com>
Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
---
Noticed that the patch is missing. Any reason for not wanting it
in staging?
drivers/staging/android/lowmemorykiller.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/drivers/staging/android/lowmemorykiller.c b/drivers/staging/android/lowmemorykiller.c
index 2d8d2b7..efc7dc1 100644
--- a/drivers/staging/android/lowmemorykiller.c
+++ b/drivers/staging/android/lowmemorykiller.c
@@ -54,6 +54,7 @@ static size_t lowmem_minfree[6] = {
static int lowmem_minfree_size = 4;
static struct task_struct *lowmem_deathpending;
+static unsigned long lowmem_deathpending_timeout;
#define lowmem_print(level, x...) \
do { \
@@ -103,7 +104,8 @@ static int lowmem_shrink(struct shrinker *s, struct shrink_control *sc)
* Note: Currently you need CONFIG_PROFILING
* for this to work correctly.
*/
- if (lowmem_deathpending)
+ if (lowmem_deathpending &&
+ time_before_eq(jiffies, lowmem_deathpending_timeout))
return 0;
if (lowmem_adj_size < array_size)
@@ -178,6 +180,7 @@ static int lowmem_shrink(struct shrinker *s, struct shrink_control *sc)
*/
#ifdef CONFIG_PROFILING
lowmem_deathpending = selected;
+ lowmem_deathpending_timeout = jiffies + HZ;
task_handoff_register(&task_nb);
#endif
force_sig(SIGKILL, selected);
--
1.7.7.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] staging: android: lowmemorykiller: Don't wait more than one second for a process to die
2012-01-13 18:21 [PATCH] staging: android: lowmemorykiller: Don't wait more than one second for a process to die Anton Vorontsov
@ 2012-01-13 18:31 ` Greg KH
2012-01-13 18:44 ` Anton Vorontsov
0 siblings, 1 reply; 3+ messages in thread
From: Greg KH @ 2012-01-13 18:31 UTC (permalink / raw)
To: Anton Vorontsov
Cc: Arve Hjønnevåg, kernel-team, linaro-kernel,
linux-kernel
On Fri, Jan 13, 2012 at 10:21:25PM +0400, Anton Vorontsov wrote:
> From: Arve Hjønnevåg <arve@android.com>
>
> If a process forked and the child process was killed by the
> lowmemorykiller, the lowmemory killer would be disabled until
> the parent process reaped the child or it died itself.
>
> Signed-off-by: Arve Hjønnevåg <arve@android.com>
> Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
> ---
>
> Noticed that the patch is missing. Any reason for not wanting it
> in staging?
No, I must have missed this one, sorry about that. Where was it that I
should have seen it?
I'll queue this up after 3.3-rc1 is out to get it into the final 3.3
release.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] staging: android: lowmemorykiller: Don't wait more than one second for a process to die
2012-01-13 18:31 ` Greg KH
@ 2012-01-13 18:44 ` Anton Vorontsov
0 siblings, 0 replies; 3+ messages in thread
From: Anton Vorontsov @ 2012-01-13 18:44 UTC (permalink / raw)
To: Greg KH; +Cc: Arve Hjønnevåg, kernel-team, linaro-kernel,
linux-kernel
On Fri, Jan 13, 2012 at 10:31:20AM -0800, Greg KH wrote:
> On Fri, Jan 13, 2012 at 10:21:25PM +0400, Anton Vorontsov wrote:
> > From: Arve Hjønnevåg <arve@android.com>
> >
> > If a process forked and the child process was killed by the
> > lowmemorykiller, the lowmemory killer would be disabled until
> > the parent process reaped the child or it died itself.
> >
> > Signed-off-by: Arve Hjønnevåg <arve@android.com>
> > Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
> > ---
> >
> > Noticed that the patch is missing. Any reason for not wanting it
> > in staging?
>
> No, I must have missed this one, sorry about that. Where was it that I
> should have seen it?
I can see it in https://android.googlesource.com/kernel/common.git
android-3.0 branch, commit 280e506943185da01e8605b1a0082012205d3cb0.
> I'll queue this up after 3.3-rc1 is out to get it into the final 3.3
> release.
Thanks!
--
Anton Vorontsov
Email: cbouatmailru@gmail.com
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-01-13 18:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-13 18:21 [PATCH] staging: android: lowmemorykiller: Don't wait more than one second for a process to die Anton Vorontsov
2012-01-13 18:31 ` Greg KH
2012-01-13 18:44 ` Anton Vorontsov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox