lkml.org 
[lkml]   [1999]   [Mar]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: vfork: out of memory, when there's plenty of swap free


On Sun, 14 Mar 1999, Andrea Arcangeli wrote:

> On Sun, 14 Mar 1999, Gerard Roudier wrote:
>
> >And I donnot want from the part to have to guess as memory is handled by
> >the kernel.
>
> If so don't write kernel code ;).

Hmmm ... My concern is not to write _spaghetti_ code, whatever it is
kernel code or not. I want to use cleanly and clearly exported interfaces
and to also provide cleanly and clearly exported interfaces.

Btw, I probably was writing and maintaining kernel code (drivers and ACPs
under VAX/VMS) when you were still sucking bottles. ;-)

And most of the application code I wrote these last 10 years is still
used in our products. My experience is that it generally just runs 5 to
100 times faster than equivalent code written with some bad modern
approach and occupies in average 2 to 10 times less memory. Btw, 30 % of
my work is to rewrite recent broken code into correct code so that it will
really work and be maintainable (evolutive) for a long-time.

> >I may want to defrag for the system to perform better, but I donnot want
> >to be required to defrag for the system to work.
>
> RAM is not a disk. Seek time is zero (a part the L1/L2 cache issues), so
> the _only_ reason to defrag the memory is to make the system to work and
> avoid to fail-and-try-leather.

Who talk about disks?

> >is working fine when it just close to die at any time. So, I do prefer a
> >system that does not require a defragmentor in order to just work.
>
> Simply never request more than 1 page of contiguous space and you'll work
> fine just now. If you are worried by the stack (never harmed here) just
> vmalloc if get_free_pages fails and change the drivers that will use the

I will never wrote anything that explicitely "vmalloc if get_free_pages
failed", except in something that belongs to the VM, because it is just
broken design and shit code to rely on that from any other part than the
VM under Linux.

> stack to do DMA on it. Or if you have plenty of ram you only need to
> statically alloc 4mbyte for the stacks of 512 tasks and don't use the VM
> at all to provide a stack to a process.

What another strange and stupid idea ...

Implementing every idea that comes to your mind within the minute, is the
right approach to break everything. It seems to me that there is a long
way for you to learn how programs must be designed and implemented.

Regards,
Gérard.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:50    [from the cache]
©2003-2011 Jasper Spaans