Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755051AbXFILIm (ORCPT ); Sat, 9 Jun 2007 07:08:42 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752717AbXFILIh (ORCPT ); Sat, 9 Jun 2007 07:08:37 -0400 Received: from mx1.redhat.com ([66.187.233.31]:54880 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752331AbXFILIg (ORCPT ); Sat, 9 Jun 2007 07:08:36 -0400 Date: Sat, 9 Jun 2007 07:08:26 -0400 From: Jeff Layton To: Herbert Xu Cc: linux-kernel@vger.kernel.org, linux-cifs-client@lists.samba.org, linux-fsdevel@vger.kernel.org, netdev@vger.kernel.org Subject: Re: [PATCH] RFC: have tcp_recvmsg() check kthread_should_stop() and treat it as if it were signalled Message-Id: <20070609070826.7bd3480c.jlayton@redhat.com> In-Reply-To: References: <20070608123527.9b4cdafe.jlayton@redhat.com> X-Mailer: Sylpheed 2.3.1 (GTK+ 2.10.11; i386-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1278 Lines: 33 On Sat, 09 Jun 2007 11:30:04 +1000 Herbert Xu wrote: > Please cc networking patches to netdev@vger.kernel.org. > > Jeff Layton wrote: > > > > 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 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/