prefetch
来源:互联网 发布:java 发布到docker 编辑:程序博客网 时间:2024/05/17 03:17
From: Linus Torvalds <torvalds@linux-foundation.org>Newsgroups: fa.linux.kernelSubject: Re: [patch] epoll use a single inode ...Date: Wed, 07 Mar 2007 22:58:57 UTCMessage-ID: <fa.xioENCdH8/npFPrkKx9GGXIztBs@ifi.uio.no>On Wed, 7 Mar 2007, Anton Blanchard wrote:>> Funny you mention this. We found some noticeable ppc64 regressions when> moving the dcache to standard list macros and had to do this to fix it> up:>> static inline void prefetch(const void *x)> {> if (unlikely(!x))> return;>> __asm__ __volatile__ ("dcbt 0,%0" : : "r" (x));> }>> Urgh :)Yeah, I'm not at all surprised. Any implementation of "prefetch" thatdoesn't just turn into a no-op if the TLB entry doesn't exist (which makesthem weaker for *actual* prefetching) will generally have a hard time witha NULL pointer. Exactly because it will try to do a totally unnecessaryTLB fill - and since most CPU's will not cache negative TLB entries, thatunnecessary TLB fill will be done over and over and over again..In general, using software prefetching is just a stupid idea, unless - the prefetch really is very strict (ie for a linked list you do exactly the above kinds of things to make sure that you don't try to prefetch the non-existent end entry)AND - the CPU is stupid (in-order in particular).I think Intel even suggests in their optimization manuals to *not* dosoftware prefetching, because hw can usually simply do better without it.Linus
0 0
- prefetch
- prefetch
- PREFETCH文件夹
- prefetch abort
- 认识prefetch
- auto&prefetch
- dns-prefetch
- DNS Prefetch
- HTML5 prefetch
- Consumer Prefetch
- Prefetch Limit
- Windows XP Prefetch文件夹
- 关于dns-prefetch
- HTML5 link prefetch
- [译] HTML5 prefetch
- 【译】HTML5 prefetch
- 什么是 DNS Prefetch ?
- 什么是 DNS Prefetch ?
- TI 达芬奇序列 CMEM模块
- mac 下使用Eclipse使用OpenCV
- sql日志文件过大,遭到恶意登录
- v4l2驱动文档之——filed
- v4l2 video设备注册和调用过程
- prefetch
- 面试题
- 显示Spinner中已经选中的项
- v4l2_device.c浅析
- ViewPager仿淘宝广告栏
- Error :asm/arch/davinci_vdce.h : no such file or directory
- Android中Bitmap和Drawable
- solrj实现基本的添加索引,查询
- svn 常见报错