-
David Miller authored
where D-cache aliasing is an issue. vmalloc_user() ensures that the kernel side mapping is SHMLBA aligned, and on platforms with D-cache aliasing matters the presence of VM_SHARED will similarly SHMLBA align the user side mapping. Thus the kernel and the user will be writing to the same D-cache aliases and we'll avoid inconsistencies and corruption. The only trick with this change is that vfree() cannot be invoked from interrupt context, and thus it's not allowed from RCU callbacks. We deal with this by using schedule_work(). Since the ring buffer is now completely linear even on the kernel side, several simplifications are probably now possible in the code where we add entries to the ring. With help from Peter Zijlstra. Signed-off-by: David S. Miller <davem@davemloft.net> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Jens Axboe <jens.axboe@oracle.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Nick Piggin <nickpiggin@yahoo.com.au> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
9ba02e11