分类 操作系统 下的文章

关于树莓派SSH登录和输入卡顿的原因,各种说法都有,多数都说是dns的问题和GSSAPI的问题,试过了都不行,找到一个关于IPQoS 的方法,设置后解决了。

/etc/ssh/sshd_config最后追加

IPQoS cs0 cs0

IPQoS的解释
对应的服务 IPv4优先级/ EXP / 802.1P DSCP(二进制) DSCP(十进制) TOS(十六进制) 应用
BE 0 0 0 0 Internet
AF1 Green 1 1010 10 28 Leased Line
AF2 Green 2 10010 18 48 IPTV VOD
AF3 Green 3 11010 26 68 IPTV Broadcast
AF4 Green 4 100010 34 88 NGN/3G Singaling
EF 5 101110 46 B8 NGN/3G voice
CS6 6 110000 48 C0 Protocol
CS7 7 111000 56 E0 Protocol

 

1.下载并安装

curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube_1.5.2.deb \ && sudo dpkg -i minikube_1.5.2.deb

2.查看是否支持虚拟化

egrep -q 'vmx|svm' /proc/cpuinfo && echo yes || echo no

3.启动minikebe,需要网络下载

1)本地运行

sudo minikube start --vm-driver=none 2)使用vbox运行(不能使用root用户,vbox非不能用root)
minikube start --vm-driver=virtualbox 3)设置默认运行环境
sudo minikube config set vm-driver none
or
minikube config set vm-driver virtualbox

4)国内网络限制,使用aliyun的资源
minikube start --vm-driver=virtualbox --image-mirror-country=cn 
?  Ubuntu 18.04 上的 minikube v1.5.2
?  Tip: Use 'minikube start -p <name>' to create a new cluster, or 'minikube delete' to delete this one.
?  Starting existing virtualbox VM for "minikube" ...
⌛  Waiting for the host to be provisioned ...
⚠️  VM is unable to access k8s.gcr.io, you may need to configure a proxy or set --image-repository
?  正在 Docker '18.09.9' 中准备 Kubernetes v1.16.2…
?  Relaunching Kubernetes using kubeadm ... 
⌛  Waiting for: apiserver
?  完成!kubectl 已经配置至 "minikube"
?  为获得最佳结果,请安装 kubectl:https://kubernetes.io/docs/tasks/tools/install-kubectl/
4.查看状态minikube,连接ssh
key1088@key1088-Vostro-3459:~$ minikube status
host: Running
kubelet: Running
apiserver: Running
kubeconfig: Configured

key1088@key1088-Vostro-3459:~$ minikube ssh _ _ _ _ ( ) ( ) ___ ___ (_) ___ (_)| |/') _ _ | |_ __ /' _ ` _ `\| |/' _ `\| || , < ( ) ( )| '_`\ /'__`\ | ( ) ( ) || || ( ) || || |\`\ | (_) || |_) )( ___/ (_) (_) (_)(_)(_) (_)(_)(_) (_)`\___/'(_,__/'`\____)

$ exit

5.启动dashboard
添加PATH变量
export PATH=$PATH:$HOME/.minikube/cache/v1.16.2/ minikube dashboard

参考:https://minikube.sigs.k8s.io/docs/start/linux/

用C写了一个扫描类的监控程序,为了监控的实时性,所有要发送邮件。
前提机器中必须有sendmail程序,sendmail的目录自己定义。
我测试环境的信息

[root@localhost sendmail]# uname -a
Linux localhost.localdomain 2.6.32-358.el6.i686 #1 SMP Thu Feb 21 21:50:49 UTC 2013 i686 i686 i386 GNU/Linux
[root@localhost sendmail]# cat /etc/issue
CentOS release 6.4 (Final)
Kernel r on an m

代码如下,很简单只要是思路。

#include 
#include 
#include 
//借助sendmail命令发送邮件
//邮件格式如下:
/*
*From: John Doe 
*Sender: Michael Jones 
*To: Mary Smith 
*Subject: Saying Hello
*Date: Fri, 21 Nov 1997 09:55:06 -0600
*Message-ID: <1234@local.machine.example>
*
*This is a message just to say hello.
*So, "Hello".
*/
int main(void)
{
        FILE    *fp;
        char    buffer[512];
        if( (fp=popen("/usr/sbin/sendmail -t","w")) == NULL)
        {
                perror("open /usr/sbin/sendmail errorn");
                printf("%sn", strerror(errno));
        }
        fputs("From: John Doe n", fp);
        fputs("Sender: Michael Jones n", fp);
        fputs("To: key1088 n", fp);
        fputs("Subject: Hello,wordn", fp);
        fputs("Date: Fri, 21 Nov 1997 09:55:06 -0600n", fp);
        fputs("Message-ID: <1234@local.machine.example>n", fp);
        fputs("n", fp);
        fputs("This is a message just to say hello.n", fp);
        fputs("So, Hellon", fp);
        if( pclose(fp) != 0) {
                printf("send mail error.n");
                exit(1);
        }
        printf("send mail done.n");
}
[root@localhost sendmail]# cc sendmail.c
[root@localhost sendmail]# a.out
send mail done.
[root@localhost sendmail]# tail /var/log/maillog
Mar 16 15:43:45 localhost postfix/sendmail[2124]: fatal: Recipient addresses must be specified on the command line or via the -t option
Mar 16 15:47:33 localhost postfix/qmgr[1059]: 2B7F53F87B: from=, size=431, nrcpt=1 (queue active)
Mar 16 15:47:33 localhost postfix/qmgr[1059]: 667E83F89F: from=, size=431, nrcpt=1 (queue active)
Mar 16 15:47:33 localhost postfix/smtp[2130]: 2B7F53F87B: to=, relay=none, delay=1075, delays=1075/0.08/0/0, dsn=4.4.3, status=deferred (Host or domain name not found. Name service error for name=163.com type=MX: Host not found, try again)

因为测试环境没有联网,所以是发送不成功。

引用:http://en.wikipedia.org/wiki/Regular_expression

POSIX basic and extended[edit]

In the POSIX standard, Basic Regular Syntax, BRE, requires that the metacharacters ( ) and { } be designated () and {}, whereas Extended Regular Syntax, ERE, does not.

Metacharacter Description
. Matches any single character (many applications exclude newlines, and exactly which characters are considered newlines is flavor-, character-encoding-, and platform-specific, but it is safe to assume that the line feed character is included). Within POSIX bracket expressions, the dot character matches a literal dot. For example, a.c matches "abc", etc., but [a.c] matches only "a", ".", or "c".
[ ] A bracket expression. Matches a single character that is contained within the brackets. For example, [abc] matches "a", "b", or "c". [a-z]specifies a range which matches any lowercase letter from "a" to "z". These forms can be mixed: [abcx-z] matches "a", "b", "c", "x", "y", or "z", as does [a-cx-z].The - character is treated as a literal character if it is the last or the first (after the ^, if present) character within the brackets: [abc-], [-abc]. Note that backslash escapes are not allowed. The ] character can be included in a bracket expression if it is the first (after the ^) character: []abc].
[^ ] Matches a single character that is not contained within the brackets. For example, [^abc] matches any character other than "a", "b", or "c".[^a-z] matches any single character that is not a lowercase letter from "a" to "z". Likewise, literal characters and ranges can be mixed.
^ Matches the starting position within the string. In line-based tools, it matches the starting position of any line.
$ Matches the ending position of the string or the position just before a string-ending newline. In line-based tools, it matches the ending position of any line.
( ) Defines a marked subexpression. The string matched within the parentheses can be recalled later (see the next entry, n). A marked subexpression is also called a block or capturing group. BRE mode requires ( ).
n Matches what the nth marked subexpression matched, where n is a digit from 1 to 9. This construct is vaguely defined in the POSIX.2 standard. Some tools allow referencing more than nine capturing groups.
* Matches the preceding element zero or more times. For example, ab*c matches "ac", "abc", "abbbc", etc. [xyz]* matches "", "x", "y", "z", "zx", "zyx", "xyzzy", and so on. (ab)* matches "", "ab", "abab", "ababab", and so on.
{m,n} Matches the preceding element at least m and not more than n times. For example, a{3,5} matches only "aaa", "aaaa", and "aaaaa". This is not found in a few older instances of regular expressions. BRE mode requires {m,n}.

Examples:

  • .at matches any three-character string ending with "at", including "hat", "cat", and "bat".
  • [hc]at matches "hat" and "cat".
  • [^b]at matches all strings matched by .at except "bat".
  • [^hc]at matches all strings matched by .at other than "hat" and "cat".
  • ^[hc]at matches "hat" and "cat", but only at the beginning of the string or line.
  • [hc]at$ matches "hat" and "cat", but only at the end of the string or line.
  • [.] matches any single character surrounded by "[" and "]" since the brackets are escaped, for example: "[a]" and "[b]".
  • s.* matches any number of characters preceded by s , for example: "saw" and "seed".

POSIX extended[edit]

The meaning of metacharacters escaped with a backslash is reversed for some characters in the POSIX Extended Regular Expression (ERE) syntax. With this syntax, a backslash causes the metacharacter to be treated as a literal character. So, for example, ( ) is now ( ) and { } is now { }. Additionally, support is removed for n backreferences and the following metacharacters are added:

Metacharacter Description
? Matches the preceding element zero or one time. For example, ab?c matches only "ac" or "abc".
+ Matches the preceding element one or more times. For example, ab+c matches "abc", "abbc", "abbbc", and so on, but not "ac".
| The choice (also known as alternation or set union) operator matches either the expression before or the expression after the operator. For example, abc|def matches "abc" or "def".

Examples:

  • [hc]+at matches "hat", "cat", "hhat", "chat", "hcat", "cchchat", and so on, but not "at".
  • [hc]?at matches "hat", "cat", and "at".
  • [hc]*at matches "hat", "cat", "hhat", "chat", "hcat", "cchchat", "at", and so on.
  • cat|dog matches "cat" or "dog".

POSIX Extended Regular Expressions can often be used with modern Unix utilities by including the command line flag 

-E

.

Character classes[edit]

The character class is the most basic regular expression concept after a literal match. It makes one small sequence of characters match a larger set of characters. For example, [A-Z] could stand for the alphabet, and d could mean any digit. Character classes apply to both POSIX levels.
When specifying a range of characters, such as [a-Z] computer's locale settings determine the contents by the numeric ordering of the character encoding. They could store digits in that sequence, or the ordering could be abc...zABC...Z, or aAbBcC...zZ. So the POSIX standard defines a character class, which will be known by the regular expression processor installed. Those definitions are in the following table:

POSIX Non-standard Perl/Tcl Vim ASCII Description
[:alnum:] [A-Za-z0-9] Alphanumeric characters
[:word:] w w [A-Za-z0-9_] Alphanumeric characters plus "_"
W W [^A-Za-z0-9_] Non-word characters
[:alpha:] a [A-Za-z] Alphabetic characters
[:blank:] s t] Space and tab
b < > (?<=W)(?=w)|(?<=w)(?=W) Word boundaries
[:cntrl:] [x00-x1Fx7F] Control characters
[:digit:] d d [0-9] Digits
D D [^0-9] Non-digits
[:graph:] [x21-x7E] Visible characters
[:lower:] l [a-z] Lowercase letters
[:print:] p [x20-x7E] Visible characters and the space character
[:punct:] [][!"#$%&'()*+,./:;<=>?@^_`{|}~-] Punctuation characters
[:space:] s _s trnvf] Whitespace characters
S [^ trnvf] Non-whitespace characters
[:upper:] u [A-Z] Uppercase letters
[:xdigit:] x [A-Fa-f0-9] Hexadecimal digits

POSIX character classes can only be used within bracket expressions. For example, [[:upper:]ab] matches the uppercase letters and lowercase "a" and "b".
An additional non-POSIX class understood by some tools is [:word:], which is usually defined as [:alnum:] plus underscore. This reflects the fact that in many programming languages these are the characters that may be used in identifiers. The editor Vim further distinguishes word and word-head classes (using the notation w and h) since in many programming languages the characters that can begin an identifier are not the same as those that can occur in other positions.
Note that what the POSIX regular expression standards call character classes are commonly referred to as POSIX character classes in other regular expression flavors which support them. With most other regular expression flavors, the term character class is used to describe what POSIX calls bracket expressions.
C默认在*NIX下面,可以使用这些规则,最基本的POSIX语法,不需要其他的扩展库。

Linux 2.6.25中的select系统调用
主要有4个函数:
sys_select:处理时间参数,调用core_sys_select。
core_sys_select:处理三个fd_set参数,调用do_select。
do_select:做select/poll的工作。在合适的时机把自己挂起等待,调用sock_poll。
sock_poll:用函数指针分派到具体的协议层函数tcp_poll、udp_poll、datagram_poll。
层层分工明确,我也要多学习这种方式啊。

/*
sys_select(fs/select.c)
处理了超时值(如果有),将struct timeval转换成了时钟周期数,调用core_sys_select,然后检查剩余时间,处理时间
*/
asmlinkage long sys_select(int n, fd_set __user *inp, fd_set __user *outp,
						   fd_set __user *exp, struct timeval __user *tvp)
{
	s64 timeout = -1;
	struct timeval tv;
	int ret;
	if (tvp) {/*如果有超时值*/
		if (copy_from_user(&tv, tvp, sizeof(tv)))
			return -EFAULT;
		if (tv.tv_sec < 0 || tv.tv_usec < 0)/*时间无效*/
			return -EINVAL;
		/* Cast to u64 to make GCC stop complaining */
		if ((u64)tv.tv_sec >= (u64)MAX_INT64_SECONDS)
			timeout = -1;	/* 无限等待*/
		else {
			timeout = DIV_ROUND_UP(tv.tv_usec, USEC_PER_SEC/HZ);
			timeout += tv.tv_sec * HZ;/*计算出超时的相对时间,单位为时钟周期数*/
		}
	}
	/*主要工作都在core_sys_select中做了*/
	ret = core_sys_select(n, inp, outp, exp, &timeout);
	if (tvp) {/*如果有超时值*/
		struct timeval rtv;
		if (current->personality & STICKY_TIMEOUTS)/*模拟bug的一个机制,不详细描述*/
			goto sticky;
		/*rtv中是剩余的时间*/
		rtv.tv_usec = jiffies_to_usecs(do_div((*(u64*)&timeout), HZ));
		rtv.tv_sec = timeout;
		if (timeval_compare(&rtv, &tv) >= 0)/*如果core_sys_select超时返回,更新时间*/
			rtv = tv;
		/*拷贝更新后的时间到用户空间*/
		if (copy_to_user(tvp, &rtv, sizeof(rtv))) {
sticky:
			/*
			* If an application puts its timeval in read-only
			* memory, we don't want the Linux-specific update to
			* the timeval to cause a fault after the select has
			* completed successfully. However, because we're not
			* updating the timeval, we can't restart the system
			* call.
			*/
			if (ret == -ERESTARTNOHAND)/*ERESTARTNOHAND表明,被中断的系统调用*/
				ret = -EINTR;
		}
	}
	return ret;
}
/*core_sys_select
为do_select准备好了位图,然后调用do_select,将返回的结果集,返回到用户空间
*/
static int core_sys_select(int n, fd_set __user *inp, fd_set __user *outp,
						   fd_set __user *exp, s64 *timeout)
{
	fd_set_bits fds;
	void *bits;
	int ret, max_fds;
	unsigned int size;
	struct fdtable *fdt;
	/* Allocate small arguments on the stack to save memory and be faster */
	/*SELECT_STACK_ALLOC 定义为256*/
	long stack_fds[SELECT_STACK_ALLOC/sizeof(long)];
	ret = -EINVAL;
	if (n < 0)
		goto out_nofds;
	/* max_fds can increase, so grab it once to avoid race */
	rcu_read_lock();
	fdt = files_fdtable(current->files);/*获取当前进程的文件描述符表*/
	max_fds = fdt->max_fds;
	rcu_read_unlock();
	if (n > max_fds)/*修正用户传入的第一个参数:fd_set中文件描述符的最大值*/
		n = max_fds;
	/*
	* We need 6 bitmaps (in/out/ex for both incoming and outgoing),
	* since we used fdset we need to allocate memory in units of
	* long-words.
	*/
	/*
	如果stack_fds数组的大小不能容纳下所有的fd_set,就用kmalloc重新分配一个大数组。
	然后将位图平均分成份,并初始化fds结构
	*/
	size = FDS_BYTES(n);
	bits = stack_fds;
	if (size > sizeof(stack_fds) / 6) {
		/* Not enough space in on-stack array; must use kmalloc */
		ret = -ENOMEM;
		bits = kmalloc(6 * size, GFP_KERNEL);
		if (!bits)
			goto out_nofds;
	}
	fds.in      = bits;
	fds.out     = bits +   size;
	fds.ex      = bits + 2*size;
	fds.res_in  = bits + 3*size;
	fds.res_out = bits + 4*size;
	fds.res_ex  = bits + 5*size;
	/*get_fd_set仅仅调用copy_from_user从用户空间拷贝了fd_set*/
	if ((ret = get_fd_set(n, inp, fds.in)) ||
		(ret = get_fd_set(n, outp, fds.out)) ||
		(ret = get_fd_set(n, exp, fds.ex)))
		goto out;
	zero_fd_set(n, fds.res_in);
	zero_fd_set(n, fds.res_out);
	zero_fd_set(n, fds.res_ex);
	/*
	接力棒传给了do_select
	*/
	ret = do_select(n, &fds, timeout);
	if (ret < 0)
		goto out;
	/*do_select返回,是一种异常状态*/
	if (!ret) {
		/*记得上面的sys_select不?将ERESTARTNOHAND转换成了EINTR并返回。EINTR表明系统调用被中断*/
		ret = -ERESTARTNOHAND;
		if (signal_pending(current))/*当当前进程有信号要处理时,signal_pending返回真,这符合了EINTR的语义*/
			goto out;
		ret = 0;
	}
	/*把结果集,拷贝回用户空间*/
	if (set_fd_set(n, inp, fds.res_in) ||
		set_fd_set(n, outp, fds.res_out) ||
		set_fd_set(n, exp, fds.res_ex))
		ret = -EFAULT;
out:
	if (bits != stack_fds)
		kfree(bits);/*对应上面的kmalloc*/
out_nofds:
	return ret;
}
/*do_select
真正的select在此,遍历了所有的fd,调用对应的xxx_poll函数
*/
int do_select(int n, fd_set_bits *fds, s64 *timeout)
{
	struct poll_wqueues table;
	poll_table *wait;
	int retval, i;
	rcu_read_lock();
	/*根据已经打开fd的位图检查用户打开的fd, 要求对应fd必须打开, 并且返回最大的fd*/
	retval = max_select_fd(n, fds);
	rcu_read_unlock();
	if (retval < 0)
		return retval;
	n = retval;
	/*将当前进程放入自已的等待队列table, 并将该等待队列加入到该测试表wait*/
	poll_initwait(&table);
	wait = &table.pt;
	if (!*timeout)
		wait = NULL;
	retval = 0;
	for (;;) {/*死循环*/
		unsigned long *rinp, *routp, *rexp, *inp, *outp, *exp;
		long __timeout;
		/*注意:可中断的睡眠状态*/
		set_current_state(TASK_INTERRUPTIBLE);
		inp = fds->in; outp = fds->out; exp = fds->ex;
		rinp = fds->res_in; routp = fds->res_out; rexp = fds->res_ex;
		for (i = 0; i < n; ++rinp, ++routp, ++rexp) {/*遍历所有fd*/
			unsigned long in, out, ex, all_bits, bit = 1, mask, j;
			unsigned long res_in = 0, res_out = 0, res_ex = 0;
			const struct file_operations *f_op = NULL;
			struct file *file = NULL;
			in = *inp++; out = *outp++; ex = *exp++;
			all_bits = in | out | ex;
			if (all_bits == 0) {
				/*
				__NFDBITS定义为(8 * sizeof(unsigned long)),即long的位数。
				因为一个long代表了__NFDBITS位,所以跳到下一个位图i要增加__NFDBITS
				*/
				i += __NFDBITS;
				continue;
			}
			for (j = 0; j < __NFDBITS; ++j, ++i, bit <<= 1) {
				int fput_needed;
				if (i >= n)
					break;
				/*测试每一位*/
				if (!(bit & all_bits))
					continue;
				/*得到file结构指针,并增加引用计数字段f_count*/
				file = fget_light(i, &fput_needed);
				if (file) {
					f_op = file->f_op;
					mask = DEFAULT_POLLMASK;
					/*对于socket描述符,f_op->poll对应的函数是sock_poll
					注意第三个参数是等待队列,在poll成功后会将本进程唤醒执行*/
					if (f_op && f_op->poll)
						mask = (*f_op->poll)(file, retval ? NULL : wait);
					/*释放file结构指针,实际就是减小他的一个引用计数字段f_count*/
					fput_light(file, fput_needed);
					/*根据poll的结果设置状态,要返回select出来的fd数目,所以retval++。
					注意:retval是in out ex三个集合的总和*/
					if ((mask & POLLIN_SET) && (in & bit)) {
						res_in |= bit;
						retval++;
					}
					if ((mask & POLLOUT_SET) && (out & bit)) {
						res_out |= bit;
						retval++;
					}
					if ((mask & POLLEX_SET) && (ex & bit)) {
						res_ex |= bit;
						retval++;
					}
				}
				/*
				注意前面的set_current_state(TASK_INTERRUPTIBLE);
				因为已经进入TASK_INTERRUPTIBLE状态,所以cond_resched回调度其他进程来运行,
				这里的目的纯粹是为了增加一个抢占点。被抢占后,由等待队列机制唤醒。
				在支持抢占式调度的内核中(定义了CONFIG_PREEMPT),cond_resched是空操作
				*/
				cond_resched();
			}
			/*根据poll的结果写回到输出位图里*/
			if (res_in)
				*rinp = res_in;
			if (res_out)
				*routp = res_out;
			if (res_ex)
				*rexp = res_ex;
		}
		wait = NULL;
		if (retval || !*timeout || signal_pending(current))/*signal_pending前面说过了*/
			break;
		if(table.error) {
			retval = table.error;
			break;
		}
		if (*timeout < 0) {
			/*无限等待*/
			__timeout = MAX_SCHEDULE_TIMEOUT;
		} else if (unlikely(*timeout >= (s64)MAX_SCHEDULE_TIMEOUT - 1)) {
			/* 时间超过MAX_SCHEDULE_TIMEOUT,即schedule_timeout允许的最大值,用一个循环来不断减少超时值*/
			__timeout = MAX_SCHEDULE_TIMEOUT - 1;
			*timeout -= __timeout;
		} else {
			/*等待一段时间*/
			__timeout = *timeout;
			*timeout = 0;
		}
		/*TASK_INTERRUPTIBLE状态下,调用schedule_timeout的进程会在收到信号后重新得到调度的机会,
		即schedule_timeout返回,并返回剩余的时钟周期数
		*/
		__timeout = schedule_timeout(__timeout);
		if (*timeout >= 0)
			*timeout += __timeout;
	}
	/*设置为运行状态*/
	__set_current_state(TASK_RUNNING);
	/*清理等待队列*/
	poll_freewait(&table);
	return retval;
}
static unsigned int sock_poll(struct file *file, poll_table *wait)
{
	struct socket *sock;
	/*约定socket的file->private_data字段放着对应的socket结构指针*/
	sock = file->private_data;
	/*对应了三个协议的函数tcp_poll,udp_poll,datagram_poll,其中udp_poll几乎直接调用了datagram_poll
	累了,先休息一下,这三个函数以后分析*/
	return sock->ops->poll(file, sock, wait);
}

其他重要函数一览
static int max_select_fd(unsigned long n, fd_set_bits *fds)
返回在fd_set中已经打开的,并且小于用户指定最大值,的fd
static inline int get_fd_set(unsigned long nr, void __user *ufdset, unsigned long *fdset)
从用户空间拷贝fd_set到内核
static inline void zero_fd_set(unsigned long nr, unsigned long *fdset)
把fd_set清零
static inline unsigned long __must_check set_fd_set(unsigned long nr, void __user *ufdset, unsigned long *fdset)
把fd_set拷贝回用户空间
static inline int signal_pending(struct task_struct *p)
目前进程有信号需要处理
struct file *fget_light(unsigned int fd, int *fput_needed)
由fd得到其对应的file结构指针,并增加其引用计数
static inline void fput_light(struct file *file, int fput_needed)
释放由fget_light得到的file结构指针,减少其引用计数
set_current_state
设置当前进程的状态
static inline int cond_resched(void)
判断是否有进程需要抢占当前进程,如果是将立即发生调度。就是额外增加一个抢占点。
signed long __sched schedule_timeout(signed long timeout)
当前进程睡眠timeout个jiffies
rcu_read_lock
rcu_read_unlock
Linux 2.6新加入的rcu锁。读锁的加锁、解锁函数
参考http://www.ibm.com/developerworks/cn/linux/l-rcu
poll_freewait
poll_initwait
poll_wait
...
和文件IO,poll机制有关的几个函数,参考《Linux设备驱动(第三版)》6.3
tcp_poll
udp_poll
datagram_poll
协议层的poll函数
文件出处:http://zhangyafeikimi.iteye.com/blog/248815