From: Andi Kleen <ak@suse.de>
To: "Steven French" <sfrench@us.ibm.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Waking up kernel thread blocked in sock_recvmsg
Date: 09 Oct 2002 01:25:03 +0200 [thread overview]
Message-ID: <p734rbwqzsg.fsf@oldwotan.suse.de> (raw)
In-Reply-To: "Steven French"'s message of "9 Oct 2002 01:14:35 +0200"
"Steven French" <sfrench@us.ibm.com> writes:
> What is the recommended, safe way to wake up a kernel thread blocked in
> sock_recvmsg (other than sending data to it or pulling the network cable
> out of the wall and generating network errors). I have tried various
> approaches in kernel sock_close, sock_release even wake_up_process. When
> I want to free my captive kernel threads this thread is typically blocked
> in tcp_recv_data (on a blocking read of a tcp v4 socket). I am not certain
> that it is not waking up and promptly going back to sleep but it is
> certainly not returning to the caller until it really gets data.
You could send it a signal.
Or alternatively use non blocking sockets and sleep yourself on the socket
wait queue.
-Andi
next parent reply other threads:[~2002-10-08 23:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <OF622E0CD7.34DDBCD6-ON87256C4C.007D935A@boulder.ibm.com.suse.lists.linux.kernel>
2002-10-08 23:25 ` Andi Kleen [this message]
2002-10-08 23:00 Steven French
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=p734rbwqzsg.fsf@oldwotan.suse.de \
--to=ak@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=sfrench@us.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®