This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Improve random memcpy benchmark
- From: Wilco Dijkstra <Wilco dot Dijkstra at arm dot com>
- To: Paul Clarke <pc at us dot ibm dot com>, 'GNU C Library' <libc-alpha at sourceware dot org>
- Date: Tue, 11 Feb 2020 18:32:43 +0000
- Subject: Re: [PATCH] Improve random memcpy benchmark
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=MKS5pAHQM3nEFRxL8vIpSjgBXmuiG3mvgd2SvCxCDdE=; b=T/NKqC2udKp8e1mYqNUEgWZwwEq+bJdJGlqaYwqhXmIioOqBIM4EGyqQqm2ezFlMbk0m7GBfOj6QQwVrO8wZGBYHZ/VtAmjZjX3OOANzuJUqdAsZQRlnkuU5rlv07c/O/0lue2o4asHtMLUyG6TTwcrugcyF6JaH4nlitbEKDNeXmmbR21m/oR0LRxC55Sue6embAayTEs4UkQPKoSHs+K6EgVgIGEBjyeVMtIstroVqWFDKrxYUG4ptoB2uyYgvisDdiGbdHzfQxPxRe9KkSayy//Pv0AM1AP2g1V5cSprPOWXb8J6w5+FQCucmZWPRt3eD1AUiUYN5mFDgyWIsag==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NVM+P2StSSv+e81TKL0cwGjf8I9Z+j3hTpIldX2XRIIap6YFD30KWUYIzdUpg/dEF0ttfny1zWDwFO07uVBdr6tHr4tY+kuIG6Lk5LkhiMi1li1c7XTqKeDrAqLX1gTHPhGUe2R94n2dwC5crtbcI1UzlGVNzuElwB4g325Rde+exO0sw50uOQ2T6uaDJvUPXjzC4zjBlxF9Wn+cEuC3rRXM7SE/BpjgTOfZ8hacZcLNvvVrYndypL5HFSvROKiWVdO/ifZEKj0mw4DHeMU77s6XbKEVCGDfDq88lPlR5//2u9f1eMxt/uYGkiT5S0hzjTMpLXEyG6mzS6hh7ACaYw==
- Original-authentication-results: spf=none (sender IP is ) smtp.mailfrom=Wilco dot Dijkstra at arm dot com;
- References: <AM5PR0801MB2035060A16DE804C88C3AB5083190@AM5PR0801MB2035.eurprd08.prod.outlook.com>,<0f5db76f-2520-0409-86ea-1f2932b30ba5@us.ibm.com>
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