mapleFU commented on issue #1727:
URL:
https://github.com/apache/incubator-brpc/issues/1727#issuecomment-1081617512
> Why put `bthread_flush()` to src/bthread/unstable.h?
>
> Under what conditions `NOSIGNAL` is he better? Are there any experimental
data?
@renguoqing
I'm not a brpc committer, So I don't know why `bthread_flush` is unstable.
And our program will call `bthread_flush` in some conditions, so we think
it's safe to using `nosignal` here. It may make latency grow a little, but it
works well in our program.
We change `no_signal` as a gflag, and we can sampling it, like:
```
if (FLAG_no_signal_sample != 1 && fastrand() < FLAG_no_signal_sample) {
// mark nosignal
}
```
`FLAG_no_signal_sample`'s default value is 1. So in most case it will not
work. We will adjust it until it take less time on `do_futex` and still have
low latency.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]