Question about switch_mm function
Valdis.Kletnieks at vt.edu
Valdis.Kletnieks at vt.edu
Wed Mar 25 13:25:04 EDT 2015
On Wed, 25 Mar 2015 21:35:22 +0530, Sreejith M M said:
> > This code is handling context switch from a kernel thread back to user mode
> > thread so TLB entries are invalid translation for user mode thread and do
> > not correspond to user process pgd. It is Master kernel page table
> > translation as a result of kernel thread execution.
> >
> > -Rajat
> Hi Rajat,
>
> If that is the case, why this code is put under CONFIG_SMP switch?
Vastly simplified because I'm lazy :)
If you look at the code, it's poking the status on *other* CPUs. That's why
the cpumask() stuff.
If you're on a single execution unit, you don't have to tell the other
CPU about the change in state, because there isn't an other CPU.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 848 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150325/94977dc2/attachment.bin
More information about the Kernelnewbies
mailing list