* [patch] hackbench: flush buffers before fork
@ 2008-06-23 17:43 Nathan Lynch
2008-06-23 17:52 ` Ingo Molnar
0 siblings, 1 reply; 2+ messages in thread
From: Nathan Lynch @ 2008-06-23 17:43 UTC (permalink / raw)
To: Ingo Molnar; +Cc: linux-kernel, yanmin_zhang
Here's a fixlet for the hackbench program found at
http://people.redhat.com/mingo/cfs-scheduler/tools/hackbench.c
When redirecting hackbench output I am seeing multiple copies of the
"Running with %d*40 (== %d) tasks" line. Need to flush the buffered
output before forking.
diff --git a/hackbench.c b/hackbench.c
index 7b90840..e830461 100644
--- a/hackbench.c
+++ b/hackbench.c
@@ -321,6 +321,8 @@ int main(int argc, char *argv[])
printf("Running with %d*40 (== %d) tasks.\n",
num_groups, num_groups*40);
+ fflush(NULL);
+
if (argc > 2) {
if ( !strcmp(argv[2], "process") )
process_mode = 1;
--
1.5.4.rc5.5.gab98
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [patch] hackbench: flush buffers before fork
2008-06-23 17:43 [patch] hackbench: flush buffers before fork Nathan Lynch
@ 2008-06-23 17:52 ` Ingo Molnar
0 siblings, 0 replies; 2+ messages in thread
From: Ingo Molnar @ 2008-06-23 17:52 UTC (permalink / raw)
To: Nathan Lynch; +Cc: linux-kernel, yanmin_zhang
* Nathan Lynch <ntl@pobox.com> wrote:
> Here's a fixlet for the hackbench program found at
>
> http://people.redhat.com/mingo/cfs-scheduler/tools/hackbench.c
>
> When redirecting hackbench output I am seeing multiple copies of the
> "Running with %d*40 (== %d) tasks" line. Need to flush the buffered
> output before forking.
thanks Nathan, applied.
Ingo
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-06-23 17:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-23 17:43 [patch] hackbench: flush buffers before fork Nathan Lynch
2008-06-23 17:52 ` Ingo Molnar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox