Thread (41 messages) flat view 41 messages, 14 authors, 2006-03-07

Re: [PATCH 8/8] [I/OAT] TCP recv offload to I/OAT

From: Andrew Morton <hidden>
Date: 2006-03-05 08:47:09
Also in: lkml

Chris Leech [off-list ref] wrote:
+#ifdef CONFIG_NET_DMA
 +	tp->ucopy.dma_chan = NULL;
 +	if ((len > sysctl_tcp_dma_copybreak) && !(flags & MSG_PEEK) && !sysctl_tcp_low_latency && __get_cpu_var(softnet_data.net_dma))
 +		dma_lock_iovec_pages(msg->msg_iov, len, &tp->ucopy.locked_list);
 +#endif
The __get_cpu_var() here will run smp_processor_id() from preemptible
context.  You'll get a big warning if the correct debug options are set.

The reason for this is that preemption could cause this code to hop between
CPUs.

Please always test code with all debug options enabled and with full kernel
preemption.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help