Re: [tbench regression fixes]: digging out smelly deadmen.

Ilpo Järvinen
2008-10-31T10:42:50Z

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1471 bytes --]

On Fri, 31 Oct 2008, David Miller wrote:

> From: "Ilpo Järvinen" <ilpo.jarvinen@helsinki.fi>
> Date: Fri, 31 Oct 2008 11:40:16 +0200 (EET)
>
> > Let me remind that it is just a single process, so no ping-pong & other
> > lock related cache effects should play any significant role here, no? (I'm
> > no expert though :-)).
>
> Not locks or ping-pongs perhaps, I guess. So it just sends and
> receives over a socket, implementing both ends of the communication
> in the same process?

Effectively its this:

signal(SIGALRM, alarm_handler);
...
while (flag) { /* flagged by alarm_handler */
loops = 90
open & setup sockets & connection
while (--loops > 0) {
write(wr_fd, buf, size);
read(rd_fd, buf, size);
}
close sockets
}

where size comes from this array (advancing in the inner loop one by one):

static int sizes[] = {
1, 3, 5, 7, 16, 32, 64, 512, 1024, 2048, /* misc. sizes */
1, 3, 5, 7, 16, 32, 64, 512, 1024, 2048,
32, 32, 32, 32, 32, 32, /* x windows mostly... */
512, 512, 512, 512, 512, /* DBMS's mostly */
};

buf sits in the stack and is not initialized (besides reading into it).

...I think the rest is just bogus complexity :-) ...maybe I should just
take that from above as basis for Reduced AIM9 benchmark, it nearly
compiles already.

> If hash chain conflicts do happen for those 2 sockets, just traversing
> the chain 2 entries deep could show up.

No idea on this one.

--
i.