
为什么缓存着色会在不同的平板中为对象添加各种偏移量可以提高性能?
我最初的猜测是:
具有缓存偏移的slab分配器,尝试将slabs的第一个对象放在不同缓存颜色的内存中.如果客户端从这些平板分配N个对象,它将获得具有N个缓存颜色的N个对象.
我的猜测是正确的还是有人可以给我更多提示?
非常感谢,
The final task of the slab allocator is optimal harDWare cache use. If there is space left over after objects are packed into a slab,the remaining space is used to color the slab. Slab coloring is a scheme that attempts to have objects in different slabs use different lines in the cache. By placing objects at a different starting offset within the slab,objects will likely use different lines in the cpu cache,which helps ensure that objects from the same slab cache will be unlikely to flush each other.
我认为这回答了你的疑问.
总结以上是内存溢出为你收集整理的Linux内核中的slab内存管理缓存着色全部内容,希望文章能够帮你解决Linux内核中的slab内存管理缓存着色所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)