[ENBD] Doubled requests

Peter T. Breuer ptb at it.uc3m.es
Thu Jan 15 10:23:22 MST 2004


"Also sprach Arne Wiebalck:"
> On Thu, 15 Jan 2004, Peter T. Breuer wrote:
> 
> > However, I cannot detect ANY problem now. 1/300000, you say? Hmmm. I've
> > done about 600000 requests, of 1KB each. I'll switch on merge_requests.
> 
> Newest measurement: 10 twins in 9,216,000 requests (~ 1 in 900,000). this
> is approx. a factor 10 below what I measure without "-l".

I am still unable to see them. Yes, my measurements are shorter than
yours by about a factor of ten, but I would have expected to see
something by now.

Can you add to the file.c code the following (which I have, and which
I published yesterday on the group) in the fileit() routine, just above
the write() to disk:

        default:
         case WRITE: // 1
           DEBUG("+[%u@%Lu]", len, self->lastpoint);

+          if (1) {
+               // instrumentation
+               static u64 lastpoint = -1LL, point;
+               static int lastlen = -1;
+               point = seek(fd, 0LL, SEEK_CUR);
+               if (!(lastpoint+lastlen <= point || lastpoint >= point+len) ){
+                       PERR("two consecutive writes to the same place!\n");
+                       PERR("%#Lx-%#Lx and %#Lx-%Lx!\n",
+                               lastpoint, lastpoint+lastlen,
+                               point, point+len);
+               }
+               lastpoint = point;
+               lastlen = len;
+          }
+
           res = write(fd, buf, len);


and tell me if this makes any noise under your tests.

I also separated out the code paths for linear and striped and mirrored
modes, and I may have fixed something in doing so.

Peter


More information about the ENBD mailing list