Kernel Newbies archive on lore.kernel.org
 help / color / Atom feed
From: "Josué Feliu" <jofepre@fiv.upv.es>
To: kernelnewbies@kernelnewbies.org
Subject: Are MSRs saved and restored on context switches?
Date: Fri, 12 Jul 2019 17:58:01 +0200
Message-ID: <8fce5e84-e559-3b02-ddbb-484685bc1317@fiv.upv.es> (raw)
In-Reply-To: <fd19f8e8-750c-7cda-e46a-39ee7a221aa2@fiv.upv.es>

Hi all,

I was curious about whether a context switch in Linux saves and restores 
the MSR registers of the tasks involved in the context switch. I 
searched in the source code and could not find this functionality. I'm 
not sure if all MSRs need or can be associated to tasks but I understand 
that, for example, MSRs related to performance counters should be saved 
and restored on context switches to correctly monitor events on a per 
PID basis.

Thanks a lot,
Josué


_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

           reply index

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <fd19f8e8-750c-7cda-e46a-39ee7a221aa2@fiv.upv.es>]

Reply instructions:

You may reply publically 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=8fce5e84-e559-3b02-ddbb-484685bc1317@fiv.upv.es \
    --to=jofepre@fiv.upv.es \
    --cc=kernelnewbies@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

Kernel Newbies archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/kernelnewbies/0 kernelnewbies/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 kernelnewbies kernelnewbies/ https://lore.kernel.org/kernelnewbies \
		kernelnewbies@kernelnewbies.org kernelnewbies@archiver.kernel.org
	public-inbox-index kernelnewbies


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernelnewbies.kernelnewbies


AGPL code for this site: git clone https://public-inbox.org/ public-inbox