On Wed, 2 Jul 2003, Ed L Cashin wrote: > Hi. I'm trying to clarify my understanding of the role of the > active_mm field in the task_struct. > > Is it true that kernel threads and interrupt handlers use the > active_mm field to borrow the mm of a process? > > Is it true that in a process, which always has a non-null mm, always > has current->mm == current->active_mm? Yes you are correct. the kernel threads use the active vm of the process that ran last. This is done to decrease the process switch time with the help of . As the kernel threads do not use user space, it is safe to borrow the mm of another process. HTH, Raghu. > > -- > --Ed L Cashin | PGP public key: > ecashin@uga.edu | http://noserose.net/e/pgp/ > > -- > Kernelnewbies: Help each other learn about the Linux kernel. > Archive: http://mail.nl.linux.org/kernelnewbies/ > FAQ: http://kernelnewbies.org/faq/ > -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/