sk_stream_wait_memory: Query
Hi,
In " tcp_sendmsg" function in 2 situation, tcp code attempts to jump to "wait_for_memory:
" case when
1. it fails to allocate to the new skb [sk_stream_alloc_pskb failure]
2. it fails to allocate new cache page.
and invokes the sk_stream_wait_memory function.
inside which it invokes the
sk_wait_event(sk, ¤t_timeo, sk_stream_memory_free(sk) &&vm_wait);
in case if sk_stream_wait_memory is invoked due to skb allocation failure, it would busy loop and would not relinquish the control. [For non-preemptive kernel]
Is it fair expectation, or even this case it should let it current task get scheduled and re try after timer expiry.
regards
Ravish Tayal
in the case if linux kernel is configured as non-premeptive