wq_has_sleeper man page on Oracle

Man page or keyword search:  
man Server   33470 pages
apropos Keyword Search (all sections)
Output format
Oracle logo
[printable version]

WQ_HAS_SLEEPER(9)	       Linux Networking		     WQ_HAS_SLEEPER(9)

NAME
       wq_has_sleeper - check if there are any waiting processes

SYNOPSIS
       bool wq_has_sleeper(struct socket_wq * wq);

ARGUMENTS
       wq
	   struct socket_wq

DESCRIPTION
       Returns true if socket_wq has waiting processes

       The purpose of the wq_has_sleeper and sock_poll_wait is to wrap the
       memory barrier call. They were added due to the race found within the
       tcp code.

CONSIDER FOLLOWING TCP CODE PATHS
       CPU1 CPU2

       sys_select receive packet ... ... __add_wait_queue update tp->rcv_nxt
       ... ... tp->rcv_nxt check sock_def_readable ... { schedule
       rcu_read_lock; wq = rcu_dereference(sk->sk_wq); if (wq &&
       waitqueue_active(wq->wait)) wake_up_interruptible(wq->wait) ... }

       The race for tcp fires when the __add_wait_queue changes done by CPU1
       stay in its cache, and so does the tp->rcv_nxt update on CPU2 side. The
       CPU1 could then endup calling schedule and sleep forever if there are
       no more data on the socket.

COPYRIGHT
Kernel Hackers Manual 3.8.	   June 2014		     WQ_HAS_SLEEPER(9)
[top]

List of man pages available for Oracle

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net