0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-06-25 21:38:18 +02:00

ircd::fs::info: Attempt to get sysconf for AIO_MAX w/o exception.

ircd::fs::aio: Improve default max events values for now.
This commit is contained in:
Jason Volk 2020-06-05 16:32:22 -07:00
parent 58d15e6852
commit ffbfe40f0f
2 changed files with 4 additions and 2 deletions

View file

@ -45,7 +45,8 @@ ircd::fs::support::aio_fdsync
decltype(ircd::fs::aio::MAX_EVENTS)
ircd::fs::aio::MAX_EVENTS
{
128L //TODO: get this info
//TODO: device queue depth
std::min(info::aio_max, 64UL)
};
decltype(ircd::fs::aio::max_events)

View file

@ -927,7 +927,8 @@ decltype(ircd::info::aio_max)
ircd::info::aio_max
{
#ifdef _SC_AIO_MAX
0 //size_t(syscall(::sysconf, _SC_AIO_MAX))
// no syscall() wrapper; -1 becomes unlimited
size_t(::sysconf(_SC_AIO_MAX))
#endif
};