[PATCH 2/2] count: Remove unnecessary smp_mb() in code snippet

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>From edbd0adf8aafef3704b9059ae484ee44f2aa308e Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <akiyks@xxxxxxxxx>
Date: Mon, 22 May 2017 23:46:27 +0900
Subject: [PATCH 2/2] count: Remove unnecessary smp_mb() in code snippet

Reflect the fix made in commit 853027876a8c ("count_stat_eventual:
Remove unnecessary smp_mb()").

Signed-off-by: Akira Yokosawa <akiyks@xxxxxxxxx>
---
 count/count.tex | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/count/count.tex b/count/count.tex
index ae624c6..1b5b030 100644
--- a/count/count.tex
+++ b/count/count.tex
@@ -793,11 +793,10 @@ eventually consistent.
 45 void count_cleanup(void)
 46 {
 47   WRITE_ONCE(stopflag, 1);
-48   smp_mb();
-49   while (READ_ONCE(stopflag) < 3)
-50     poll(NULL, 0, 1);
-51   smp_mb();
-52 }
+48   while (READ_ONCE(stopflag) < 3)
+49     poll(NULL, 0, 1);
+50   smp_mb();
+51 }
 \end{verbbox}
 }
 \centering
@@ -826,7 +825,7 @@ summing the per-thread local \co{counter} and storing the
 sum to the \co{global_count} variable.
 The \co{eventual()} thread waits an arbitrarily chosen one millisecond
 between passes.
-The \co{count_cleanup()} function on lines~45-52 coordinates termination.
+The \co{count_cleanup()} function on lines~45-51 coordinates termination.
 
 This approach gives extremely fast counter read-out while still
 supporting linear counter-update performance.
-- 
2.7.4


--
To unsubscribe from this list: send the line "unsubscribe perfbook" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux