Thread (9 messages) 9 messages, 3 authors, 2010-12-14

RE: [PATCH 1/1] hv: Use only one receive buffer per channel and kmalloc on initialize

From: Hank Janssen <hidden>
Date: 2010-12-14 00:11:26
Also in: lkml

-----Original Message-----
From: Jesper Juhl [mailto:jj@chaosbits.net]
Sent: Monday, December 13, 2010 3:51 PM
To: Ky Srinivasan
quoted
quoted
+	shut_txf_buf = kmalloc(PAGE_SIZE, GFP_ATOMIC);
+	time_txf_buf = kmalloc(PAGE_SIZE, GFP_ATOMIC);
+	hbeat_txf_buf = kmalloc(PAGE_SIZE, GFP_ATOMIC);
Why are these allocations GFP_ATOMIC. Clearly this is in module
loading context and you can afford to sleep. GFP_KERNEL should be fine.
quoted
I actually also noticed this when I did my first review of the patch,
but
I didn't point it out since I thought that "there must be a good
reason".
But now that you point it out and I look at the code once more I can't
actually think of a "good reason",, so I agree with you completely that
these should just be GFP_KERNEL.
I was looking at some of the back code to make sure it is okay, and I see
No reason not make this change either. I will change it and resubmit.

Thanks,

Hank.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help