Re: scheduler/SCHED_FIFO behaviour
I am not sure if my question was clear enough or I couldnt interpret you answer correctly.(If it was the case I apologise for that). My question is, as I said I am measuring the schedule time difference between my 2 of my SCHED_FIFO process in schedule() .But, I get only one set of readings (i.e., schedule() is being called once which implies my process is being scheduled only once and run till completion) Also, as I said my interrupts are being processed during this time.I inspected /proc/interrupts for this.So, my question was if interrupts heve been processed several times the 2 SCHED_FIFO process which has been interrupted must have been resecheduled several times and for this upon returning from the interrupt handler the schedule() function must have been called several times to schedule the 2 process which were running.But, as I said I get only one reading?? From your reply, I come to understand that when an interrupt interrupts my user process.it runs straight way but upon return from the interrupt handler does it not call schedule() to again resume my interrupted process? Please help. Thanks arun From: Steven Rostedt <[EMAIL PROTECTED]> To: Arun Srinivas <[EMAIL PROTECTED]> CC: [EMAIL PROTECTED], LKML Subject: Re: scheduler/SCHED_FIFO behaviour Date: Mon, 04 Apr 2005 23:33:05 -0400 On Tue, 2005-04-05 at 07:46 +0530, Arun Srinivas wrote: > > So, what I want from the above code is whenever process1 or process2 is > being scheduled measure the time and print the timedifference. But, when I > run my 2 processes as SCHED_FIFO processes i get only one set of > readingsindicating they have been scheduled only once and run till > completion. > > But, as we saw above if interrupts have been processed they must have been > scheduled several times(i.e., schedule() called several times). Is my > measurement procedure not correct? No! Interrupts are not scheduled. When an interrupt goes off, the interrupt service routine (ISR) is executed. It doesn't need to be scheduled. It runs right where it interrupted the CPU. That's why you need to be careful about protecting data that ISRs manipulate with spin_lock_irqsave. This not only protects against multiple CPUs, but turns off interrupts so that an interrupt wont be called and one of the ISRs modify the data you need to be atomic. Your tasks are running and will be interrupted by an ISR, on return from the routine, a check is made to see if your tasks should be preempted. But since they are the highest running tasks and in FIFO mode, the check determines that schedule should not be called. So you will not see any schedules while your tasks are running. Now, if you where running Ingo's RT patch with PREEMPT_HARDIRQ enabled, and your tasks were of lower priority than the ISR thread handlers, then you would see the scheduling. Maybe that is what you want? -- Steve _ Send money to India http://ads.mediaturf.net/event.ng/Type=click&FlightID=17307&AdID=44925&TargetID=9763&Targets=9763&Values=414,868,1093,2385&Redirect=http:%2F%2Fwww.icicibanknripromotions.com%2Fm2i_feb%2Fnri_M2I_feb.jsp%3Fadid%3D44925%26siteid%3D1093%26flightid%3D17307 Get a FREE 30 minute India Calling Card. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: scheduler/SCHED_FIFO behaviour
ok.My program runs for 30 sec. approx. I did #!/bin/sh cat /proc/interrupts run_test cat /proc/interrupts and I see there is quite some difference in the numbers.meaning interrupts have been processed by the respective processor when my SCHED_FIFO processes have been running on both the cpu's. But, then I am not sure why I am getting only 1 reading for the timediff. of schedule between my 2 processes.I do the following in my schedule() in sched.c: ( I make the kernel know the pid's of my 2 process...lets say pid1 and pid2) /* in function schedule() in sched.c*/ schedule() { need _resched: /* after now=sched_clock(); I insert my code here*/ if(current->pid=pid1) { time1=now; } elseif (current->pid=pid2) { time2=now; } /*after i get the 2 values for time1 and time2*/ timediff= time1-time2;// or time2 - time1 which ever is greater*/ printk(KERN_ERR "%llu",timediff); } So, what I want from the above code is whenever process1 or process2 is being scheduled measure the time and print the timedifference. But, when I run my 2 processes as SCHED_FIFO processes i get only one set of readingsindicating they have been scheduled only once and run till completion. But, as we saw above if interrupts have been processed they must have been scheduled several times(i.e., schedule() called several times). Is my measurement procedure not correct? please help. thanks arun From: Steven Rostedt <[EMAIL PROTECTED]> To: Arun Srinivas <[EMAIL PROTECTED]> CC: [EMAIL PROTECTED], LKML Subject: Re: scheduler/SCHED_FIFO behaviour Date: Mon, 04 Apr 2005 19:17:04 -0400 On Tue, 2005-04-05 at 04:36 +0530, Arun Srinivas wrote: > I am scheduling 2 SCHED_FIFO processes and set them affinity( process A runs > on processor 1 and process B runs on processor 2), on a HT processor.(I did > this cause I wanted to run them together).Now, in schedule() I measure the > timedifference between when they are scheduled. I found that when I > introduce these 2 processes as SCHED_FIFO they are > > 1)scheduled only once and run till completion ( they running time is around > 2 mins.) If they are the highest priority task, and running as FIFO this is the proper behavior. > 2)entire system appears frozenno mouse/key presses detected until the > processes exit. > If X is not at a higher priority than the test you are running, it will never get a chance to run. > >From what I observed does it mean that even the OS / interrupt handler does > not occur during the entire period of time these real time processes run?? > (as I said the processes run in minutes). The interrupts do get processed. Now the bottom halves and tasklets may be starved if they are set at a lower priority than your test (ie. the ksoftirqd thread). But most likely they are processed too. > How can I verify that? > #!/bin/sh cat /proc/interrupts run_test cat /proc/interrupts If the run_test takes 2 minutes, you should see a large difference in the two outputs. -- Steve > Thanks > Arun _ The MSN Survey! http://www.cross-tab.com/surveys/run/test.asp?sid=2026&respid=1 Help us help you better! - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
scheduler/SCHED_FIFO behaviour
I am scheduling 2 SCHED_FIFO processes and set them affinity( process A runs on processor 1 and process B runs on processor 2), on a HT processor.(I did this cause I wanted to run them together).Now, in schedule() I measure the timedifference between when they are scheduled. I found that when I introduce these 2 processes as SCHED_FIFO they are 1)scheduled only once and run till completion ( they running time is around 2 mins.) 2)entire system appears frozenno mouse/key presses detected until the processes exit. From what I observed does it mean that even the OS / interrupt handler does not occur during the entire period of time these real time processes run?? (as I said the processes run in minutes). How can I verify that? Thanks Arun From: Steven Rostedt <[EMAIL PROTECTED]> To: Arun Srinivas <[EMAIL PROTECTED]> CC: [EMAIL PROTECTED], LKML Subject: Re: sched /HT processor Date: Sun, 03 Apr 2005 19:08:06 -0400 On Mon, 2005-04-04 at 04:22 +0530, Arun Srinivas wrote: > Thanks. yes, a reschedule may not take place after a ms, if the currently > running task cannot be preempted by another task. > > (1) But, can a reschedule happen within a millisec (or once a process is > scheduled can schedule() be called before the next millisec.) ? > Yes. For example: a high priority task may be waiting for some IO to come in. Right after the normal timer interrupt scheduled another task, the IO may come in and wake the high priority process up. This process will preempt the other task right away. (ie. less than 1 ms). > 2) Also in case argument (1) is not true, and I want rescheduling to be done > (i.e., schedule() called) in less than 1 ms , can I directly change the HZ > value in and recompile my kernel so that my timer > interrupt will occur frequently? > Well, 1) is true, but you can also increase HZ over 1000 if you like, but that will usually cause more overhead, since, although a schedule may not take place every HZ, a timer interrupt will. -- Steve _ Want to meet David Beckham? http://www.msn.co.in/gillette/ Fly to Madrid with Gillette! - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: sched /HT processor
Thanks. yes, a reschedule may not take place after a ms, if the currently running task cannot be preempted by another task. (1) But, can a reschedule happen within a millisec (or once a process is scheduled can schedule() be called before the next millisec.) ? 2) Also in case argument (1) is not true, and I want rescheduling to be done (i.e., schedule() called) in less than 1 ms , can I directly change the HZ value in and recompile my kernel so that my timer interrupt will occur frequently? Thanks Arun From: Steven Rostedt <[EMAIL PROTECTED]> To: Jesper Juhl <[EMAIL PROTECTED]> CC: Arun Srinivas <[EMAIL PROTECTED]>,LKML Subject: Re: sched /HT processor Date: Sun, 03 Apr 2005 11:31:03 -0400 On Sun, 2005-04-03 at 13:17 +0200, Jesper Juhl wrote: > > 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. You're correct, but I'll add some more details here. The actual schedule happens when needed. A schedule may not take place at every ms, if the task running is not done with its time slice and no events happened where another task should preempt it. If an RT task is running in a FIFO policy, then it will continue to run until it calls schedule itself or another process of higher priority preempts it. Now if you don't have PREEMPT turned on, than the schedule won't take place at all while a task is in the kernel, unless the task explicitly calls schedule. What happens on a timer interrupt where a task is done with its time slice or another event where a schedule should take place, is just the need_resched flag is set for the task. On return from the interrupt the flag is checked, and if set a schedule is called. This is still a pretty basic description of what really happens, and if you want to learn more, just start searching the kernel code for schedule and need_resched. Don't forget to look in the asm code (ie entry.S, and dependent on your arch other *.S files). -- Steve _ The MSN Survey! http://www.cross-tab.com/surveys/run/test.asp?sid=2026&respid=1 Help us help you better! - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: sched /HT processor
From: Steven Rostedt <[EMAIL PROTECTED]> To: Jesper Juhl <[EMAIL PROTECTED]> CC: Arun Srinivas <[EMAIL PROTECTED]>,LKML Subject: Re: sched /HT processor Date: Sun, 03 Apr 2005 11:31:03 -0400 On Sun, 2005-04-03 at 13:17 +0200, Jesper Juhl wrote: > > 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. You're correct, but I'll add some more details here. The actual schedule happens when needed. A schedule may not take place at every ms, if the task running is not done with its time slice and no events happened where another task should preempt it. If an RT task is running in a FIFO policy, then it will continue to run until it calls schedule itself or another process of higher priority preempts it. Now if you don't have PREEMPT turned on, than the schedule won't take place at all while a task is in the kernel, unless the task explicitly calls schedule. What happens on a timer interrupt where a task is done with its time slice or another event where a schedule should take place, is just the need_resched flag is set for the task. On return from the interrupt the flag is checked, and if set a schedule is called. This is still a pretty basic description of what really happens, and if you want to learn more, just start searching the kernel code for schedule and need_resched. Don't forget to look in the asm code (ie entry.S, and dependent on your arch other *.S files). -- Steve _ News, views and gossip. http://www.msn.co.in/Cinema/ Get it all at MSN Cinema! - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: sched /HT processor
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? Thanks From: Steven Rostedt <[EMAIL PROTECTED]> To: Arun Srinivas <[EMAIL PROTECTED]> CC: LKML Subject: Re: sched /HT processor Date: Sat, 02 Apr 2005 20:17:54 -0500 On Sun, 2005-04-03 at 06:07 +0530, Arun Srinivas wrote: > HI > > I have pentium4 hyperthreaded processor.I am using kernel 2.6.5 and i > rebuilt my kernel with CONFIG_SMP enabled (in this kernel source there is > nothing such as CONFIG_SMT...i noticed this only in recent 2.6.11). > I don't have a 2.6.5 available, but I do have a 2.6.9 to look at. > 1) So, after I rebulit it with CONFIG_SMP enabled does linux recogonize my > machine as hyperthreaded or as 2 seperate processor? Also, if it does not > recogonize it as hyperthreaded(but only as 2 seperate CPU's), does the > scheduler schedule instruction in the 2 cpu's independently? (does it > maintain 2 seperate runqueues? > I believe even HT on 2.6.11 maintains two different runqueues. But it doesn't care so much to jump from one runqueue to the next if it is HT. > 2) If it has indeed recogonized this as hyperthreaded processor...does the > scheduler use a common runqueue for the 2 logical processor? > No, you wouldn't want to. > (please read below) What do you want us to see? > * > (I am attaching the ouput of 'dmesg' (command) on my machine) > * > Apr 2 17:43:12 kulick2 kernel: Linux version 2.6.5-1.358custom > ([EMAIL PROTECTED]) (gcc version 3.3 > .3 20040412 (Red Hat Linux 3.3.3-7)) #133 SMP Wed Mar 30 12:16:27 CST 2005 > Apr 2 17:43:12 kulick2 kernel: BIOS-provided physical RAM map: > Apr 2 17:43:12 kulick2 kernel: BIOS-e820: - > 000a (usable) > Apr 2 17:43:12 kulick2 kernel: BIOS-e820: 000f - > 0010 (reserved) > Apr 2 17:43:12 kulick2 kernel: BIOS-e820: 0010 - > 1f77 (usable) > Apr 2 17:43:12 kulick2 kernel: BIOS-e820: 1f77 - > 1f772000 (ACPI NVS) > Apr 2 17:43:12 kulick2 kernel: BIOS-e820: 1f772000 - > 1f793000 (ACPI data) > Apr 2 17:43:12 kulick2 kernel: BIOS-e820: 1f793000 - > 1f80 (reserved) > Apr 2 17:43:12 kulick2 kernel: BIOS-e820: fec0 - > fec1 (reserved) > Apr 2 17:43:12 kulick2 kernel: BIOS-e820: fecf - > fecf1000 (reserved) > Apr 2 17:43:12 kulick2 kernel: BIOS-e820: fed2 - > fed9 (reserved) > Apr 2 17:43:12 kulick2 kernel: BIOS-e820: fee0 - > fee1 (reserved) > Apr 2 17:43:12 kulick2 kernel: BIOS-e820: ffb0 - > 0001 (reserved) > Apr 2 17:43:12 kulick2 kernel: 0MB HIGHMEM available. > Apr 2 17:43:12 kulick2 kernel: 503MB LOWMEM available. > Apr 2 17:43:12 kulick2 kernel: ACPI: S3 and PAE do not like each other for > now, S3 disabled. > Apr 2 17:43:12 kulick2 kernel: found SMP MP-table at 000fe710 > Apr 2 17:43:12 kulick2 kernel: On node 0 totalpages: 128880 > Apr 2 17:43:12 kulick2 kernel: DMA zone: 4096 pages, LIFO batch:1 > Apr 2 17:43:12 kulick2 kernel: Normal zone: 124784 pages, LIFO batch:16 > Apr 2 17:43:12 kulick2 kernel: HighMem zone: 0 pages, LIFO batch:1 > Apr 2 17:43:12 kulick2 kernel: DMI 2.3 present. > Apr 2 17:43:12 kulick2 kernel: Using APIC driver default > Apr 2 17:43:12 kulick2 kernel: ACPI: RSDP (v000 DELL >) @ > 0x000feba0 > Apr 2 17:43:12 kulick2 kernel: ACPI: RSDT (v001 DELLGX270 0x0007 > ASL 0x0061) @ > 0x000fd192 > Apr 2 17:43:12 kulick2 kernel: ACPI: FADT (v001 DELLGX270 0x0007 > ASL 0x0061) @ > 0x000fd1ca > Apr 2 17:43:12 kulick2 kernel: ACPI: SSDT (v001 DELLst_ex 0x1000 > MSFT 0x010d) @ > 0xfffd4eee > Apr 2 17:43:12 kulick2 irqbalance: irqbalance startup succeeded > Apr 2 17:43:12 kulick2 kernel: ACPI: MADT (v001 DELLGX270 0x0007 > ASL 0x0061) @ > 0x000fd23e > Apr 2 17:43:12 kulick2 kernel: A
setting cpu affinity-help
hi can someone show me an example usage of sched_setaffinity().I do not know how to set the affinity mask for a process.please. thanks arun _ Marriages at Bharatmatriony.com http://www.bharatmatrimony.com/cgi-bin/bmclicks1.cgi?74 Relationships that last forever. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: sched /HT processor
I attached the 'dmesg' output because there it shows that my kernel recogonized 2 cpu's.As said earlier , are they treated as 2 physical cpu's or logical cpu's? From: Steven Rostedt <[EMAIL PROTECTED]> To: Arun Srinivas <[EMAIL PROTECTED]> CC: LKML Subject: Re: sched /HT processor Date: Sat, 02 Apr 2005 20:17:54 -0500 On Sun, 2005-04-03 at 06:07 +0530, Arun Srinivas wrote: > HI > > I have pentium4 hyperthreaded processor.I am using kernel 2.6.5 and i > rebuilt my kernel with CONFIG_SMP enabled (in this kernel source there is > nothing such as CONFIG_SMT...i noticed this only in recent 2.6.11). > I don't have a 2.6.5 available, but I do have a 2.6.9 to look at. > 1) So, after I rebulit it with CONFIG_SMP enabled does linux recogonize my > machine as hyperthreaded or as 2 seperate processor? Also, if it does not > recogonize it as hyperthreaded(but only as 2 seperate CPU's), does the > scheduler schedule instruction in the 2 cpu's independently? (does it > maintain 2 seperate runqueues? > I believe even HT on 2.6.11 maintains two different runqueues. But it doesn't care so much to jump from one runqueue to the next if it is HT. > 2) If it has indeed recogonized this as hyperthreaded processor...does the > scheduler use a common runqueue for the 2 logical processor? > No, you wouldn't want to. > (please read below) What do you want us to see? > * > (I am attaching the ouput of 'dmesg' (command) on my machine) > * > Apr 2 17:43:12 kulick2 kernel: Linux version 2.6.5-1.358custom > ([EMAIL PROTECTED]) (gcc version 3.3 > .3 20040412 (Red Hat Linux 3.3.3-7)) #133 SMP Wed Mar 30 12:16:27 CST 2005 > Apr 2 17:43:12 kulick2 kernel: BIOS-provided physical RAM map: > Apr 2 17:43:12 kulick2 kernel: BIOS-e820: - > 000a (usable) > Apr 2 17:43:12 kulick2 kernel: BIOS-e820: 000f - > 0010 (reserved) > Apr 2 17:43:12 kulick2 kernel: BIOS-e820: 0010 - > 1f77 (usable) > Apr 2 17:43:12 kulick2 kernel: BIOS-e820: 1f77 - > 1f772000 (ACPI NVS) > Apr 2 17:43:12 kulick2 kernel: BIOS-e820: 1f772000 - > 1f793000 (ACPI data) > Apr 2 17:43:12 kulick2 kernel: BIOS-e820: 1f793000 - > 1f80 (reserved) > Apr 2 17:43:12 kulick2 kernel: BIOS-e820: fec0 - > fec1 (reserved) > Apr 2 17:43:12 kulick2 kernel: BIOS-e820: fecf - > fecf1000 (reserved) > Apr 2 17:43:12 kulick2 kernel: BIOS-e820: fed2 - > fed9 (reserved) > Apr 2 17:43:12 kulick2 kernel: BIOS-e820: fee0 - > fee1 (reserved) > Apr 2 17:43:12 kulick2 kernel: BIOS-e820: ffb0 - > 0001 (reserved) > Apr 2 17:43:12 kulick2 kernel: 0MB HIGHMEM available. > Apr 2 17:43:12 kulick2 kernel: 503MB LOWMEM available. > Apr 2 17:43:12 kulick2 kernel: ACPI: S3 and PAE do not like each other for > now, S3 disabled. > Apr 2 17:43:12 kulick2 kernel: found SMP MP-table at 000fe710 > Apr 2 17:43:12 kulick2 kernel: On node 0 totalpages: 128880 > Apr 2 17:43:12 kulick2 kernel: DMA zone: 4096 pages, LIFO batch:1 > Apr 2 17:43:12 kulick2 kernel: Normal zone: 124784 pages, LIFO batch:16 > Apr 2 17:43:12 kulick2 kernel: HighMem zone: 0 pages, LIFO batch:1 > Apr 2 17:43:12 kulick2 kernel: DMI 2.3 present. > Apr 2 17:43:12 kulick2 kernel: Using APIC driver default > Apr 2 17:43:12 kulick2 kernel: ACPI: RSDP (v000 DELL >) @ > 0x000feba0 > Apr 2 17:43:12 kulick2 kernel: ACPI: RSDT (v001 DELLGX270 0x0007 > ASL 0x0061) @ > 0x000fd192 > Apr 2 17:43:12 kulick2 kernel: ACPI: FADT (v001 DELLGX270 0x0007 > ASL 0x0061) @ > 0x000fd1ca > Apr 2 17:43:12 kulick2 kernel: ACPI: SSDT (v001 DELLst_ex 0x1000 > MSFT 0x010d) @ > 0xfffd4eee > Apr 2 17:43:12 kulick2 irqbalance: irqbalance startup succeeded > Apr 2 17:43:12 kulick2 kernel: ACPI: MADT (v001 DELLGX270 0x0007 > ASL 0x0061) @ > 0x000fd23e > Apr 2 17:43:12 kulick2 kernel: ACPI: BOOT (v001 DELLGX270 0x0007 > ASL 0x0061) @ > 0x000fd2aa > Apr 2 17:43:12 kulick2 kernel: ACPI: ASF! (v016 DELLGX270 0x0007 > ASL 0x0061) @ > 0x000fd2d2 > Apr 2 17:43:12 kulick2 kernel: ACPI: DSDT (v001 DELLdt_ex 0x1000 > MSFT 0x010d) @ > 0x > Apr 2 17:43:12 kulick2 kernel: ACPI: PM-Timer IO Port: 0x808 > Apr 2 17:43:12 kulick2 kernel: AC
sched /HT processor
HI I have pentium4 hyperthreaded processor.I am using kernel 2.6.5 and i rebuilt my kernel with CONFIG_SMP enabled (in this kernel source there is nothing such as CONFIG_SMT...i noticed this only in recent 2.6.11). 1) So, after I rebulit it with CONFIG_SMP enabled does linux recogonize my machine as hyperthreaded or as 2 seperate processor? Also, if it does not recogonize it as hyperthreaded(but only as 2 seperate CPU's), does the scheduler schedule instruction in the 2 cpu's independently? (does it maintain 2 seperate runqueues? 2) If it has indeed recogonized this as hyperthreaded processor...does the scheduler use a common runqueue for the 2 logical processor? (please read below) * (I am attaching the ouput of 'dmesg' (command) on my machine) * Apr 2 17:43:12 kulick2 kernel: Linux version 2.6.5-1.358custom ([EMAIL PROTECTED]) (gcc version 3.3 .3 20040412 (Red Hat Linux 3.3.3-7)) #133 SMP Wed Mar 30 12:16:27 CST 2005 Apr 2 17:43:12 kulick2 kernel: BIOS-provided physical RAM map: Apr 2 17:43:12 kulick2 kernel: BIOS-e820: - 000a (usable) Apr 2 17:43:12 kulick2 kernel: BIOS-e820: 000f - 0010 (reserved) Apr 2 17:43:12 kulick2 kernel: BIOS-e820: 0010 - 1f77 (usable) Apr 2 17:43:12 kulick2 kernel: BIOS-e820: 1f77 - 1f772000 (ACPI NVS) Apr 2 17:43:12 kulick2 kernel: BIOS-e820: 1f772000 - 1f793000 (ACPI data) Apr 2 17:43:12 kulick2 kernel: BIOS-e820: 1f793000 - 1f80 (reserved) Apr 2 17:43:12 kulick2 kernel: BIOS-e820: fec0 - fec1 (reserved) Apr 2 17:43:12 kulick2 kernel: BIOS-e820: fecf - fecf1000 (reserved) Apr 2 17:43:12 kulick2 kernel: BIOS-e820: fed2 - fed9 (reserved) Apr 2 17:43:12 kulick2 kernel: BIOS-e820: fee0 - fee1 (reserved) Apr 2 17:43:12 kulick2 kernel: BIOS-e820: ffb0 - 0001 (reserved) Apr 2 17:43:12 kulick2 kernel: 0MB HIGHMEM available. Apr 2 17:43:12 kulick2 kernel: 503MB LOWMEM available. Apr 2 17:43:12 kulick2 kernel: ACPI: S3 and PAE do not like each other for now, S3 disabled. Apr 2 17:43:12 kulick2 kernel: found SMP MP-table at 000fe710 Apr 2 17:43:12 kulick2 kernel: On node 0 totalpages: 128880 Apr 2 17:43:12 kulick2 kernel: DMA zone: 4096 pages, LIFO batch:1 Apr 2 17:43:12 kulick2 kernel: Normal zone: 124784 pages, LIFO batch:16 Apr 2 17:43:12 kulick2 kernel: HighMem zone: 0 pages, LIFO batch:1 Apr 2 17:43:12 kulick2 kernel: DMI 2.3 present. Apr 2 17:43:12 kulick2 kernel: Using APIC driver default Apr 2 17:43:12 kulick2 kernel: ACPI: RSDP (v000 DELL ) @ 0x000feba0 Apr 2 17:43:12 kulick2 kernel: ACPI: RSDT (v001 DELLGX270 0x0007 ASL 0x0061) @ 0x000fd192 Apr 2 17:43:12 kulick2 kernel: ACPI: FADT (v001 DELLGX270 0x0007 ASL 0x0061) @ 0x000fd1ca Apr 2 17:43:12 kulick2 kernel: ACPI: SSDT (v001 DELLst_ex 0x1000 MSFT 0x010d) @ 0xfffd4eee Apr 2 17:43:12 kulick2 irqbalance: irqbalance startup succeeded Apr 2 17:43:12 kulick2 kernel: ACPI: MADT (v001 DELLGX270 0x0007 ASL 0x0061) @ 0x000fd23e Apr 2 17:43:12 kulick2 kernel: ACPI: BOOT (v001 DELLGX270 0x0007 ASL 0x0061) @ 0x000fd2aa Apr 2 17:43:12 kulick2 kernel: ACPI: ASF! (v016 DELLGX270 0x0007 ASL 0x0061) @ 0x000fd2d2 Apr 2 17:43:12 kulick2 kernel: ACPI: DSDT (v001 DELLdt_ex 0x1000 MSFT 0x010d) @ 0x Apr 2 17:43:12 kulick2 kernel: ACPI: PM-Timer IO Port: 0x808 Apr 2 17:43:12 kulick2 kernel: ACPI: LAPIC (acpi_id[0x01] lapic_id[0x00] enabled) Apr 2 17:43:12 kulick2 kernel: Processor #0 15:2 APIC version 20 Apr 2 17:43:12 kulick2 kernel: ACPI: LAPIC (acpi_id[0x02] lapic_id[0x01] enabled) Apr 2 17:43:12 kulick2 kernel: Processor #1 15:2 APIC version 20 Apr 2 17:43:12 kulick2 kernel: ACPI: LAPIC (acpi_id[0x03] lapic_id[0x01] disabled) Apr 2 17:43:12 kulick2 kernel: ACPI: LAPIC (acpi_id[0x04] lapic_id[0x03] disabled) Apr 2 17:43:12 kulick2 kernel: ACPI: IOAPIC (id[0x02] address[0xfec0] global_irq_base[0x0] ) Apr 2 17:43:12 kulick2 kernel: IOAPIC[0]: Assigned apic_id 2 Apr 2 17:43:12 kulick2 kernel: IOAPIC[0]: apic_id 2, version 32, address 0xfec0, GSI 0-23 Apr 2 17:43:12 kulick2 kernel: ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl) Apr 2 17:43:12 kulick2 kernel: ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level) Apr 2 17:43:12 kulick2 kernel: Enabling APIC mode: Flat. Using 1 I/O APICs Apr 2 17:43:12 kulick2 kernel: Using ACPI (MADT) for SMP configuration information Apr 2 17:43:12 kulick2 portmap: portmap startup succeeded
Re: sched_setscheduler() and usage issues ....please help
When I schedule my process with SCHED_FIFO policy (using sched_setscheduler()) , is there any means to verify that it is indeed being scheduled with the same priority? thanks arun From: Steven Rostedt <[EMAIL PROTECTED]> To: Arun Srinivas <[EMAIL PROTECTED]> Subject: Re: sched_setscheduler() and usage issues please help Date: Tue, 29 Mar 2005 06:31:43 -0500 On Tue, 2005-03-29 at 13:25 +0530, Arun Srinivas wrote: > thanks.gcc says "could not find strutils.h". I am using kernel 2.6.x with > gcc 3.3.4. Where can I find the file? Oops! Sorry, I gave you a modified version of my actual program. I have my own usage wrapper, that I use in all my tools. I took it out, but forgot about my header. That is a custom header, just take it out and it will compile. OK, just to be clean, I've attached it here. -- Steve << setscheduler.c >> _ Get the job you always wanted. http://www.naukri.com/tieups/tieups.php?othersrcp=736 Its simple, post your CV on Naukri.com - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
sched_setscheduler() and usage issues ....please help
I am trying to set the SCHED_FIFO policy for my process.I am using sched_setscheduler() function to do this. I am following the correct syntax and running it as root process.I am using the given syntax i.e., int sched_setscheduler(pid_t pid, int policy, const struct sched_param *p); (SCHED_FIFO for the policy and priority in the range of 1 to 99 for p). But the function returns with an value of -1. I am trying to call this function from the user-space. 1) Is this usage correct? 2)How do I read the error code (i.e., text description of what kiind of error occurred like for eg., ESRCH,EPERM,EINVAL). Please help. thanks Arun _ Don't know where to look for your life partner? http://www.bharatmatrimony.com/cgi-bin/bmclicks1.cgi?74 Trust BharatMatrimony.com - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: help needed pls. scheduler(kernel 2.6) + hyperthreaded related questions?
few more trivial Q's (bear with me I'm a newbie to kernel world): 1) As I said I have a process that spawns 2 threads(thread A and B).I am trying to measure the exact time @ which they are being scheduled.For this I am using the rdtsc() (when threads A and B come) in enqueue_task()..where they are being inserted into the priority array. Is this a correct way of measuring? 2) also in task_struct.is "tgid" the id of my process and each of threads hav a unique pid?? 3) I saw frm the kernel docs tht realtime tasks hav priority 0 to 99. So using setscheduler means do I have to enforce a priority in one of these ranges to make my threads as soft/hard realtime task. thanks in advance for your patience. From: Nick Piggin <[EMAIL PROTECTED]> To: Arun Srinivas <[EMAIL PROTECTED]> CC: linux-kernel@vger.kernel.org Subject: Re: help needed pls. scheduler(kernel 2.6) + hyperthreaded related questions? Date: Wed, 23 Mar 2005 18:37:16 +1100 Arun Srinivas wrote: If the SMT (apart from SMP) support is enabled in the .config file, does the kernel recogonize the 2 logical processor as 2 logical or 2 physical processors? You shouldn't be able to select SMT if SMP is not enabled. If SMT and SMP is selected, then the scheduler will recognise the 2 processors as logical ones. Also, as the hyperthreaded processor may schedule 2 threads in the 2 logical cpu's, and it may not necessarily be form the same process i.e., the 2 thread it schedules may be from the same or from the different process. Yes. So, is there any way I can tell the scheduler (assuming I make the scheduler recogonize my 2 threads..i.e., it knows their pid) to schedule always my 2 threads @ the same time? How do I go abt it? Use sched_setaffinity to force each thread onto the particular CPU. Use sched_setscheduler to acquire a realtime scheduling policy. Then use mutexes to synchronise your threads so they run the desired code segment at the same time. _ Screensavers unlimited! http://www.msn.co.in/Download/screensaver/ Download now! - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: help needed pls. scheduler(kernel 2.6) + hyperthreaded related questions?
If the SMT (apart from SMP) support is enabled in the .config file, does the kernel recogonize the 2 logical processor as 2 logical or 2 physical processors? Also, as the hyperthreaded processor may schedule 2 threads in the 2 logical cpu's, and it may not necessarily be form the same process i.e., the 2 thread it schedules may be from the same or from the different process. So, is there any way I can tell the scheduler (assuming I make the scheduler recogonize my 2 threads..i.e., it knows their pid) to schedule always my 2 threads @ the same time? How do I go abt it? Pls. help.Thanks in Advance. From: Nick Piggin <[EMAIL PROTECTED]> To: Arun Srinivas <[EMAIL PROTECTED]> CC: linux-kernel@vger.kernel.org Subject: Re: help needed pls. scheduler(kernel 2.6) + hyperthreaded related questions? Date: Wed, 23 Mar 2005 10:16:20 +1100 Arun Srinivas wrote: Pls. help me. I went through the sched.c for kernel 2.6 and saw that it supports hyperthreading.I would be glad if someone could answer this question(if am not wrong a HT processor has 2 architectural states and one execution unit...i.e., two pipeline streams) 1)when there are 2 processes a parent and child(created by fork()) do they get scheduled @ the same time...ie., when the parent process is put into one pipeline, do the child also gets scheduled the same time? No. 2) what abt in the case of threads(I read tht as opposed to kernel2.4,where threads are treated as processes) ..kernel 2.6 treats threads as threads. So, when two paired threads get into execution are they always scheduled at the same time? No. Also, it would be helpful if someone could suggest which part of sched.c shud i look into to find out how threads are scheduled for a normal processor and for a hyperthreaded processor It is pretty tricky. Basically processes on different CPUs are scheduled completely independently of one another. The only time when they may get moved from one CPU to another is with load_balance, load_balance_newidle, active_load_balance, try_to_wake_up, sched_exec, wake_up_new_task. _ News, views and gossip. http://www.msn.co.in/Cinema/ Get it all at MSN Cinema! - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
help needed pls. scheduler(kernel 2.6) + hyperthreaded related questions?
Pls. help me. I went through the sched.c for kernel 2.6 and saw that it supports hyperthreading.I would be glad if someone could answer this question(if am not wrong a HT processor has 2 architectural states and one execution unit...i.e., two pipeline streams) 1)when there are 2 processes a parent and child(created by fork()) do they get scheduled @ the same time...ie., when the parent process is put into one pipeline, do the child also gets scheduled the same time? 2) what abt in the case of threads(I read tht as opposed to kernel2.4,where threads are treated as processes) ..kernel 2.6 treats threads as threads. So, when two paired threads get into execution are they always scheduled at the same time? Also, it would be helpful if someone could suggest which part of sched.c shud i look into to find out how threads are scheduled for a normal processor and for a hyperthreaded processor Pls. CC your replies to this email address [EMAIL PROTECTED] Thanks Arun _ Don't know where to look for your life partner? http://www.bharatmatrimony.com/cgi-bin/bmclicks1.cgi?74 Trust BharatMatrimony.com - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
scheduler(kernel 2.6) + hyperthreaded related questions?
I went through the sched.c for kernel 2.6 and saw that it supports hyperthreading.I would be glad if someone could answer this question(if am not wrong a HT processor has 2 architectural states and one execution unit...i.e., two pipeline streams) 1)when there are 2 processes a parent and child(created by fork()) do they get scheduled @ the same time...ie., when the parent process is put into one pipeline, do the child also gets scheduled the same time? 2) what abt in the case of threads(I read tht as opposed to kernel2.4,where threads are treated as processes) ..kernel 2.6 treats threads as threads. So, when two paired threads get into execution are they always scheduled at the same time? Also, it would be helpful if someone could suggest which part of sched.c shud i look into to find out how threads are scheduled for a normal processor and for a hyperthreaded processor Pls. CC your replies to this email address [EMAIL PROTECTED] Thanks Arun _ The MSN Survey! http://www.cross-tab.com/surveys/run/test.asp?sid=2026&respid=1 Help us help you better! - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/