public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2.4.21-rc4] Fix oom killer braindamage
@ 2003-05-27 19:05 Marc-Christian Petersen
  2003-05-27 19:12 ` Marcelo Tosatti
  2003-05-27 19:20 ` William Lee Irwin III
  0 siblings, 2 replies; 11+ messages in thread
From: Marc-Christian Petersen @ 2003-05-27 19:05 UTC (permalink / raw)
  To: Marcelo Tosatti; +Cc: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 487 bytes --]

Hi Marcelo,

attached patch fixes the oom killer braindamage where it tries to kill 
processes again and again and again w/o any ending or successfull killing of 
the selected processes in an OOM case.

The attached, very simple but effective, patch fixes it.

All the kudos go to Rik van Riel.

Patch tested and works, and also for a long time in my tree (and maybe also 
others?!)

This issue is out there for several years.

Please consider it for 2.4.21-rc5, thanks.

ciao, Marc





[-- Attachment #2: oomkiller-braindamage-fix.patch --]
[-- Type: text/x-diff, Size: 417 bytes --]

===== mm/oom_kill.c 1.11 vs edited =====
--- 1.11/mm/oom_kill.c	Fri Aug 16 10:59:46 2002
+++ edited/mm/oom_kill.c	Sat Feb 22 17:31:49 2003
@@ -61,11 +61,16 @@ static int badness(struct task_struct *p
 
 	if (!p->mm)
 		return 0;
+
+	if (p->flags & PF_MEMDIE)
+		return 0;
+
 	/*
 	 * Never kill init
 	 */
 	if (p->pid == 1)
 		return 0;
+
 	/*
 	 * The memory size of the process is the basis for the badness.
 	 */

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 2.4.21-rc4] Fix oom killer braindamage
  2003-05-27 19:05 [PATCH 2.4.21-rc4] Fix oom killer braindamage Marc-Christian Petersen
@ 2003-05-27 19:12 ` Marcelo Tosatti
  2003-05-27 19:18   ` Marc-Christian Petersen
  2003-05-27 19:20 ` William Lee Irwin III
  1 sibling, 1 reply; 11+ messages in thread
From: Marcelo Tosatti @ 2003-05-27 19:12 UTC (permalink / raw)
  To: Marc-Christian Petersen; +Cc: linux-kernel



On Tue, 27 May 2003, Marc-Christian Petersen wrote:

> Hi Marcelo,
>
> attached patch fixes the oom killer braindamage where it tries to kill
> processes again and again and again w/o any ending or successfull killing of
> the selected processes in an OOM case.
>
> The attached, very simple but effective, patch fixes it.
>
> All the kudos go to Rik van Riel.
>
> Patch tested and works, and also for a long time in my tree (and maybe also
> others?!)
>
> This issue is out there for several years.
>
> Please consider it for 2.4.21-rc5, thanks.

Not suitable for -rc. Btw, -rc5 is already at bkbits.net.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 2.4.21-rc4] Fix oom killer braindamage
  2003-05-27 19:12 ` Marcelo Tosatti
@ 2003-05-27 19:18   ` Marc-Christian Petersen
  2003-05-27 19:28     ` Marc-Christian Petersen
  2003-05-27 19:31     ` Marc-Christian Petersen
  0 siblings, 2 replies; 11+ messages in thread
From: Marc-Christian Petersen @ 2003-05-27 19:18 UTC (permalink / raw)
  To: Marcelo Tosatti; +Cc: linux-kernel

On Tuesday 27 May 2003 21:12, Marcelo Tosatti wrote:

Hi Marcelo,

> > Please consider it for 2.4.21-rc5, thanks.
> Not suitable for -rc. Btw, -rc5 is already at bkbits.net.
well, not my fault ;-) Rik sent this while -pre time and after I saw it wasn't 
applied I sent it again while -pre time.

*scnr*

Well, please apply it for 2.4.22-pre1 then. Thanks

ciao, Marc


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 2.4.21-rc4] Fix oom killer braindamage
  2003-05-27 19:05 [PATCH 2.4.21-rc4] Fix oom killer braindamage Marc-Christian Petersen
  2003-05-27 19:12 ` Marcelo Tosatti
@ 2003-05-27 19:20 ` William Lee Irwin III
  1 sibling, 0 replies; 11+ messages in thread
From: William Lee Irwin III @ 2003-05-27 19:20 UTC (permalink / raw)
  To: Marc-Christian Petersen; +Cc: Marcelo Tosatti, linux-kernel

On Tue, May 27, 2003 at 09:05:45PM +0200, Marc-Christian Petersen wrote:
> Hi Marcelo,
> attached patch fixes the oom killer braindamage where it tries to kill 
> processes again and again and again w/o any ending or successfull killing of 
> the selected processes in an OOM case.
> The attached, very simple but effective, patch fixes it.
> All the kudos go to Rik van Riel.
> Patch tested and works, and also for a long time in my tree (and maybe also 
> others?!)
> This issue is out there for several years.
> Please consider it for 2.4.21-rc5, thanks.
> ciao, Marc

Also in 2.5.x for some time.


-- wli

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 2.4.21-rc4] Fix oom killer braindamage
  2003-05-27 19:18   ` Marc-Christian Petersen
@ 2003-05-27 19:28     ` Marc-Christian Petersen
  2003-05-27 19:31       ` Marcelo Tosatti
  2003-05-27 19:31     ` Marc-Christian Petersen
  1 sibling, 1 reply; 11+ messages in thread
From: Marc-Christian Petersen @ 2003-05-27 19:28 UTC (permalink / raw)
  To: Marcelo Tosatti; +Cc: linux-kernel

On Tuesday 27 May 2003 21:18, Marc-Christian Petersen wrote:

Hi again,

> > Not suitable for -rc. Btw, -rc5 is already at bkbits.net.
BTW: This breaks _nothing_. It _fixes_ an annoying bug! ;)

> well, not my fault ;-) Rik sent this while -pre time and after I saw it
> wasn't applied I sent it again while -pre time.

ciao, Marc


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 2.4.21-rc4] Fix oom killer braindamage
  2003-05-27 19:28     ` Marc-Christian Petersen
@ 2003-05-27 19:31       ` Marcelo Tosatti
  2003-05-28 22:14         ` Pavel Machek
  0 siblings, 1 reply; 11+ messages in thread
From: Marcelo Tosatti @ 2003-05-27 19:31 UTC (permalink / raw)
  To: Marc-Christian Petersen; +Cc: linux-kernel



On Tue, 27 May 2003, Marc-Christian Petersen wrote:

> On Tuesday 27 May 2003 21:18, Marc-Christian Petersen wrote:
>
> Hi again,
>
> > > Not suitable for -rc. Btw, -rc5 is already at bkbits.net.
> BTW: This breaks _nothing_. It _fixes_ an annoying bug! ;)

You're not completly sure it doesnt break nothing. MM/VM can be reallly
subtle and nasty at times.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 2.4.21-rc4] Fix oom killer braindamage
  2003-05-27 19:18   ` Marc-Christian Petersen
  2003-05-27 19:28     ` Marc-Christian Petersen
@ 2003-05-27 19:31     ` Marc-Christian Petersen
  2003-05-27 19:34       ` Marcelo Tosatti
  2003-05-27 19:34       ` Jens Axboe
  1 sibling, 2 replies; 11+ messages in thread
From: Marc-Christian Petersen @ 2003-05-27 19:31 UTC (permalink / raw)
  To: Marcelo Tosatti; +Cc: linux-kernel, Andrew Morton, Jens Axboe

On Tuesday 27 May 2003 21:18, Marc-Christian Petersen wrote:

Hi again ^3 ;)

> > Not suitable for -rc. Btw, -rc5 is already at bkbits.net.
Please, if there is any chance we can fix the pause/stop bug, delay .21 final 
for some hours or a day (or maybe two)

I've CC'ed akpm and Axboe. I think they are the only ones knowing enough about 
the code to see an obvious error and even fixing the bug?!

Do you agree? Does anyone else agree? Or disagree?

ciao, Marc


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 2.4.21-rc4] Fix oom killer braindamage
  2003-05-27 19:31     ` Marc-Christian Petersen
@ 2003-05-27 19:34       ` Marcelo Tosatti
  2003-05-27 19:46         ` Marc-Christian Petersen
  2003-05-27 19:34       ` Jens Axboe
  1 sibling, 1 reply; 11+ messages in thread
From: Marcelo Tosatti @ 2003-05-27 19:34 UTC (permalink / raw)
  To: Marc-Christian Petersen; +Cc: linux-kernel, Andrew Morton, Jens Axboe



On Tue, 27 May 2003, Marc-Christian Petersen wrote:

> On Tuesday 27 May 2003 21:18, Marc-Christian Petersen wrote:
>
> Hi again ^3 ;)
>
> > > Not suitable for -rc. Btw, -rc5 is already at bkbits.net.
> Please, if there is any chance we can fix the pause/stop bug, delay .21 final
> for some hours or a day (or maybe two)
>
> I've CC'ed akpm and Axboe. I think they are the only ones knowing enough about
> the code to see an obvious error and even fixing the bug?!
>
> Do you agree? Does anyone else agree? Or disagree?

Few points:

 - 2.4.22 is going to be a short release, meaning we will have this
   bug fixed soon in a final release.
 - the bug is around for quite some time now, its not very critical.
 - its -rc stage.

Moreover, -rc5 is already out.

I will work with Jens, Axboe and Andrea to get this properly fixed in .22
in case Andrea patch is not OK.



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 2.4.21-rc4] Fix oom killer braindamage
  2003-05-27 19:31     ` Marc-Christian Petersen
  2003-05-27 19:34       ` Marcelo Tosatti
@ 2003-05-27 19:34       ` Jens Axboe
  1 sibling, 0 replies; 11+ messages in thread
From: Jens Axboe @ 2003-05-27 19:34 UTC (permalink / raw)
  To: Marc-Christian Petersen; +Cc: Marcelo Tosatti, linux-kernel, Andrew Morton

On Tue, May 27 2003, Marc-Christian Petersen wrote:
> On Tuesday 27 May 2003 21:18, Marc-Christian Petersen wrote:
> 
> Hi again ^3 ;)
> 
> > > Not suitable for -rc. Btw, -rc5 is already at bkbits.net.
> Please, if there is any chance we can fix the pause/stop bug, delay .21 final 
> for some hours or a day (or maybe two)
> 
> I've CC'ed akpm and Axboe. I think they are the only ones knowing enough about 
> the code to see an obvious error and even fixing the bug?!
> 
> Do you agree? Does anyone else agree? Or disagree?

I have to agree with Marcelo, nothing in ll_rw_blk is obvious enough to
just be changed at will in -rc5 time.

I need to catch up with this thread, hopefully we can get things fixed
around 2.4.22-early.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 2.4.21-rc4] Fix oom killer braindamage
  2003-05-27 19:34       ` Marcelo Tosatti
@ 2003-05-27 19:46         ` Marc-Christian Petersen
  0 siblings, 0 replies; 11+ messages in thread
From: Marc-Christian Petersen @ 2003-05-27 19:46 UTC (permalink / raw)
  To: Marcelo Tosatti; +Cc: linux-kernel, Andrew Morton, Jens Axboe

On Tuesday 27 May 2003 21:34, Marcelo Tosatti wrote:

Hi Marcelo,

>  - 2.4.22 is going to be a short release, meaning we will have this
>    bug fixed soon in a final release.
>  - the bug is around for quite some time now, its not very critical.
>  - its -rc stage.
k.

> I will work with Jens, Axboe and Andrea to get this properly fixed in .22
> in case Andrea patch is not OK.
great. Just remember: fix-pausing-2 fix does _not_ fix the pauses/stops/mouse 
is dead/keyboard is dead/ problem. It fixes the "process stuck in D state" 
problem.

Please bear it in mind.

ciao, Marc


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 2.4.21-rc4] Fix oom killer braindamage
  2003-05-27 19:31       ` Marcelo Tosatti
@ 2003-05-28 22:14         ` Pavel Machek
  0 siblings, 0 replies; 11+ messages in thread
From: Pavel Machek @ 2003-05-28 22:14 UTC (permalink / raw)
  To: Marcelo Tosatti; +Cc: Marc-Christian Petersen, linux-kernel

Hi!

> > > > Not suitable for -rc. Btw, -rc5 is already at bkbits.net.
> > BTW: This breaks _nothing_. It _fixes_ an annoying bug! ;)
> 
> You're not completly sure it doesnt break nothing. MM/VM can be reallly
> subtle and nasty at times.

OOM killer is nor subtle nor nasty. And not normally used. That patch
really should be safe.
								Pavel
-- 
When do you have a heart between your knees?
[Johanka's followup: and *two* hearts?]

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2003-05-28 22:01 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-05-27 19:05 [PATCH 2.4.21-rc4] Fix oom killer braindamage Marc-Christian Petersen
2003-05-27 19:12 ` Marcelo Tosatti
2003-05-27 19:18   ` Marc-Christian Petersen
2003-05-27 19:28     ` Marc-Christian Petersen
2003-05-27 19:31       ` Marcelo Tosatti
2003-05-28 22:14         ` Pavel Machek
2003-05-27 19:31     ` Marc-Christian Petersen
2003-05-27 19:34       ` Marcelo Tosatti
2003-05-27 19:46         ` Marc-Christian Petersen
2003-05-27 19:34       ` Jens Axboe
2003-05-27 19:20 ` William Lee Irwin III

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox