bdflush 中文man页面

系统
bdflush 被用来启动核心守护进程将内存中的dirty缓存写到磁盘上。真正清洁工作是一个核心程序完成的。 bdflush实际上只是派生出一个新的进程调用这个永远不会返回的核心程序。

NAME

bdflush - 将dirty缓存写回到磁盘的核心守护进程。  

总览(SYNOPSIS)

bdflush [opt]  

描述(DESCRIPTION)

bdflush 被用来启动核心守护进程将内存中的dirty缓存写到磁盘上。真正清洁工作是一个核心程序完成的。 bdflush实际上只是派生出一个新的进程调用这个永远不会返回的核心程序。

bdflush 实际上也派生出第二个守护进程,这个进程实际上象一个传统的更新程序,除了那些缓存在变化了一个位前不会被考虑用来进行写操作。当缓存的dirty位被置位时,时钟开始计时。当经过一定的时间间隔后,缓存将会被写回到磁盘上。对于数据缓存和位元数据缓存(比如目录,位图,间接区块等等)来说,时间间隔是不同的。当你在运行bdflush时使用了一些命令行参数的时候,当前一些配置会显示在屏幕上。数据缓存刷新间隔的默认值是30秒,位元数据是5秒。

在正常情况下,两个守护进程使用/etc/rc下的一个

/sbin/update

命令来执行。值得注意的是你需要让这个两个守护进程同时运行,因为每个守护进程都有其作用。同时也要注意这个命令需要在任何主I/O设备运行前执行。需要特别说明的是,在对文件系统使用fsck命令检查前或者将文件系统激活为读写模式前应该调用update这个命令。

当bdflush被一个没有超级权限的用户执行时,它就会调用flush和sync函数,然后退出。千万不要同时运行20 个update守护进程……

“命令行选项”(COMMAND-LINE OPTIONS)

-d
显示核心参数。使用这个选项可以防止守护进程的运行。
-h
打印出使用方法(帮助)。
-s
如果bdflush的默认为以前的update方法,就经常性的调用sync。默认值:30秒。
-f
经常性的调用flush。默认值:5秒。
-0
检测dirty缓存区块时使用LRU算法的最大块。
-1
bdflush激活时需要写到磁盘上的最大dirty缓存数量。
-2
将clean缓存挂到标志着空闲队列的refill_freelist列表上的数字标识。
-3
在refill_freelist队列中激活bdflush的dirty区块临界值。
-4
查询空闲簇所使用的缓存百分比。
-5
数据缓存在刷新前的可更新时间。
-6
非数据(目录,位图等等)缓存在刷新前可更新时间。
-7
快速缓存调用平均持续时间。
-8
LAV比率(用来决定缓存更迭的临界值)

作者(AUTHOR)

bdflush 是由Eric Youngdale <ericy@gnu.ai.mit.edu>编写. 主要目的是提高核心刷新dirty缓存的灵活性,并且增加了缓存集群技术。其他的作者还有Phil Bostley <bostley@cs.colorado.edu> 和 Daniel Quinlan <quinlan@yggdrasil.com>.  

缺陷(BUGS)

如果有的话,那一定是在核心代码中。

#p#

NAME

bdflush - start, flush, or tune buffer-dirty-flush daemon  

SYNOPSIS

int bdflush(int func, long *address);
int bdflush(int func, long data);

DESCRIPTION

bdflush starts, flushes, or tunes the buffer-dirty-flush daemon. Only the super-user may call bdflush.

If func is negative or 0, and no daemon has been started, then bdflush enters the daemon code and never returns.

If func is 1, some dirty buffers are written to disk.

If func is 2 or more and is even (low bit is 0), then address is the address of a long word, and the tuning parameter numbered (func-2)/2 is returned to the caller in that address.

If func is 3 or more and is odd (low bit is 1), then data is a long word, and the kernel sets tuning parameter numbered (func-3)/2 to that value.

The set of parameters, their values, and their legal ranges are defined in the kernel source file fs/buffer.c.  

RETURN VALUE

If func is negative or 0 and the daemon successfully starts, bdflush never returns. Otherwise, the return value is 0 on success and -1 on failure, with errno set to indicate the error.  

ERRORS

EPERM
Caller is not super-user.
EFAULT
address points outside your accessible address space.
EBUSY
An attempt was made to enter the daemon code after another process has already entered.
EINVAL
An attempt was made to read or write an invalid parameter number, or to write an invalid value to a parameter.

CONFORMING TO

bdflush is Linux specific and should not be used in programs intended to be portable.  

SEE ALSO

fsync(2), sync(2), update(8), sync(8)

责任编辑:韩亚珊 来源: http://cmpp.linuxforum.net
相关推荐

2011-08-24 16:48:36

man中文man

2011-08-15 10:21:09

man中文man

2011-08-11 16:11:49

at中文man

2011-08-25 10:21:56

man.conf中文man

2011-11-01 13:46:50

中文mantac

2011-08-25 16:55:26

gets中文man

2011-08-25 15:49:02

freopen中文man

2011-08-25 16:00:56

fflush中文man

2011-08-25 16:08:55

fsetpos中文man

2011-08-25 15:33:18

exit中文man

2011-08-25 10:55:37

services中文man

2011-08-25 09:35:26

units中文man

2011-08-24 13:57:35

DECLARE中文man

2011-08-11 15:28:43

ali中文man

2011-08-23 17:24:11

userdel中文man

2011-08-23 17:33:22

rdev中文man

2011-08-23 18:05:21

ABORT中文man

2011-08-18 19:15:25

group中文man

2011-08-23 10:48:03

exportfs中文man

2011-08-15 14:25:41

testparm中文man
点赞
收藏

51CTO技术栈公众号