lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100130160242.6532fa81@infradead.org>
Date:	Sat, 30 Jan 2010 16:02:42 -0800
From:	Arjan van de Ven <arjan@...radead.org>
To:	Shawn Bohrer <shawn.bohrer@...il.com>
Cc:	linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...e.hu>,
	Peter Zijlstra <peterz@...radead.org>
Subject: Re: High scheduler wake up times

On Sat, 30 Jan 2010 17:45:51 -0600
Shawn Bohrer <shawn.bohrer@...il.com> wrote:
> 
> int main ()
> {
> 	int epfd = epoll_create(1);
> 	int i, j;
> 	struct timeval tv;
> 	unsigned long start, end;
> 	const unsigned int count = 60000;
> 
> 	while (1) {
> 		gettimeofday(&tv, NULL);
> 		start = tv.tv_sec * 1000000 + tv.tv_usec;
> 
> 		for (i = 0; i < count; ++i) {
> 			if (epoll_wait(epfd, 0, 1, 1) == -1)
> 				perror("epoll failed");
> 
> 			for (j = 0; j < 10000; ++j)
> 				/* simulate work */;
> 		}
> 		gettimeofday(&tv, NULL);
> 		end = tv.tv_sec * 1000000 + tv.tv_usec;
> 
> 		printf("Iterations Per Sec: %f\n",
> count/((double)(end - start)/1000000)); }
> 
> 	close(epfd);
> }

btw do you have an equivalent program that uses poll instead of epoll
by chance?

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ