0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-27 07:54:05 +01:00

ircd::info: Get sysconf() for maximum AIO operations.

This commit is contained in:
Jason Volk 2018-12-18 15:17:21 -08:00
parent 582628fb71
commit 3afce36dd4
2 changed files with 12 additions and 2 deletions

View file

@ -52,6 +52,7 @@ namespace ircd::info
extern const int glibc_version[3];
extern const string_view glibc_version_str;
extern const int aio_max_ops;
extern const int aio_reqprio_max;
extern const size_t iov_max;
#ifdef HAVE_SYS_UTSNAME_H

View file

@ -77,13 +77,14 @@ ircd::info::dump()
// This message flashes posix information about the resource limits
log::debug
{
"AS=%lu DATA=%lu RSS=%lu NOFILE=%lu; RTTIME=%lu aio_reqprio_max=%d",
"AS=%lu DATA=%lu RSS=%lu NOFILE=%lu; RTTIME=%lu aio_max_ops=%d aio_reqprio_max=%d",
rlimit_as,
rlimit_data,
rlimit_rss,
rlimit_nofile,
rlimit_rttime,
aio_reqprio_max
aio_max_ops,
aio_reqprio_max,
};
}
@ -199,6 +200,14 @@ ircd::info::glibc_version_str
glibc_version[2])
);
decltype(ircd::info::aio_max_ops)
ircd::info::aio_max_ops
{
#ifdef _SC_AIO_MAX
int(syscall(::sysconf, _SC_AIO_MAX))
#endif
};
decltype(ircd::info::aio_reqprio_max)
ircd::info::aio_reqprio_max
{