Thread (4 messages) 4 messages, 3 authors, 2014-01-07

simple memory malloc and free in ip_output.c

From: Mulyadi Santosa <hidden>
Date: 2014-01-07 11:27:04

Possibly related (same subject, not in this thread)

On Fri, Jan 3, 2014 at 12:42 AM, Guibin(Bill) Tian [off-list ref] wrote:
Thank you sirs. But in fact, I don't alloc/free for every packet. I did
exactly as what you said---reuse.

I am a little confused why GFP_ATOMIC can work but GFP_KERNEL will cause the
system to panic.  Does it because that GFP_KERNEL can sleep in kmalloc, then
ip_xmit_queue will be held or something? But anyway, GFP_ATOMIC works
perfectly.
yup, you nailed it. gfp_kernel sleeps, while ip_xmit_queue is in
interrupt context.


-- 
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help