Memory management and TCP ReTx

From: Jordi Ros (
Date: Wed Jun 14 2000 - 14:54:45 EST

Hi all,

I was digging into the networking code and the following question arised to
me, regarding the TCP retransmission and memory management. TCP saves a
packet after sending it in the retransmission queue. This packet is kept
there until an acknowledge comes from the receiver. Now suppose that the
network is congested and that it takes several seconds for the acknowledge
to arrive. Suppose also that our host is a busy server using a 1 Gbps
ethernet card. This situation will overflow the RAM memory on our system
very easily. At this point, what does Linux do? Does it use virtual memory
to save the packets in the hard drive? If so, then the performance should be
very low, since each time we send a packet we have to save another one in
the hard drive. Can somebody argue this?
More specifically, when allocating memory for an sk_buff, is this memory
defined to be swapable (that can be saved to the hard drive using virtual
memory)? What is the flag that defines whether it is swapable or not? is it
the priority field in the kmalloc? Is __GFP_IO the flag that sets it to be
swapable? I have read several books on the code but none get to explain in
detail this flags.



Jordi Ros email:
Electrical and Computer Engineering voice (work): (949) 622 0991
University of California, Irvine www:

To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to

This archive was generated by hypermail 2b29 : Thu Jun 15 2000 - 21:00:41 EST