Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261168AbVCMMHv (ORCPT ); Sun, 13 Mar 2005 07:07:51 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261170AbVCMMHv (ORCPT ); Sun, 13 Mar 2005 07:07:51 -0500 Received: from mail.tv-sign.ru ([213.234.233.51]:37608 "EHLO several.ru") by vger.kernel.org with ESMTP id S261168AbVCMMHo (ORCPT ); Sun, 13 Mar 2005 07:07:44 -0500 Message-ID: <42343C61.6A1210C0@tv-sign.ru> Date: Sun, 13 Mar 2005 16:13:05 +0300 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: linux-kernel@vger.kernel.org, Shai Fultheim , Christoph Lameter , Andrew Morton , Ingo Molnar Subject: Re: [patch] del_timer_sync scalability patch References: <4231E959.141F7D85@tv-sign.ru> 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: 973 Lines: 38 I suspect that del_timer_sync() in its current form is racy. CPU 0 CPU 1 __run_timers() sets timer->base = NULL del_timer_sync() starts, calls del_timer(), it returns because timer->base == NULL. waits until the run is complete: while (base->running_timer == timer) preempt_check_resched(); calls schedule(), or long interrupt happens. timer reschedules itself, __run_timers() exits. base->running_timer == NULL, end of loop. next timer interrupt, __run_timers() picks this timer again, sets timer->base = NULL if (timer_pending(timer)) // no, timer->base == NULL goto del_again; // not taken del_timer_sync() returns timer runs. No? 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/