gpt4 book ai didi

linux - 什么是私有(private)页面?

转载 作者:太空宇宙 更新时间:2023-11-04 09:31:34 24 4
gpt4 key购买 nike

在页面结构中,有私有(private)字段。如果我使用 page_buffers() 函数,它们会返回该字段。

还有 PrivatePage()。但我不知道它是什么。

这是什么?

最佳答案

参见 include/linux/page-flags.h:

 * Private page markings that may be used by the filesystem that owns the page
* for its own purposes.
* - PG_private and PG_private_2 cause releasepage() and co to be invoked

还有 Documentation/filesystems/vfs.txt:

An address_space handler may attach extra information to a page, typically using the 'private' field in the 'struct page'. If such information is attached, the PG_Private flag should be set. This will cause various VM routines to make extra calls into the address_space handler to deal with that data.

page_buffers() 适用于 private 字段包含指向 struct buffer_head 的指针的特定情况,这是一种非常常见的模式在文件系统驱动程序中。

关于linux - 什么是私有(private)页面?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30842362/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com