Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1298197 > unrolled thread
| Started by | Figo <tianfei.zhang@intel.com> |
|---|---|
| First post | 2015-12-26 12:50 +0100 |
| Last post | 2015-12-27 01:20 +0100 |
| Articles | 8 — 4 participants |
Back to article view | Back to linux.kernel
[PATCH v2 1/1] fix a dead loop when in heavy low memory Figo <tianfei.zhang@intel.com> - 2015-12-26 12:50 +0100
Re: [PATCH v2 1/1] fix a dead loop when in heavy low memory Greg KH <gregkh@linuxfoundation.org> - 2015-12-26 19:20 +0100
RE: [PATCH v2 1/1] fix a dead loop when in heavy low memory "Zhang, Tianfei" <tianfei.zhang@intel.com> - 2015-12-27 00:30 +0100
Re: [PATCH v2 1/1] fix a dead loop when in heavy low memory Greg KH <gregkh@linuxfoundation.org> - 2015-12-27 01:20 +0100
RE: [PATCH v2 1/1] fix a dead loop when in heavy low memory "Zhang, Tianfei" <tianfei.zhang@intel.com> - 2015-12-27 01:20 +0100
Re: [PATCH v2 1/1] fix a dead loop when in heavy low memory Greg KH <gregkh@linuxfoundation.org> - 2015-12-27 01:30 +0100
Re: [PATCH v2 1/1] fix a dead loop when in heavy low memory Harald Arnesen <harald@skogtun.org> - 2015-12-27 00:50 +0100
Re: [PATCH v2 1/1] fix a dead loop when in heavy low memory Greg KH <gregkh@linuxfoundation.org> - 2015-12-27 01:20 +0100
| From | Figo <tianfei.zhang@intel.com> |
|---|---|
| Date | 2015-12-26 12:50 +0100 |
| Subject | [PATCH v2 1/1] fix a dead loop when in heavy low memory |
| Message-ID | <qJVwd-nL-1@gated-at.bofh.it> |
Android System UI hang when run heavy monkey stress test.
Run this monkey stress test script with more than 100
apps/games installed:
adb shell "monkey --ignore-crashes --ignore-timeouts
--kill-process-after-error --ignore-security-exceptions
--throttle 200 -v 20000000"
kernel log:
[ 1526.272125] lowmem_scan start: 128, 213da, ofree -9849 34419, ma 529
[ 1526.272260] lowmemorykiller: select 'dTi-lm' (27289), adj 647, size 10630, to kill
[ 1526.272299] lowmem_d_timeout=4296194081
[ 1526.272303] Killing 'dTi-lm' (27289), adj 647,
[ 1526.272303] to free 42520kB on behalf of 'servicemanager' (2365) because
[ 1526.272303] cache 137676kB is below limit 221184kB for oom_score_adj 529
[ 1526.272303] Free memory is -39396kB above reserved
[ 1526.272304] lowmem_scan end: 128, 213da, return 10630
[ 1526.272710] lowmem_scan start: 128, 213da, ofree -9849 34373, ma 529
[ 1526.272832] lowmem: TIF_MEMDIE, adj=647, dTi-lm, jiffies=4296193081, 4296194081
[ 1526.274450] lowmem_scan start: 128, 280da, ofree -9601 34327, ma 529
[ 1526.274695] lowmem: TIF_MEMDIE, adj=647, dTi-lm, jiffies=4296193083, 4296194081
[ 1526.282292] lowmem_scan start: 128, 213da, ofree -9703 34327, ma 529
[ 1526.282727] lowmem: TIF_MEMDIE, adj=647, dTi-lm, jiffies=4296193090, 4296194081
[ 1526.316888] lowmem_scan start: 128, 213da, ofree -9766 34465, ma 529
[ 1526.317019] lowmem: TIF_MEMDIE, adj=647, dTi-lm, jiffies=4296193125, 4296194081
[ 1526.319311] lowmem_scan start: 128, 213da, ofree -9856 34419, ma 529
[ 1526.319442] lowmem: TIF_MEMDIE, adj=647, dTi-lm, jiffies=4296193125, 4296194081
[ 1526.322026] lowmem_scan start: 128, 280da, ofree -9841 34327, ma 529
[ 1526.360831] lowmem: TIF_MEMDIE, adj=647, dTi-lm, jiffies=4296193166, 4296194081
[ 1526.532233] lowmem_scan start: 128, 213da, ofree -9846 34511, ma 529
[ 1526.644046] lowmem_scan start: 128, 213da, ofree -9785 34235, ma 529
[ 1527.437578] lowmem: TIF_MEMDIE, adj=647, dTi-lm, jiffies=4296194246, 4296195109
[ 1527.442559] lowmem_scan start: 128, 213da, ofree -9850 41884, ma 529
[ 1527.459540] lowmem: TIF_MEMDIE, adj=647, dTi-lm, jiffies=4296194268, 4296195109
[ 1527.500352] lowmem: TIF_MEMDIE, adj=647, dTi-lm, jiffies=4296194309, 4296195109
when this happened, the android system UI will hang, no process can be
select to kill.
i found the the value of "lowmem_deathpending_timeout" will be modified
strangely, like in last killing, the value is 4296194081, but why not it
had changed to 4296195109? so it will cause the deadloop in low memory
state which will cause the android system UI hang, because no process will
be kill.
commit e5d7965f88a3 ("staging: android: lowmemorykiller: Don't wait more
than one second for a process to die") said wait 1 seconds, i think it no
need to wait 1 second, because we don't select the process with
"TIF_MEMDIE" to kill.
Signed-off-by: Figo <tianfei.zhang@intel.com>
---
drivers/staging/android/lowmemorykiller.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/drivers/staging/android/lowmemorykiller.c b/drivers/staging/android/lowmemorykiller.c
index e679d84..13c7182 100644
--- a/drivers/staging/android/lowmemorykiller.c
+++ b/drivers/staging/android/lowmemorykiller.c
@@ -59,8 +59,6 @@ static int lowmem_minfree[6] = {
};
static int lowmem_minfree_size = 4;
-static unsigned long lowmem_deathpending_timeout;
-
#define lowmem_print(level, x...) \
do { \
if (lowmem_debug_level >= (level)) \
@@ -128,11 +126,9 @@ static unsigned long lowmem_scan(struct shrinker *s, struct shrink_control *sc)
if (!p)
continue;
- if (test_tsk_thread_flag(p, TIF_MEMDIE) &&
- time_before_eq(jiffies, lowmem_deathpending_timeout)) {
+ if (test_tsk_thread_flag(p, TIF_MEMDIE)) {
task_unlock(p);
- rcu_read_unlock();
- return 0;
+ continue;
}
oom_score_adj = p->signal->oom_score_adj;
if (oom_score_adj < min_score_adj) {
@@ -170,7 +166,6 @@ static unsigned long lowmem_scan(struct shrinker *s, struct shrink_control *sc)
lowmem_print(1, "send sigkill to %d (%s), adj %hd, size %d\n",
selected->pid, selected->comm,
selected_oom_score_adj, selected_tasksize);
- lowmem_deathpending_timeout = jiffies + HZ;
rem += selected_tasksize;
}
--
1.7.9.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Greg KH <gregkh@linuxfoundation.org> |
|---|---|
| Date | 2015-12-26 19:20 +0100 |
| Message-ID | <qK1BE-4kf-27@gated-at.bofh.it> |
| In reply to | #1298197 |
On Sun, Dec 27, 2015 at 03:39:42AM +0800, Figo wrote: > Android System UI hang when run heavy monkey stress test. What changed from v1 of this patch? Please describe that below the --- line. > > Signed-off-by: Figo <tianfei.zhang@intel.com> I need a "full" name here, not a "short" name, sorry, before I can do anything with this patch. thanks, greg k-h -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | "Zhang, Tianfei" <tianfei.zhang@intel.com> |
|---|---|
| Date | 2015-12-27 00:30 +0100 |
| Message-ID | <qK6rD-7mQ-3@gated-at.bofh.it> |
| In reply to | #1298238 |
PiA+IEFuZHJvaWQgU3lzdGVtIFVJIGhhbmcgd2hlbiBydW4gaGVhdnkgbW9ua2V5IHN0cmVzcyB0 ZXN0Lg0KPiANCj4gV2hhdCBjaGFuZ2VkIGZyb20gdjEgb2YgdGhpcyBwYXRjaD8gIFBsZWFzZSBk ZXNjcmliZSB0aGF0IGJlbG93IHRoZSAtLS0NCj4gbGluZS4NClYyo6xJIGp1c3QgbW9kaWZ5IG15 IGNvbW1lbnRzLg0KDQo+IA0KPiA+DQo+ID4gU2lnbmVkLW9mZi1ieTogRmlnbyA8dGlhbmZlaS56 aGFuZ0BpbnRlbC5jb20+DQo+IA0KPiBJIG5lZWQgYSAiZnVsbCIgbmFtZSBoZXJlLCBub3QgYSAi c2hvcnQiIG5hbWUsIHNvcnJ5LCBiZWZvcmUgSSBjYW4gZG8gYW55dGhpbmcNCj4gd2l0aCB0aGlz IHBhdGNoLg0KDQogbXkgbmFtZT8gbXkgRnVsbCBuYW1lIGlzIEZpZ28uemhhbmcNCg0K -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Greg KH <gregkh@linuxfoundation.org> |
|---|---|
| Date | 2015-12-27 01:20 +0100 |
| Message-ID | <qK7e1-7V9-5@gated-at.bofh.it> |
| In reply to | #1298296 |
On Sat, Dec 26, 2015 at 11:24:14PM +0000, Zhang, Tianfei wrote: > > > Android System UI hang when run heavy monkey stress test. > > > > What changed from v1 of this patch? Please describe that below the --- > > line. > V2,I just modify my comments. Then say so. How am I supposed to know? > > > Signed-off-by: Figo <tianfei.zhang@intel.com> > > > > I need a "full" name here, not a "short" name, sorry, before I can do anything > > with this patch. > > my name? my Full name is Figo.zhang Great, please use that, but why does your email address show a different name? Intel has standards that you have to follow when submitting Linux kernel patches, please consult them before you resend. thanks, greg k-h -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | "Zhang, Tianfei" <tianfei.zhang@intel.com> |
|---|---|
| Date | 2015-12-27 01:20 +0100 |
| Message-ID | <qK7e1-7V9-3@gated-at.bofh.it> |
| In reply to | #1298299 |
PiBHcmVhdCwgcGxlYXNlIHVzZSB0aGF0LCBidXQgd2h5IGRvZXMgeW91ciBlbWFpbCBhZGRyZXNz IHNob3cgYSBkaWZmZXJlbnQNCj4gbmFtZT8gIEludGVsIGhhcyBzdGFuZGFyZHMgdGhhdCB5b3Ug aGF2ZSB0byBmb2xsb3cgd2hlbiBzdWJtaXR0aW5nIExpbnV4DQo+IGtlcm5lbCBwYXRjaGVzLCBw bGVhc2UgY29uc3VsdCB0aGVtIGJlZm9yZSB5b3UgcmVzZW5kLg0KPiANCg0KSGkgZ3JlZywgSSBz aG91bGQgcmVzZW5kIHRoaXMgcGF0Y2ggdXNpbmcgW1BBVENIIFJFU0VORCB2MiAxLzFdPw0K -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Greg KH <gregkh@linuxfoundation.org> |
|---|---|
| Date | 2015-12-27 01:30 +0100 |
| Message-ID | <qK7nH-7Yr-15@gated-at.bofh.it> |
| In reply to | #1298300 |
On Sun, Dec 27, 2015 at 12:19:08AM +0000, Zhang, Tianfei wrote: > > Great, please use that, but why does your email address show a different > > name? Intel has standards that you have to follow when submitting Linux > > kernel patches, please consult them before you resend. > > > > Hi greg, I should resend this patch using [PATCH RESEND v2 1/1]? I can't take it as-is, so of course you should resend it... -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Harald Arnesen <harald@skogtun.org> |
|---|---|
| Date | 2015-12-27 00:50 +0100 |
| Message-ID | <qK6L0-7vd-1@gated-at.bofh.it> |
| In reply to | #1298238 |
Greg KH [2015-12-26 19:12]: > I need a "full" name here, not a "short" name, sorry, before I can do > anything with this patch. I don't know if that is the case here, but: You know, of course, that there are societies in this world where only one name is used? -- Hilsen Harald -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Greg KH <gregkh@linuxfoundation.org> |
|---|---|
| Date | 2015-12-27 01:20 +0100 |
| Message-ID | <qK7e1-7V9-7@gated-at.bofh.it> |
| In reply to | #1298297 |
On Sun, Dec 27, 2015 at 12:42:31AM +0100, Harald Arnesen wrote: > Greg KH [2015-12-26 19:12]: > > > I need a "full" name here, not a "short" name, sorry, before I can do > > anything with this patch. > > I don't know if that is the case here, but: > > You know, of course, that there are societies in this world where only > one name is used? Yes, but that obviously is not the case here, please give me more credit, I've been dealing with this for a _very_ long time... greg k-h -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web