list_for_each() 內使用prefetch()的好處? - Linux

By Lily
at 2011-04-19T23:20
at 2011-04-19T23:20
Table of Contents
#define list_for_each(pos, head) \\
for (pos = (head)->next, prefetch(pos->next); pos != (head); \\
pos = pos->next, prefetch(pos->next))
這邊他有使用prefetch(),
不過就算他不使用,在for迴圈內若使用到pos->next,
不是也一樣會被cache住嗎? (只是晚了一點)
如此先做prefetch()的好處為呢?
還請高手解答一下
謝謝!!
--
for (pos = (head)->next, prefetch(pos->next); pos != (head); \\
pos = pos->next, prefetch(pos->next))
這邊他有使用prefetch(),
不過就算他不使用,在for迴圈內若使用到pos->next,
不是也一樣會被cache住嗎? (只是晚了一點)
如此先做prefetch()的好處為呢?
還請高手解答一下
謝謝!!
--
Tags:
Linux
All Comments

By Zenobia
at 2011-04-20T17:28
at 2011-04-20T17:28

By Elvira
at 2011-04-22T23:14
at 2011-04-22T23:14

By Noah
at 2011-04-27T22:19
at 2011-04-27T22:19

By Tom
at 2011-04-30T10:21
at 2011-04-30T10:21

By Eden
at 2011-05-03T23:39
at 2011-05-03T23:39

By Kyle
at 2011-05-07T17:42
at 2011-05-07T17:42
Related Posts
ubuntu10.10 網路連不上

By Kama
at 2011-04-19T17:06
at 2011-04-19T17:06
關於硬碟資源分配問題

By Tom
at 2011-04-19T16:02
at 2011-04-19T16:02
有沒有其他的"工作管理員套件"?

By Yuri
at 2011-04-19T11:42
at 2011-04-19T11:42
samba 無法存取家目錄以外的目錄

By Frederica
at 2011-04-19T11:25
at 2011-04-19T11:25
ubuntu 網路連不上

By Franklin
at 2011-04-18T19:30
at 2011-04-18T19:30