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:
parent
582628fb71
commit
3afce36dd4
2 changed files with 12 additions and 2 deletions
|
@ -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
|
||||
|
|
13
ircd/info.cc
13
ircd/info.cc
|
@ -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
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue