From: Patrick McHardy <kaber@trash.net> Date: Wed, 31 Oct 2007 15:08:02 +0100Thanks for bringing up this topic. Instead of answering your questions, I'm going to show you how to avoid having to do any of this cache flushing crap :-) You can avoid having to flush anything as long as the virtual addresses on the kernel side are modulo SHMLBA the virtual addresses on the userland side. We have some (decidedly awkward) mechanisms to try and achieve this in the kernel, but they are cumbersome and not air tight. Instead, I would recommend simply that you access the ring buffer directly in userspace. This avoids all of the cache aliasing issues. Yes, this means you have to do the ring buffer accesses in the context of the user, but it simplifies so much that I think it'd be worth it. Another option is to use the "copy_to_user_page()" and "copy_from_user_page()" interfaces which will do all of the necessary cache flushing for you. Actually it might be nice to convert AF_PACKET's mmap() code over to using those things. - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
| Mariusz Kozlowski | [PATCH 01] kmalloc + memset conversion co kzalloc |
| Rafael J. Wysocki | [Bug #10629] 2.6.26-rc1-$sha1: RIP __d_lookup+0x8c/0x160 |
| Vladislav Bolkhovitin | Re: Integration of SCST in the mainstream Linux kernel |
| Jeff Garzik | Re: [RFC] Heads up on sys_fallocate() |
git: | |
| Linus Torvalds | Re: [GIT]: Networking |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| Jarek Poplawski | [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Andrew Morton | Re: [BUG] New Kernel Bugs |
