man kaio:没有手动输入 kaio

发布于 2024-08-29 06:15:23 字数 685 浏览 6 评论 0原文

我捆了一个过程,它们是如下的线。而且我想知道kaio的定义,但是kaio没有手动输入,请问能否得到定义?

/1:     kaio(AIOWRITE, 259, 0x3805B2A00, 8704, 0x099C9E000755D3C0) = 0
/1:     kaio(AIOWRITE, 259, 0x380CF9200, 14336, 0x099CC0000755D5B8) = 0
/1:     kaio(AIOWRITE, 259, 0x381573600, 8704, 0x099CF8000755D7B0) = 0
/1:     kaio(AIOWRITE, 259, 0x381ACA600, 8192, 0x099D1A000755D9A8) = 0
/1:     kaio(AIOWAIT, 0xFFFFFFFF7FFFD620)               = 4418032576
/1:             timeout: 600.000000 sec
/1:     kaio(AIOWAIT, 0xFFFFFFFF7FFFD620)               = 4418033080
/1:             timeout: 600.000000 sec
/1:     kaio(AIOWAIT, 0xFFFFFFFF7FFFD620)               = 4418033584
/1:             timeout: 600.000000 sec

I trussed a process, and they are lines as below. And I want to know the definition of kaio, but there is no manual entry for kaio, so whether can I get the definition?


/1:     kaio(AIOWRITE, 259, 0x3805B2A00, 8704, 0x099C9E000755D3C0) = 0
/1:     kaio(AIOWRITE, 259, 0x380CF9200, 14336, 0x099CC0000755D5B8) = 0
/1:     kaio(AIOWRITE, 259, 0x381573600, 8704, 0x099CF8000755D7B0) = 0
/1:     kaio(AIOWRITE, 259, 0x381ACA600, 8192, 0x099D1A000755D9A8) = 0
/1:     kaio(AIOWAIT, 0xFFFFFFFF7FFFD620)               = 4418032576
/1:             timeout: 600.000000 sec
/1:     kaio(AIOWAIT, 0xFFFFFFFF7FFFD620)               = 4418033080
/1:             timeout: 600.000000 sec
/1:     kaio(AIOWAIT, 0xFFFFFFFF7FFFD620)               = 4418033584
/1:             timeout: 600.000000 sec

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

流年里的时光 2024-09-05 06:15:23

来自一篇关于它的文章

kaio 的作用,顾名思义,是在内核内部实现异步 I/O,而不是通过用户线程在用户空间实现。 I/O 队列在操作系统中创建和管理。事件的基本顺序如下: 当应用程序调用 aioread(3) 或 aiowrite(3) 时,将进入相应的库例程。一旦进入,图书馆首先尝试通过 kaio 处理请求。执行 kaio 初始化例程,该例程创建一个“清理”线程,其目的是确保在异步 I/O 过程中不存在已分配但未释放的剩余内存段。完成后,将调用 kaio,此时将进行测试以确定所请求的 I/O 是否支持 kaio。

Kaio 被实现为可加载内核模块 /kernel/sys/kaio,并在第一次调用异步 I/O 时加载。您可以使用 modinfo(1M) 确定模块是否已加载:

fawlty> modinfo | grep kaio 
105 608c4000   2efd 178   1  kaio (kernel Async I/O) 
fawlty> 

From an article about it:

What kaio does, as the name implies, is implement async I/O inside the kernel rather than in user-land via user threads. The I/O queue is created and managed in the operating system. The basic sequence of events is as follows: When an application calls aioread(3) or aiowrite(3), the corresponding library routine is entered. Once entered, the library first tries to process the request via kaio. A kaio initialization routine is executed, which creates a "cleanup" thread, which is intended to ensure that there are no remaining memory segments that have been allocated but not freed during the async I/O process. Once that's complete, kaio is called, at which point a test is made to determine if kaio is supported for the requested I/O.

Kaio is implemented as a loadable kernel module, /kernel/sys/kaio, and is loaded the first time an async I/O is called. You can determine if the module is loaded or not with modinfo(1M):

fawlty> modinfo | grep kaio 
105 608c4000   2efd 178   1  kaio (kernel Async I/O) 
fawlty> 
慈悲佛祖 2024-09-05 06:15:23

我得到答案:

它是在文件 /usr/include/sys/syscall.h 中定义的

#define SYS_kaio                178
        /*
         * subcodes:
         *      aioread(...)    :: kaio(AIOREAD, ...)
         *      aiowrite(...)   :: kaio(AIOWRITE, ...)
         *      aiowait(...)    :: kaio(AIOWAIT, ...)
         *      aiocancel(...)  :: kaio(AIOCANCEL, ...)
         *      aionotify()     :: kaio(AIONOTIFY)
         *      aioinit()       :: kaio(AIOINIT)
         *      aiostart()      :: kaio(AIOSTART)
         *      see 
         */

I get the answer:

it's defined in file /usr/include/sys/syscall.h

#define SYS_kaio                178
        /*
         * subcodes:
         *      aioread(...)    :: kaio(AIOREAD, ...)
         *      aiowrite(...)   :: kaio(AIOWRITE, ...)
         *      aiowait(...)    :: kaio(AIOWAIT, ...)
         *      aiocancel(...)  :: kaio(AIOCANCEL, ...)
         *      aionotify()     :: kaio(AIONOTIFY)
         *      aioinit()       :: kaio(AIOINIT)
         *      aiostart()      :: kaio(AIOSTART)
         *      see 
         */
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文