From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932752AbXBEOLD (ORCPT ); Mon, 5 Feb 2007 09:11:03 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932735AbXBEOLD (ORCPT ); Mon, 5 Feb 2007 09:11:03 -0500 Received: from mx1.redhat.com ([66.187.233.31]:44084 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932736AbXBEOLA (ORCPT ); Mon, 5 Feb 2007 09:11:00 -0500 Subject: [DLM] Fix schedule() calls [12/54] From: Steven Whitehouse To: linux-kernel@vger.kernel.org Cc: Patrick Caulfield , cluster-devel@redhat.com In-Reply-To: <1170684425.11001.267.camel@quoit.chygwyn.com> References: <1170684425.11001.267.camel@quoit.chygwyn.com> Content-Type: text/plain Organization: Red Hat (UK) Ltd Date: Mon, 05 Feb 2007 14:19:04 +0000 Message-Id: <1170685144.11001.294.camel@quoit.chygwyn.com> Mime-Version: 1.0 X-Mailer: Evolution 2.2.2 (2.2.2-5) Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org >>From 7c571f88ff49e883ee57f0abf1e155f2d4965a75 Mon Sep 17 00:00:00 2001 From: Patrick Caulfield Date: Tue, 2 Jan 2007 17:01:05 +0000 Subject: [PATCH] [DLM] Fix schedule() calls I was a little over-enthusiastic turning schedule() calls int cond_sched() when fixing the DLM for Andrew Morton. These four should really be calls to schedule() or the dlm can busy-wait. Signed-Off-By: Patrick Caulfield Signed-off-by: Steven Whitehouse diff --git a/fs/dlm/lowcomms-sctp.c b/fs/dlm/lowcomms-sctp.c index fe158d7..0940a80 100644 --- a/fs/dlm/lowcomms-sctp.c +++ b/fs/dlm/lowcomms-sctp.c @@ -1109,7 +1109,7 @@ static int dlm_recvd(void *data) set_current_state(TASK_INTERRUPTIBLE); add_wait_queue(&lowcomms_recv_wait, &wait); if (!test_bit(CF_READ_PENDING, &sctp_con.flags)) - cond_resched(); + schedule(); remove_wait_queue(&lowcomms_recv_wait, &wait); set_current_state(TASK_RUNNING); @@ -1141,7 +1141,7 @@ static int dlm_sendd(void *data) while (!kthread_should_stop()) { set_current_state(TASK_INTERRUPTIBLE); if (write_list_empty()) - cond_resched(); + schedule(); set_current_state(TASK_RUNNING); if (sctp_con.eagain_flag) { diff --git a/fs/dlm/lowcomms-tcp.c b/fs/dlm/lowcomms-tcp.c index 3b22473..18b91c6 100644 --- a/fs/dlm/lowcomms-tcp.c +++ b/fs/dlm/lowcomms-tcp.c @@ -996,7 +996,7 @@ static int dlm_recvd(void *data) while (!kthread_should_stop()) { set_current_state(TASK_INTERRUPTIBLE); if (read_list_empty()) - cond_resched(); + schedule(); set_current_state(TASK_RUNNING); process_sockets(); @@ -1030,7 +1030,7 @@ static int dlm_sendd(void *data) while (!kthread_should_stop()) { set_current_state(TASK_INTERRUPTIBLE); if (write_and_state_lists_empty()) - cond_resched(); + schedule(); set_current_state(TASK_RUNNING); process_state_queue(); -- 1.4.4.2