<html><body><div style="color:#000; background-color:#fff; font-family:Courier New, courier, monaco, monospace, sans-serif;font-size:10pt"><div><span></span></div><div></div><div>Hi, </div><div><br></div><div>ip_queue_xmit will get called for every packet send, so frequent allocation and free of memory can be a problem for slab allocator.</div><div>If you need only 48 bytes of memory in a function you can chose to use array.</div><div><br></div><div>-Anand Moon</div><div><br></div><div>-----BEGIN PGP MESSAGE-----<br>Version: GnuPG v1.4.14 (GNU/Linux)</div><div>jA0EAwMCYq3dHqTzwcVgyRxC1j+oLxS8Yw92EIeKln+x3eAWzd7mM/pUluRo<br>=0RYk<br>-----END PGP MESSAGE-----<br></div><div class="yahoo_quoted" style="display: block;"> <br> <br> <div style="font-family: Courier New, courier, monaco, monospace, sans-serif; font-size: 10pt;"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 12pt;"> <div dir="ltr">
<font face="Arial" size="2"> On Friday, December 27, 2013 11:11 AM, Guibin(Bill) Tian <gbtian@gmail.com> wrote:<br> </font> </div> <div class="y_msg_container"><div id="yiv6330095736"><div>It does work in your way, thanks Carson <span></span><br clear="none"><br clear="none">On Thursday, December 26, 2013, Guibin(Bill) Tian wrote:<br clear="none"><div class="yiv6330095736yqt2159033637" id="yiv6330095736yqt73228"><blockquote class="yiv6330095736gmail_quote" style="margin: 0px 0px 0px 0.8ex; padding-left: 1ex; border-left-color: rgb(204, 204, 204); border-left-width: 1px; border-left-style: solid;">
<div dir="ltr">I tried it, still the same thing. <div>Also, there is another side effect that if I call the two lines of code above, the internet connection seems to break except to localhost. </div></div><div class="yiv6330095736gmail_extra">
<br clear="none"><br clear="none"><div class="yiv6330095736gmail_quote">On Thu, Dec 26, 2013 at 10:24 PM, bill4carson <span dir="ltr"><<a href="" rel="nofollow" shape="rect">bill4carson@gmail.com</a>></span> wrote:<br clear="none">
<blockquote class="yiv6330095736gmail_quote" style="margin: 0px 0px 0px 0.8ex; padding-left: 1ex; border-left-color: rgb(204, 204, 204); border-left-width: 1px; border-left-style: solid;">
<div><br clear="none">
<br clear="none">
On 2013年12月27日 11:16, Guibin(Bill) Tian wrote:<br clear="none">
<blockquote class="yiv6330095736gmail_quote" style="margin: 0px 0px 0px 0.8ex; padding-left: 1ex; border-left-color: rgb(204, 204, 204); border-left-width: 1px; border-left-style: solid;">
Hi,<br clear="none">
I am doing a very simple operation at the method of ip_queue_xmit in ip_output.c.<br clear="none">
The code is very simple.<br clear="none">
<br clear="none">
char *p = kmalloc(48, GFP_KERNEL);<br clear="none">
</blockquote></div>
^^^^^^^^<br clear="none">
GFP_ATOMIC ?<span><font color="#888888"><br clear="none">
-- <br clear="none">
八百里秦川尘土飞扬,三千万老陕齐吼秦腔。<br clear="none">
<br clear="none">
--bill<br clear="none">
</font></span></blockquote></div><br clear="none"></div>
</blockquote></div></div></div><br><div class="yqt2159033637" id="yqt95641">_______________________________________________<br clear="none">Kernelnewbies mailing list<br clear="none"><a href="mailto:Kernelnewbies@kernelnewbies.org" shape="rect" ymailto="mailto:Kernelnewbies@kernelnewbies.org">Kernelnewbies@kernelnewbies.org</a><br clear="none"><a href="http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies" target="_blank" shape="rect">http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a><br clear="none"></div><br><br></div> </div> </div> </div> </div></body></html>