是否可以基于文件句柄设置 io 调度优先级?
Linux 中打开的文件句柄可以设置 io 调度优先级吗? ionice 允许您为整个进程设置 io 优先级。例如,一个进程是否可以在一个文件句柄上具有空闲优先级,而在另一个文件句柄上具有正常优先级?或者,为了实现类似的功能,当从每个文件句柄进行读取时,我是否需要更改进程的 io 调度优先级?
Can open filehandles in linux have an io scheduling priority set on them? ionice allows you to set io priority for processes as a whole. Is it possible for a process to have, for example, idle priority on one filehandle but normal priority on another? Or, in order to implement something like this, would I need to be changing the processes' io scheduling priority as reads are made from each filehandle?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不认为直接存在。
Unix V6 内核(约 1978 年)会根据某些设备类型的特性和延迟长度将唤醒优先级设置为不同的值。如果该功能已转移到 Linux,那么也许可以利用它来达到您的目的。
否则,您必须根据您的目的修改内核。也许扩展 ioctl() 来设置一个具有每个文件调度偏差的新字段。
I don't think there is, directly.
The Unix V6 kernel (c. 1978) would set the wakeup priority to different values based on the characteristics of some device types, based on the length of delay. If that functionality has carried over to Linux, then maybe that could be exploited for your purposes.
Otherwise, you'd have to modify the kernel for your purposes. Perhaps extend
ioctl()
to set a new field with scheduling bias per file.