From mboxrd@z Thu Jan 1 00:00:00 1970 From: fs.rajat@gmail.com (Rajat Sharma) Date: Wed, 25 Mar 2015 10:33:58 -0700 Subject: Question about switch_mm function In-Reply-To: References: <6084.1427304304@turing-police.cc.vt.edu> Message-ID: To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org On Mar 25, 2015 10:31 AM, "Sreejith M M" wrote: > > On Wed, Mar 25, 2015 at 10:55 PM, wrote: > > 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. > > can you come out of this lazy mode explain this a bit more because I > am a newbie ?or tell me what else I should know before I have to > understand this code > > -- > Regards, > Sreejith Valdis is talking about lazy tlb flush, not him being lazy. Otherwise he wouldn't have replied at all :) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150325/90c7a184/attachment-0001.html