Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emulab
emulab-stable
Commits
7a8bda2d
Commit
7a8bda2d
authored
Oct 15, 2001
by
Chad Barb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Took out extra (per MB) verbosity, as per Mike's request.
parent
85b512e7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
3 deletions
+26
-3
os/frisbee/f_chunker.c
os/frisbee/f_chunker.c
+19
-1
os/frisbee/fromage.c
os/frisbee/fromage.c
+7
-2
No files found.
os/frisbee/f_chunker.c
View file @
7a8bda2d
...
...
@@ -100,7 +100,9 @@ static int getOrAllocBufferSlotForMB( BufferSlot ** returnPointer, int mb )
slots
[
i
].
gotCount
=
0
;
bzero
(
slots
[
i
].
gotBitmap
,
1024
);
*
returnPointer
=
&
(
slots
[
i
]);
/*
printf("Chunker: Starting MB %i (in slot %i)\n", mb, i );
*/
return
1
;
}
}
...
...
@@ -215,11 +217,15 @@ int c_suggestK()
if (!slots[i].gotBitmap[j]) {
if (lastMessage != 1) {
if (lastMessageCount) {
/*
printf("ChunkerSK: Last ChunkerSK message repeated %i times.\n",
lastMessageCount );
*/
lastMessageCount = 0;
}
/*
printf("ChunkerSK: Suggesting kb from existing MB...\n");
*/
lastMessage = 1;
} else {
lastMessageCount++;
...
...
@@ -252,8 +258,10 @@ int c_suggestK()
if
(
allDone
)
{
if
(
lastMessageCount
)
{
/*
printf("ChunkerSK: Last chunkerSK message repeated %i times.\n",
lastMessageCount );
*/
lastMessageCount
=
0
;
}
printf
(
"ChunkerSK: No incomplete MB's - done.
\n
"
);
...
...
@@ -268,11 +276,15 @@ int c_suggestK()
but we cannot (or choose not to) deal with data. */
if
(
lastMessage
!=
3
)
{
if
(
lastMessageCount
)
{
/*
printf("ChunkerSK: Last chunkerSK message repeated %i times.\n",
lastMessageCount );
*/
lastMessageCount
=
0
;
}
/*
printf("ChunkerSK: Buffer too full to recommend chunks.\n", i);
*/
lastMessage
=
3
;
}
else
{
lastMessageCount
++
;
...
...
@@ -305,11 +317,15 @@ int c_suggestK()
/* found it. */
if
(
lastMessage
!=
2
)
{
if
(
lastMessageCount
)
{
/*
printf("ChunkerSK: Last chunkerSK message repeated %i times.\n",
lastMessageCount );
*/
lastMessageCount
=
0
;
}
/*
printf("ChunkerSK: Suggesting a new MB (%i)...\n", i);
*/
lastMessage
=
2
;
}
else
{
lastMessageCount
++
;
...
...
@@ -369,7 +385,9 @@ void c_finishedM( uint mb )
for
(
i
=
0
;
i
<
BufferSlotCount
;
i
++
)
{
if
(
slots
[
i
].
mb
==
mb
)
{
printf
(
"Chunker: Finishing MB %i (in slot %i)
\n
"
,
mb
,
i
);
/*
printf("Chunker: Finished MB %i (in slot %i)\n", mb, i );
*/
slots
[
i
].
mb
=
-
1
;
return
;
}
...
...
os/frisbee/fromage.c
View file @
7a8bda2d
...
...
@@ -102,8 +102,10 @@ static int frisbee_port;
void
frisbeeEndChunk
()
{
/*
printf("frisbeeEndChunk(): ending chunk, read %i bytes into it. xyz\n",
frisbeeIndexIntoCurrentChunk );
*/
frisbeeIndexIntoCurrentChunk
=
0
;
frisbee_data
=
NULL
;
}
...
...
@@ -193,7 +195,9 @@ void * frisbee_thread( void *arg )
/* either we havent given the consumer data yet, or they're done */
if
(
lastChunkId
!=
0xFFFFFFFF
)
{
/* they're done with a piece we gave them */
/*
printf("frisbee_thread: Unlocking chunk %i. xyz\n", lastChunkId );
*/
frisbeeUnlockReadyChunk
(
lastChunkId
);
lastChunkId
=
0xFFFFFFFF
;
}
...
...
@@ -322,7 +326,7 @@ main(int argc, char **argv)
gettimeofday
(
&
estamp
,
0
);
estamp
.
tv_sec
-=
stamp
.
tv_sec
;
printf
(
"
\n\n
Done,
in %ld seconds!
[v5]
\n\n
"
,
estamp
.
tv_sec
);
printf
(
"
\n\n
[=)] Frisbee completed
in %ld seconds!
\n\n
"
,
estamp
.
tv_sec
);
return
0
;
}
...
...
@@ -338,8 +342,9 @@ inflate_subblock(void)
off_t
offset
,
size
;
char
buf
[
DEFAULTREGIONSIZE
];
/*
printf("Inflate subblock called...\n");
*/
d_stream
.
zalloc
=
(
alloc_func
)
0
;
d_stream
.
zfree
=
(
free_func
)
0
;
d_stream
.
opaque
=
(
voidpf
)
0
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment