mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@tv-sign.ru>
To: linux-kernel@vger.kernel.org
Cc: Ingo Molnar <mingo@elte.hu>
Subject: Re: [patch] timer-2.5.40-F7
Date: Fri, 04 Oct 2002 03:24:55 +0400	[thread overview]
Message-ID: <3D9CD1C7.70817518@tv-sign.ru> (raw)

Hello.

run_timer_tasklet() checks for expired local timers,
i think it is better to do it in run_local_timers()
before tasklet_schedule().

On top of timer-2.5.40-F7:

--- kernel/timer.c.orig	Fri Oct  4 02:18:05 2002
+++ kernel/timer.c	Fri Oct  4 02:53:02 2002
@@ -715,10 +715,7 @@
  */
 static void run_timer_tasklet(unsigned long data)
 {
-	tvec_base_t *base = tvec_bases + smp_processor_id();
-
-	if ((long)(jiffies - base->timer_jiffies) >= 0)
-		__run_timers(base);
+	__run_timers((tvec_base_t*)data);
 }
 
 /*
@@ -726,7 +723,11 @@
  */
 void run_local_timers(void)
 {
-	tasklet_hi_schedule(&per_cpu(timer_tasklet, smp_processor_id()));
+	int cpu = smp_processor_id();
+	tvec_base_t *base = tvec_bases + cpu;
+
+	if ((long)(jiffies - base->timer_jiffies) >= 0)
+		tasklet_hi_schedule(&per_cpu(timer_tasklet, cpu));
 }
 
 /*
@@ -1079,6 +1080,7 @@
 		}
 		for (j = 0; j < TVR_SIZE; j++)
 			INIT_LIST_HEAD(base->tv1.vec + j);
-		tasklet_init(&per_cpu(timer_tasklet, i), run_timer_tasklet, 0);
+		tasklet_init(&per_cpu(timer_tasklet, i),
+			run_timer_tasklet, (unsigned long)base);
 	}
 }

             reply	other threads:[~2002-10-03 23:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-03 23:24 Oleg Nesterov [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-10-03 13:17 Ingo Molnar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3D9CD1C7.70817518@tv-sign.ru \
    --to=oleg@tv-sign.ru \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®