Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S262496AbVE0QjU (ORCPT ); Fri, 27 May 2005 12:39:20 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S262495AbVE0QjU (ORCPT ); Fri, 27 May 2005 12:39:20 -0400 Received: from mail.tv-sign.ru ([213.234.233.51]:2536 "EHLO several.ru") by vger.kernel.org with ESMTP id S262503AbVE0QjF (ORCPT ); Fri, 27 May 2005 12:39:05 -0400 Message-ID: <42974F08.1C89CF2A@tv-sign.ru> Date: Fri, 27 May 2005 20:47:04 +0400 From: Oleg Nesterov X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.2.20 i686) X-Accept-Language: en MIME-Version: 1.0 To: john cooper Cc: linux-kernel@vger.kernel.org, Ingo Molnar Subject: Re: RT and Cascade interrupts 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: 1084 Lines: 29 john cooper wrote: > > rpc_delete_timer(struct rpc_task *task) > { > - if (test_and_clear_bit(RPC_TASK_HAS_TIMER, &task->tk_runstate)) { > + if (task->tk_timer.base) { > del_singleshot_timer_sync(&task->tk_timer); > dprintk("RPC: %4d deleting timer\n", task->tk_pid); > } I know nothing about rpc, but this looks completely wrong to me. Please don't use the ->base directly, use timer_pending(). This field is never NULL in -mm tree. Next, timer_pending() == 0 does not mean that del_timer_sync() is not needed, it may be running on the other CPU. Looking at the code for the first time, I can guess that RPC_TASK_HAS_TIMER was invented to indicate when it is safe not to wait for timer completition. This bit is cleared after ->tk_timeout_fn call in the timer's handler. After that rpc_run_timer will not touch *task. Oleg. - 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/