Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261666AbVDCLPR (ORCPT ); Sun, 3 Apr 2005 07:15:17 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261673AbVDCLPQ (ORCPT ); Sun, 3 Apr 2005 07:15:16 -0400 Received: from mail.dif.dk ([193.138.115.101]:43958 "EHLO saerimmer.dif.dk") by vger.kernel.org with ESMTP id S261666AbVDCLPK (ORCPT ); Sun, 3 Apr 2005 07:15:10 -0400 Date: Sun, 3 Apr 2005 13:17:28 +0200 (CEST) From: Jesper Juhl To: Arun Srinivas Cc: rostedt@goodmis.org, linux-kernel@vger.kernel.org Subject: Re: sched /HT processor In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1326 Lines: 35 On Sun, 3 Apr 2005, Arun Srinivas wrote: > > I looked at my "include/asm-i386/param.h" and the HZ value is 1000.So, I > suppose the timer interrupt frequency is 1000 times per sec. or once every 1 > millisec. > > So, is scheduler_tick() ( for resceduling) called only once every 1 ms?? I am > measuring the time when 2 of my processes are scheduled in a HT processor.So, > the possible timedifference of when my 2 processes are scheduled can be only > the following: > > 1) 0 (if both of my processes are scheduled @ the same time since its a HT) > 2) 1ms ( this is the min. possible time diff. > 3) some value greater than 1 ms > Is the above argument correct? A reschedule can happen once every ms, but also upon returning to userspace and when returning from an interrupt handler, and also when something in the kernel explicitly calls schedule() or sleeps (which in turn results in a call to schedule()). And each CPU runs schedule() independently. At least that's my understanding of it - if I'm wrong I hope someone on the list will correct me. -- Jesper Juhl - 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/