Skip to content

Commit 2445098

Browse files
jtwarrenmeta-codesync[bot]
authored andcommitted
Rename thread hint native funcs
Reviewed By: mdko Differential Revision: D95477557 fbshipit-source-id: 4b6e3762a4cd55f70ce49e97fef1c3463edb0b92
1 parent 72edbc0 commit 2445098

2 files changed

Lines changed: 8 additions & 17 deletions

File tree

hphp/runtime/ext/server/ext_server.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -219,13 +219,13 @@ int64_t HHVM_FUNCTION(server_process_start_time) {
219219
return BootStats::startTimestamp();
220220
}
221221

222-
void HHVM_FUNCTION(enable_first_flush, int64_t hint) {
222+
void HHVM_FUNCTION(enable_thread_hint, int64_t hint) {
223223
if (!Cfg::Server::ScxThreadHintFirstFlushOverride) return;
224224
ThreadHint::getInstance().updateThreadHint(
225225
ThreadHint::Priority::FirstFlush);
226226
}
227227

228-
void HHVM_FUNCTION(disable_first_flush, int64_t hint) {
228+
void HHVM_FUNCTION(disable_thread_hint, int64_t hint) {
229229
if (!Cfg::Server::ScxThreadHintFirstFlushOverride) return;
230230
ThreadHint::getInstance().updateThreadHint(
231231
ThreadHint::Priority::Processing);
@@ -254,8 +254,8 @@ void ServerExtension::moduleRegisterNative() {
254254
HHVM_FALIAS(HH\\server_health_level, server_health_level);
255255
HHVM_FALIAS(HH\\server_uptime, server_uptime);
256256
HHVM_FALIAS(HH\\server_process_start_time, server_process_start_time);
257-
HHVM_FALIAS(HH\\Experimental\\enable_first_flush, enable_first_flush);
258-
HHVM_FALIAS(HH\\Experimental\\disable_first_flush, disable_first_flush);
257+
HHVM_FALIAS(HH\\Experimental\\enable_thread_hint, enable_thread_hint);
258+
HHVM_FALIAS(HH\\Experimental\\disable_thread_hint, disable_thread_hint);
259259
}
260260

261261
///////////////////////////////////////////////////////////////////////////////

hphp/runtime/ext/server/ext_server.php

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -227,28 +227,19 @@ function server_process_start_time(): int;
227227
namespace HH\Experimental {
228228

229229
/**
230-
* Hint to the kernel scheduler that the current thread is doing
231-
* latency-critical work (pre-first-flush). Call disable_first_flush()
232-
* when the critical section ends.
233-
*
234-
* Only effective when Server.ScxThreadHintFirstFlushOverride is enabled.
235-
* No-op otherwise.
230+
* Pass thread hint to hhvm thread scheduler to influence scheduling decisions.
236231
*
237232
* EXPERIMENTAL: This API is subject to change or removal.
238233
*/
239234
<<__Native>>
240-
function enable_first_flush(int $hint = 0): void;
235+
function enable_thread_hint(int $hint = 0): void;
241236

242237
/**
243-
* Remove the first-flush scheduling hint, returning the thread to
244-
* normal processing priority.
245-
*
246-
* Only effective when Server.ScxThreadHintFirstFlushOverride is enabled.
247-
* No-op otherwise.
238+
* Stop hinting to the hhvm thread scheduler to influence scheduling decisions.
248239
*
249240
* EXPERIMENTAL: This API is subject to change or removal.
250241
*/
251242
<<__Native>>
252-
function disable_first_flush(int $hint = 0): void;
243+
function disable_thread_hint(int $hint = 0): void;
253244

254245
} // namespace HH\Experimental

0 commit comments

Comments
 (0)