Re: 7.52 second kernel compile

From: Erik Andersen (andersen@codepoet.org)
Date: Tue Mar 19 2002 - 00:24:57 EST


On Mon Mar 18, 2002 at 06:08:17PM -0800, Linus Torvalds wrote:
>
> On Mon, 18 Mar 2002, David S. Miller wrote:
> >
> > Or maybe the program is just flawed, and the interesting 1/8 pattern comes
> > from something else altogether.
> >
> > I think the weird Athlon behavior has to do with the fact that
> > you've made your little test program as much of a cache tester
> > as a TLB tester :-)
>
> Oh, I was assuming that malloc(BIG) would do a mmap() of MAP_ANONYMOUS,

Perhaps adding an explicit

    void *malloc(size_t size)
    {
        void *result = mmap((void *) 0, size + sizeof(size_t), PROT_READ | PROT_WRITE,
                MAP_PRIVATE | MAP_ANONYMOUS, 0, 0);
        if (result == MAP_FAILED)
            exit(EXIT_FAILURE);
        * (size_t *) result = size;
        return(result + sizeof(size_t));
    }

would ensure libc isn't trying to do something sneaky,

 -Erik

--
Erik B. Andersen             http://codepoet-consulting.com/
--This message was written using 73% post-consumer electrons--
-
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/



This archive was generated by hypermail 2b29 : Sat Mar 23 2002 - 22:00:17 EST