Re: Prezeroing V2 [0/3]: Why and When it works

From: Christoph Lameter (clameter_at_sgi.com)
Date: 12/24/04

  • Next message: Christoph Lameter: "Re: Prezeroing V2 [2/4]: add second parameter to clear_page() for all arches"
    Date:	Fri, 24 Dec 2004 08:17:07 -0800 (PST)
    To: Linus Torvalds <torvalds@osdl.org>
    
    

    On Thu, 23 Dec 2004, Linus Torvalds wrote:

    > So if we make the "what load is considered low" tunable, a system
    > administrator can use that to make it more aggressive. And indeed, you
    > might have a cron-job that says "be more aggressive at clearing pages
    > between 2AM and 4AM in the morning" or something - if you have so much
    > memory that it actually matters if you clear the memory just occasionally.
    >
    > And the tunable load-average check has another advantage: if you want to
    > benchmark it, you can first set it to true zero (basically never), and run
    > the benchmark, and then you can set it to something very agressive ("clear
    > pages every five seconds regardless of load") and re-run.
    >
    > Does this sound sane? Christoph - can you try making the "scrub deamon" do
    > that? Instead of the "scrub-low" and "scrub-high" (or in _addition_ to
    > them), do a "scub-load" thing that takes a scaled integer, and compares it
    > with "avenrun[0]" in kernel/timer.c: calc_load() when the average is
    > updated every five seconds..

    Sure V3 will have that. So far the impact of zeroing is quite minimal
    on IA64 (even without using hardware), the big zeroing happens immediately
    after activating it anyways. I have not seen any measurable effect on
    benchmarks even with 4G allocations on a 6G machine.

    > Personally, at least for a desktop usage, I think that the load average
    > would work wonderfully well. I know my machines are often at basically
    > zero load, and then having low-latency zero-pages when I sit down sounds
    > like a good idea. Whether there is _enough_ free memory around for a
    > 5-second thing to work out well, I have no idea..

    The CPU can do a couple of Gigs of zeroing per second per CPU and the
    zeroing zeros local RAM. On my 6G machine with 8 Cpus it can only
    take a fraction of a second to zero all RAM.

    Merry Christmas, I am off till now next year. SGI mandatory holiday
    shutdown so all addicts have to go cold turkey ;-)

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


  • Next message: Christoph Lameter: "Re: Prezeroing V2 [2/4]: add second parameter to clear_page() for all arches"

    Relevant Pages

    • Re: What is the advantage of malloc over calloc
      ... allocated memory, which may or may not be an advantage. ... Keep in mind that zeroing memory won't necessarily do anything useful ... for pointers or floating-point objects. ... machines where null pointers have zero bytes - will likely break ...
      (comp.lang.c)
    • Re: Prezeroing V2 [0/3]: Why and When it works
      ... That's the page zeroing. ... memory that is zeroed. ... The other point is that having the page hot in the cache may well be a ... establishes a cache line in modified state with zero contents without ...
      (Linux-Kernel)
    • Prezeroing V2 [0/3]: Why and When it works
      ... Use node specific variables instead of cpu specific ... locking overhead) the zeroing of the page. ... Others have also thought that prezeroing could be a benefit and have tried ... these pages are thus already in the cache. ...
      (Linux-Kernel)
    • Re: [PATCH] 2/2 Prezeroing large blocks of pages during allocation
      ... This means we rarely win with zeroing in the allocator but the ... >> ordering for USERZERO has a tendency to clobber the reserved lists because ... My approach is to ignore zero pages during free/coalescing and to treat ...
      (Linux-Kernel)
    • Prezeroing V3 [0/4]: Discussion and i386 performance tests
      ... under high loads is to slow the system down even further since zeroing ... Memory subsystems are typically optimized for linear accesses ... Others have also thought that prezeroing could be a benefit and have tried ... are thus already in the cpu caches. ...
      (Linux-Kernel)