< prev index next >
src/hotspot/share/gc/shared/taskTerminator.hpp
Print this page
@@ -20,12 +20,12 @@
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/
-#ifndef SHARE_GC_SHARED_OWSTTASKTERMINATOR_HPP
-#define SHARE_GC_SHARED_OWSTTASKTERMINATOR_HPP
+#ifndef SHARE_GC_SHARED_TASKTERMINATOR_HPP
+#define SHARE_GC_SHARED_TASKTERMINATOR_HPP
#include "memory/allocation.hpp"
#include "runtime/mutex.hpp"
#include "runtime/thread.hpp"
@@ -34,25 +34,27 @@
class TaskQueueSetSuper;
class TerminatorTerminator;
/*
- * Provides a task termination protocol. OWST stands for Optimized Work Stealing Threads
+ * Provides a task termination protocol.
*
- * This is an enhanced implementation of Google's work stealing task termination
- * protocol, which is described in the paper:
+ * This is an enhanced implementation of Google's OWST work stealing task termination
+ * protocol (OWST stands for Optimized Work Stealing Threads).
+ *
+ * It is described in the paper:
* "Wessam Hassanein. 2016. Understanding and improving JVM GC work
* stealing at the data center scale. In Proceedings of the 2016 ACM
* SIGPLAN International Symposium on Memory Management (ISMM 2016). ACM,
* New York, NY, USA, 46-54. DOI: https://doi.org/10.1145/2926697.2926706"
*
* Instead of a dedicated spin-master, our implementation will let spin-master relinquish
* the role before it goes to sleep/wait, allowing newly arrived threads to compete for the role.
* The intention of above enhancement is to reduce spin-master's latency on detecting new tasks
* for stealing and termination condition.
*/
-class OWSTTaskTerminator : public CHeapObj<mtGC> {
+class TaskTerminator : public CHeapObj<mtGC> {
uint _n_threads;
TaskQueueSetSuper* _queue_set;
DEFINE_PAD_MINUS_SIZE(0, DEFAULT_CACHE_LINE_SIZE, 0);
volatile uint _offered_termination;
@@ -79,15 +81,15 @@
// Perform spin-master task.
// Return true if termination condition is detected, otherwise return false
bool do_spin_master_work(TerminatorTerminator* terminator);
- NONCOPYABLE(OWSTTaskTerminator);
+ NONCOPYABLE(TaskTerminator);
public:
- OWSTTaskTerminator(uint n_threads, TaskQueueSetSuper* queue_set);
- ~OWSTTaskTerminator();
+ TaskTerminator(uint n_threads, TaskQueueSetSuper* queue_set);
+ ~TaskTerminator();
// The current thread has no work, and is ready to terminate if everyone
// else is. If returns "true", all threads are terminated. If returns
// "false", available work has been observed in one of the task queues,
// so the global task is not complete.
@@ -115,7 +117,6 @@
static uint total_peeks() { return _total_peeks; }
static void print_termination_counts();
#endif
};
-
-#endif // SHARE_GC_SHARED_OWSTTASKTERMINATOR_HPP
+#endif // SHARE_GC_SHARED_TASKTERMINATOR_HPP
< prev index next >