linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: Overcommit_memory logic fails when swap is off
@ 2005-04-05  8:49 Martin Egholm Nielsen
  2005-04-11 15:27 ` Alan Cox
  0 siblings, 1 reply; 6+ messages in thread
From: Martin Egholm Nielsen @ 2005-04-05  8:49 UTC (permalink / raw)
  To: linux-kernel

Hello there,

After 2½ year I stumbled over this thread:

> On Wed, 2002-08-21 at 13:23, Alan Cox wrote:
>> 2.5 propses including the ability to set the %age between the 0% of
>> mode 3, the 50 of mode 2 and upwards to things relevant in some
>> embedded system cases. So for 2.6 you will be able to tune it in
>> different ways according to precise understanding of workload.
> Alan, hch or someone asked if it would be possible to merge the 2.5 
> behavior into 2.4-ac ... are you interested or do you not want to 
> break compatibility?

> Note for "mode 2" the behavior is identical. For "mode 3" they would 
> also need to set vm_memory_ratio to "0".

> If you are willing, I'll send you a diff...
 > Robert Love
As I can see, the patch never made it in 2.4.x, right?!
So, I would like a diff - if still possible :-)

I know it's been a while, but I'm stuck with a 2.4 kernel for my 
embedded device and have problems with the OOM...

Best regards,
  Martin Egholm


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

* Re: Overcommit_memory logic fails when swap is off
  2005-04-05  8:49 Overcommit_memory logic fails when swap is off Martin Egholm Nielsen
@ 2005-04-11 15:27 ` Alan Cox
  2005-04-11 18:58   ` Martin Egholm Nielsen
  0 siblings, 1 reply; 6+ messages in thread
From: Alan Cox @ 2005-04-11 15:27 UTC (permalink / raw)
  To: Martin Egholm Nielsen; +Cc: Linux Kernel Mailing List

On Maw, 2005-04-05 at 09:49, Martin Egholm Nielsen wrote:
> As I can see, the patch never made it in 2.4.x, right?!
> So, I would like a diff - if still possible :-)

I submitted it ages ago but it was rejected and punted to 2.6. The 2.4
support is available in Red Hat Enterprise Linux 3, so you can pull it
out of the source rpms on the ftp site or out of Centos etc

Alan


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

* Re: Overcommit_memory logic fails when swap is off
  2005-04-11 15:27 ` Alan Cox
@ 2005-04-11 18:58   ` Martin Egholm Nielsen
  0 siblings, 0 replies; 6+ messages in thread
From: Martin Egholm Nielsen @ 2005-04-11 18:58 UTC (permalink / raw)
  To: linux-kernel

Hi Alan,

>>As I can see, the patch never made it in 2.4.x, right?!
>>So, I would like a diff - if still possible :-)
> I submitted it ages ago but it was rejected and punted to 2.6. The 2.4
> support is available in Red Hat Enterprise Linux 3, so you can pull it
> out of the source rpms on the ftp site or out of Centos etc
Bingo. I seem to have found what looks like it in:
linux-2.4.21-selected-ac-bits.patch
linux-2.4.21-tunable-overcommit.patch

But many of the other patches messes with mmap.c, as well :-), so I 
guess there is some tracking assignment ahead...

But nevertheless, thanks for pointing me to the source...

BR,
  Martin Egholm


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

* Re: Overcommit_memory logic fails when swap is off
  2002-08-21 18:04   ` Robert Love
@ 2002-08-21 18:53     ` Alan Cox
  0 siblings, 0 replies; 6+ messages in thread
From: Alan Cox @ 2002-08-21 18:53 UTC (permalink / raw)
  To: Robert Love; +Cc: josip, linux-kernel

On Wed, 2002-08-21 at 19:04, Robert Love wrote:
> Alan, hch or someone asked if it would be possible to merge the 2.5
> behavior into 2.4-ac ... are you interested or do you not want to break
> compatibility?
> 
> Note for "mode 2" the behavior is identical.  For "mode 3" they would
> also need to set vm_memory_ratio to "0".

Obvious thing to do would be to add the 2.5 feature once its in a Linus
released 2.5 and clearly stable, and make mode 2 mode 3 overwrite that
value when you set them the old way.

I'm happy for that


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

* Re: Overcommit_memory logic fails when swap is off
  2002-08-21 17:23 ` Alan Cox
@ 2002-08-21 18:04   ` Robert Love
  2002-08-21 18:53     ` Alan Cox
  0 siblings, 1 reply; 6+ messages in thread
From: Robert Love @ 2002-08-21 18:04 UTC (permalink / raw)
  To: Alan Cox; +Cc: josip, linux-kernel

On Wed, 2002-08-21 at 13:23, Alan Cox wrote:

> 2.5 propses including the ability to set the %age between the 0% of mode
> 3, the 50 of mode 2 and upwards to things relevant in some embedded
> system cases. So for 2.6 you will be able to tune it in different ways
> according to precise understanding of workload.

Alan, hch or someone asked if it would be possible to merge the 2.5
behavior into 2.4-ac ... are you interested or do you not want to break
compatibility?

Note for "mode 2" the behavior is identical.  For "mode 3" they would
also need to set vm_memory_ratio to "0".

If you are willing, I'll send you a diff...

	Robert Love


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

* Re: Overcommit_memory logic fails when swap is off
       [not found] <3D63C9DE.7479D2E9@icase.edu>
@ 2002-08-21 17:23 ` Alan Cox
  2002-08-21 18:04   ` Robert Love
  0 siblings, 1 reply; 6+ messages in thread
From: Alan Cox @ 2002-08-21 17:23 UTC (permalink / raw)
  To: josip; +Cc: linux-kernel

On Wed, 2002-08-21 at 18:11, Josip Loncaric wrote:
> Hello,
> 
> I've found some minor logic flaws in mmap.c::vm_enough_memory() which you may
> want to fix.  The problem is simple: overcommit_memory strategies "2" and "3"
> misbehave on machines operated without swap space.  Strategy "2" results in a
> very restrictive memory policy, while strategy "3" crashes the system because
> no memory can be allocated when total_swap_pages is zero.  May I suggest that

The behaviour it provides is correct and intentional. The documentation
is also quite plain on the fact you need swap for mode 3.

Since the kernel needs memory for its own purposes you cannot run
swapless with no overcommit and allow user space all of memory.

2.5 propses including the ability to set the %age between the 0% of mode
3, the 50 of mode 2 and upwards to things relevant in some embedded
system cases. So for 2.6 you will be able to tune it in different ways
according to precise understanding of workload.

As far as your hang goes I'd grab a standard 2.4.19 or 2.4.19-ac4 kernel
and try that.


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

end of thread, other threads:[~2005-04-12  6:53 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-04-05  8:49 Overcommit_memory logic fails when swap is off Martin Egholm Nielsen
2005-04-11 15:27 ` Alan Cox
2005-04-11 18:58   ` Martin Egholm Nielsen
     [not found] <3D63C9DE.7479D2E9@icase.edu>
2002-08-21 17:23 ` Alan Cox
2002-08-21 18:04   ` Robert Love
2002-08-21 18:53     ` Alan Cox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).