Re: Re: Re: Re: Understanding non-preemptive kernel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





Mulyadi Santosa <mulyadi.santosa@xxxxxxxxx> wrote:
Hi....

> So you mean that the code flows to call schedule() are
> different when returning to user mode and the kernel mode..?

Yes. Different thing needs to be done when you return to kernel space or
user space

To get clearer picture, please see arch/i386/kernel/entry.S beginning
with the label ret_from_intr. I am not so fluent in assembly, so I also
have limitation on understanding the codes.

>I actually understood your previous reply in a different manner. I was
> wondering " if ret_from_intr() will definitely call
> ret_from_sys_call() and ret_from_sys_call() would also call
> schedule(), then why all these resume_call() etc to reschedule ?" So
> you mean "ret_from_intr() will call ret_from_sys_call() only when it
> is returning to user mode" ? or will ret_from_intr() always call
> ret_from_sys_call() ?

This part, I need to apologize. I drew this conclusion simply by reading
Understanding The Linux Kernel 2nd edition (which is based on 2.4.x)
without actually looking on actual code. So allow me to correct them.

First of all, the label ret_from_sys_call no longer exists. Seems like
it is now renamed syscall_exit.

Second, what I meant by "ret_from_intr calling 'ret_from_sys_call' " is,
some codes are shared between them, so it's not like function A is
call()-ing B and so on. These codes fragment are executed by "jmp"-ing
into them. For example, try to look on entry.S and you will see that
resume_userspace is "called" from both ret_from_intr and system_call.
Again, "jmp

Thanks Mulyadi. I understand that ultimately looking through the code will only help.
 
 
 
 
 
 
 
 
 
 
 
 


Yahoo! Messenger- Start an email from Y! Messenger,
plus be alerted when new emails arrive.

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux