1

I want to switch on CONFIG_CONTEXT_TRACKING, I am able to find this config with a search in menuconfig but not able to turn it on. I am also having difficulty in understanding the config options that CONTEXT_TRACKING depends on. Can someone tell me step by step how to switch on this config?

2
  • 1
    It seems that you should turn it on via "Full dynticks CPU time accounting" (VIRT_CPU_ACCOUNTING_GEN). If you search for it with the / key in make menuconfig it will tell the whole path to the option. Commented Apr 14, 2020 at 5:59
  • Thank you, that worked for me. Commented Apr 14, 2020 at 7:29

1 Answer 1

2

You need to compile your own Linux kernel.

CONTEXT_TRACKING is an automatic setting, which is enabled if VIRT_CPU_ACCOUNTING_GEN is selected.

VIRT_CPU_ACCOUNTING_GEN is available under “General setup”, “CPU/Task time and stats accounting”, “Cputime accounting”, “Full dynticks CPU time accounting”. You can find this out by typing / and searching for VIRT_CPU_ACCOUNTING_GEN in make menuconfig:

Search results for <code>VIRT_CPU_ACCOUNTING_GEN</code>

Selecting this option, which is only possible on architectures with support for CONTEXT_TRACKING, will automatically enable CONTEXT_TRACKING:

Cputime accounting option

The availability of VIRT_CPU_ACCOUNTING_GEN depends on all of the following:

  • HAVE_CONTEXT_TRACKING (automatically set on ARM, ARM64, MIPS, 64-bit PowerPC, 64-bit SPARC, 64-bit x86)
  • HAVE_VIRT_CPU_ACCOUNTING_GEN (indicates support for 64-bit cputime_t; automatically set on 64-bit architectures and architectures where the appropriate locking has been implemented, i.e. ARM and non-SMP MIPS)
  • GENERIC_CLOCKEVENTS (automatically set on architectures supporting generic clock events, i.e. everything but Itanium)

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.