[PATCH] Improve random memcpy benchmark

Wilco Dijkstra Wilco.Dijkstra@arm.com
Tue Feb 11 18:32:00 GMT 2020


Hi Paul,

> -#define MIN_PAGE_SIZE 131072
> +#define MIN_PAGE_SIZE (512*1024+4096)

> Is the above expected to be a multiple of the system page size?
> (Not all systems use 4096 byte pages or factors thereof).

It's just badly named. It's not even rounded up to a multiple of the
page size but I suppose mmap doesn't mind too much. The +4096
above isn't needed since the actual mmap call uses at least double
the requested size (2x MIN_PAGE_SIZE or 3x getpagesize()), which
is wrong too. 

It's something which still need to be cleaned up in the benchtests -
we should just have a macro with the memory size rather than
messing about with page sizes.

Cheers,
Wilco




More information about the Libc-alpha mailing list