Overcommit_memory logic fails when swap is off

Overcommit_memory logic fails when swap is off

Post by Alan Co » Fri, 23 Aug 2002 02:30:10




> 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.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

Overcommit_memory logic fails when swap is off

Post by Robert Lov » Fri, 23 Aug 2002 03:10:06



> 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

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

Overcommit_memory logic fails when swap is off

Post by Alan Co » Fri, 23 Aug 2002 04:00:07



> 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

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

1. RH7.1 upgrade fails - 7.0 rollback problem -> Activating Swap Partitions: Failed

Hello...

Upgrading to RedHat 7.1 failed due to lack of space but on restarting
with old 7.0, I get errors

"Activating swap partitions: failed"
"cannot stat /tmp/SWAP No such file of directory"

The /tmp/SWAP was created on the 7.1 installation - it had asked for
more swap space. The /tmp/SWAP does exist - using "stat" on /tmp/SWAP
gives some output.

TIA for any help /j-p.

2. help: need diskette device drivers for solaris2.4 for sparc

3. overcommit_memory speeds up???

4. PPP Setup

5. 2.4 kernel series and the oom_killer and /proc/sys/vm/overcommit_memory

6. Query on Display Driver for X Windows on LINUX Systems.

7. Am I better off switching to another video card--is the agp bus the problem

8. Books for Linuxppc

9. I am off to bed

10. Why am I using lots of swap with plenty of RAM free?

11. A little OT but I am running Linux off the DSL.

12. New: aty128fb.c fails to compile (logic error)

13. out of space when quota is off and df says I am at 49%