All of lore.kernel.org
 help / color / mirror / Atom feed
From: Valdis.Kletnieks@vt.edu (Valdis.Kletnieks at vt.edu)
To: kernelnewbies@lists.kernelnewbies.org
Subject: Question about switch_mm function
Date: Wed, 25 Mar 2015 13:25:04 -0400	[thread overview]
Message-ID: <6084.1427304304@turing-police.cc.vt.edu> (raw)
In-Reply-To: Your message of "Wed, 25 Mar 2015 21:35:22 +0530." <CAEDT3uTOUtS6jfpDQ+jpw-WABPBSk7f-nWEVQ5Eyaq=63o+7cg@mail.gmail.com>

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 

  reply	other threads:[~2015-03-25 17:25 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-28 16:26 Question about switch_mm function Sreejith M M
2015-03-25 13:30 ` Sreejith M M
2015-03-25 16:00   ` Rajat Sharma
2015-03-25 16:05     ` Sreejith M M
2015-03-25 17:25       ` Valdis.Kletnieks at vt.edu [this message]
2015-03-25 17:31         ` Sreejith M M
2015-03-25 17:33           ` Rajat Sharma
2015-03-25 19:13             ` Rajat Sharma
2015-03-25 19:25               ` Valdis.Kletnieks at vt.edu
2015-03-25 19:39                 ` Rajat Sharma

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6084.1427304304@turing-police.cc.vt.edu \
    --to=valdis.kletnieks@vt.edu \
    --cc=kernelnewbies@lists.kernelnewbies.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.