This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Improve random memcpy benchmark


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]