Re: O_DIRECT question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Nick Piggin <[email protected]> wrote:
> Aubrey wrote:
>> On 1/11/07, Nick Piggin <[email protected]> wrote:

>>> What you _really_ want to do is avoid large mallocs after boot, or use
>>> a CPU with an mmu. I don't think nommu linux was ever intended to be a
>>> simple drop in replacement for a normal unix kernel.
>> 
>> 
>> Is there a position available working on mmu CPU? Joking, :)
>> Yes, some problems are serious on nommu linux. But I think we should
>> try to fix them not avoid them.
> 
> Exactly, and the *real* fix is to modify userspace not to make > PAGE_SIZE
> mallocs[*] if it is to be nommu friendly.

IMO it's better to go back to a 16-bit segmented system like 80286 than
to artificially limit yourself to 12 bit memory chunks. Even if you don't
have segments, offering a DOS or old MacOS-like memory management
(allocating a fixed block on program start) is way better than "We want
to cache, no matter what it costs".

If you throw away the cache, maybe you'll be slow, but if you throw away
the application, you'll go backwards. If the cache is a problem, allocate
one block of cache, and everybody will be happy. Maybe it's oldscool, but
it works.

> It is the kernel hacks to do things
> like limit cache size that are the bandaids.

Limiting the cache is a feature, since it avoids constantly swapping out
e.g. X11's keyboard mouse routines just because you opened a large picture
in gimp*. Playing with the provided knobs did help for some cases, but I
didn't succeed for the serious cases, and I'm not the world's dumbest
computer user. Having a simple knob "don't grow larger than $num if you
have to evict programs, don't go below $num2" would be THE knob any joe
luser can understand and mostly DTRT or at least what you'd expect.



* I hope the vm_pps will help, but I did not yet read it's docs
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux