* task_struct.mm == NULL
@ 2001-11-28 12:03 Frank Cornelis
2001-11-28 12:18 ` Tigran Aivazian
0 siblings, 1 reply; 4+ messages in thread
From: Frank Cornelis @ 2001-11-28 12:03 UTC (permalink / raw)
To: linux-kernel; +Cc: Frank.Cornelis
Hey,
I found in some code checks for task_struct.mm being NULL.
When can task_struct.mm of a process be NULL except right before the
process-kill?
Frank.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: task_struct.mm == NULL
2001-11-28 12:03 Frank Cornelis
@ 2001-11-28 12:18 ` Tigran Aivazian
0 siblings, 0 replies; 4+ messages in thread
From: Tigran Aivazian @ 2001-11-28 12:18 UTC (permalink / raw)
To: Frank Cornelis; +Cc: linux-kernel
Hi Frank,
It can be NULL for kernel threads which do not have a user address
space. Nevertheless, their tsk->active_mm would not be NULL but point to
some process' address space.
The point of having active_mm is to minimize TLB flushes on switching
address spaces when the task is scheduled out.
Regards,
Tigran
On Wed, 28 Nov 2001, Frank Cornelis wrote:
> Hey,
>
> I found in some code checks for task_struct.mm being NULL.
> When can task_struct.mm of a process be NULL except right before the
> process-kill?
>
> Frank.
>
> -
> 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/
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: task_struct.mm == NULL
[not found] <Pine.GSO.4.31.0111281300070.8642-100000@eduserv.rug.ac.be.suse.lists.linux.kernel>
@ 2001-11-28 12:23 ` Andi Kleen
2001-11-28 14:10 ` Shaya Potter
0 siblings, 1 reply; 4+ messages in thread
From: Andi Kleen @ 2001-11-28 12:23 UTC (permalink / raw)
To: Frank Cornelis; +Cc: linux-kernel
Frank Cornelis <Frank.Cornelis@rug.ac.be> writes:
> Hey,
>
> I found in some code checks for task_struct.mm being NULL.
> When can task_struct.mm of a process be NULL except right before the
> process-kill?
For kernel threads that run in lazy-mm mode. It allows a much cheaper context
switch into kernel threads.
-Andi
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: task_struct.mm == NULL
2001-11-28 12:23 ` task_struct.mm == NULL Andi Kleen
@ 2001-11-28 14:10 ` Shaya Potter
0 siblings, 0 replies; 4+ messages in thread
From: Shaya Potter @ 2001-11-28 14:10 UTC (permalink / raw)
To: Linux Kernel List
On Wed, 2001-11-28 at 07:23, Andi Kleen wrote:
> Frank Cornelis <Frank.Cornelis@rug.ac.be> writes:
>
> > Hey,
> >
> > I found in some code checks for task_struct.mm being NULL.
> > When can task_struct.mm of a process be NULL except right before the
> > process-kill?
>
> For kernel threads that run in lazy-mm mode. It allows a much cheaper context
> switch into kernel threads.
oh. so not all kernel threades have mm == null. I used to think that
kernel threads ran in the kernel's address space, therefore there was no
point in having an mm struct as that just defines a virtual process
address space. What's this lazy_mm mode?
thanks,
shaya
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2001-11-28 14:13 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <Pine.GSO.4.31.0111281300070.8642-100000@eduserv.rug.ac.be.suse.lists.linux.kernel>
2001-11-28 12:23 ` task_struct.mm == NULL Andi Kleen
2001-11-28 14:10 ` Shaya Potter
2001-11-28 12:03 Frank Cornelis
2001-11-28 12:18 ` Tigran Aivazian
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox