LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 01-23-2020, 02:58 PM   #1
redacted
LQ Newbie
 
Registered: Nov 2019
Posts: 4

Rep: Reputation: Disabled
What is saved at x86_64 process switch time?


What is saved at process context switch time? Obvious stuff like the contents of the GPRs, page table, instruction pointer; what else?

Specifically, are performance counters (for example) saved/restored during a process switch?

If I want to count L3 cache misses for a certain long running application, will the associated performance counter show only L3 misses for the application, or will it show all L3 misses during the time the application was running? (i.e. including L3 misses for other processes)

Where in the source code is process context saved during a switch?

Is there a good description of Linux context switch that explains the details?
 
Old 01-24-2020, 09:19 AM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: CentOS 6 & 7
Posts: 3,269

Rep: Reputation: 893Reputation: 893Reputation: 893Reputation: 893Reputation: 893Reputation: 893Reputation: 893
Some of that is arch-dependent. The context_switch code is here:
https://elixir.bootlin.com/linux/v5....d/core.c#L3333
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] using switch in a function to call another function with a switch but it is not going into 2 switch ... BW-userx Programming 2 08-21-2017 12:47 AM
ipm timed out error on Red Hat 2.6.9-67.0.22.ELsmp #1 SMP x86_64 x86_64 x86_64 GNU/L bellnarm Linux - Newbie 0 07-07-2009 05:36 PM
tell me the process router to router, hub to hub and switch to switch communication. yakuza003 Linux - Networking 4 06-21-2008 08:55 AM
Can't open saved web pages just saved by web browser... JeanBrownHarrel General 2 04-06-2008 12:52 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 07:14 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration