Thread (9 messages) 9 messages, 4 authors, 2007-06-28

Re: [PATCH] RFC: have tcp_recvmsg() check kthread_should_stop() and treat it as if it were signalled

From: Jeff Layton <hidden>
Date: 2007-06-09 11:08:36
Also in: linux-fsdevel, lkml

On Sat, 09 Jun 2007 11:30:04 +1000
Herbert Xu [off-list ref] wrote:
Please cc networking patches to netdev@vger.kernel.org.

Jeff Layton [off-list ref] wrote:
quoted
The following patch is a first stab at removing this need. It makes it
so that in tcp_recvmsg() we also check kthread_should_stop() at any
point where we currently check to see if the task was signalled. If
that returns true, then it acts as if it were signalled and returns to
the calling function.
This just doesn't seem to fit.  Why should networking care about kthreads?

Perhaps you can get kthread_stop to send a signal instead?
The problem there is that we still have to make the kthread let signals
through. The nice thing about this approach is that we can make the
kthread ignore signals, but still allow it to break out of kernel_recvmsg
when a kthread_stop is done.

Though I will confess that you have a point about this feeling like a
layering violation...

-- 
Jeff Layton [off-list ref]
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help