xkaraman left a comment (kamailio/kamailio#4363)
> In general it used to be a fallback to the best option available, like for
> sockets with epoll, poll, kpoll, select ... so as long as it is some
> indication in the defined flags (e.g., via `kamailio -v` or `kamailio -I`),
Of course, fallback to the best available that's good. but what i meant
consistency is about the reporting. One is using `futex` lock but still reports
both and the `aarch64` is using the `fast_lock` but reports both. So you can't
know which is the one being used actually.
Also this decision, is a compile time decision, so we can know from start which
ones are available and the decision should there. We don't need to define
multiple ones ie (both `USE_FUTEX` and `FAST_LOCK` and `PTHREAD_MUTEX`) and
then let code pick up the first. That's my belief at least.
Also, it might that my checks about the availability of each locks are not
enough. For example, is using `futex` lock method, available by only checking
if `linux/futex.h` only, or is something else needed as well?
> I see no problem to have different locks on different systems.
>
Absolutely agree. but we need the checks for all the supported systems right?
ie `aarch64` is not there in `make`, which i believe supports `futex`. correct
me if i am wrong.
> If falling back is not possible with cmake, maybe the priority can be set per
> CPU/OS.
This
[lock_methods.cmake](https://github.com/xkaraman/kamailio/blob/2f1c3d2447dcf860365314e6345b67dde68c0f94/cmake/lock_methods.cmake)
file proposed, actually does exactly that in first point. It detects in
configuration (even before compilation), which methods are currently available
for the platform, and then using the priority we defined, pick the best one
available.
> If the user wants to enforce an unavailable option, with some explicit
> configuration, then building can fail, but that should not be the behavior
> with the default configs for cmake.
Agree, i think cmake already fails in configuration currently, noting the
available methods.
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/4363#issuecomment-3334057129
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/4363/[email protected]>
_______________________________________________
Kamailio - Development Mailing List -- [email protected]
To unsubscribe send an email to [email protected]
Important: keep the mailing list in the recipients, do not reply only to the
sender!