lkml.org 
[lkml]   [2015]   [Jun]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] sock: honor GFP_ATOMIC when allocating send skbs
From
Hi Eric,

Thanks for your feedback on this. The precise problem is a BUG in the
scheduler code when sleep is called from atomic context, due to having
to wait on that allocation. This is triggered by a module I'm writing.

I'm probably doing something I shouldn't... I'm calling udp_sendmsg
from atomic context: bad news bears, right? Really what I'd like to do
is create an skb with headroom, fill it with data, and then hand it
off to the udp/ip stack to prepend the udp and ip headers and
calculate the flowi4 and correct dev and checksums for the skb. But I
can't seem to find a correct API for this. So instead I'm using a
socket and calling sendmsg on it, which unfortunately winds up in an
extra allocation and a memcpy when sending. Might there be a better
way to do what I want? That is: pass a buffer off to the networking
stack, a) with zero copies [without having to use sendpage], and b)
from atomic context. I'd like to avoid using workqueues/kthreads/etc
if possible.

Thanks,
Jason


\
 
 \ /
  Last update: 2015-06-29 16:21    [W:0.111 / U:0.412 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site