# Hey Xen people - what is rcu_sched?



## raindog308 (Mar 12, 2014)

I'm running a Linux VM in the Azure Cloud.  I believe they use a customized Xen kernel.  I notice there are 64 'rcuos' processes and 64 'rcuob' processes.  There's also 'rcu_sched' and "rcu_bh" running.

I was wondering what these processes are for...I found this:

https://www.kernel.org/doc/Documentation/RCU/stallwarn.txt

So it sounds like if the system tries to get some processing and there is a stall (because the CPU is virtualized), the rcu processes queue up these requests so they still execute.  In other words, other than the kernel saying "OMG I tried to execute this opcode and I couldn't so I will panic", instead those opcodes are queued up by rcu_sched - ?



```
root        67     2  0 Mar08 ?        00:00:00 [rcuos/59]
root        68     2  0 Mar08 ?        00:00:00 [rcuos/60]
root        69     2  0 Mar08 ?        00:00:00 [rcuos/61]
root        70     2  0 Mar08 ?        00:00:00 [rcuos/62]
root        71     2  0 Mar08 ?        00:00:00 [rcuos/63]
root        72     2  0 Mar08 ?        00:00:00 [rcu_bh]
root        73     2  0 Mar08 ?        00:00:00 [rcuob/0]
root        74     2  0 Mar08 ?        00:00:00 [rcuob/1]
root        75     2  0 Mar08 ?        00:00:00 [rcuob/2]
root        76     2  0 Mar08 ?        00:00:00 [rcuob/3]
root        77     2  0 Mar08 ?        00:00:00 [rcuob/4]
root        78     2  0 Mar08 ?        00:00:00 [rcuob/5]
```


----------



## kaniini (Mar 12, 2014)

RCU stands for 'read-copy-update', it's a lockless kernel structure duplication mechanism that allows for changes to be atomically committed.

It has nothing to do with Xen or variants like Hyper-V/Viridian, and these sort of processes run on bare metal too.


----------



## raindog308 (Mar 12, 2014)

Interesting - I don't see them on any other Linux boxes I run.  Then again, none of the others are running Ubuntu 14.04


----------



## Francisco (Mar 12, 2014)

raindog308 said:


> Interesting - I don't see them on any other Linux boxes I run.  Then again, none of the others are running Ubuntu 14.04


You're likely running an older kernel on them 

I've noticed these processes in the newer 3.x kernels.

Francisco


----------



## raindog308 (Mar 12, 2014)

True enough - 2.6 on everything.

A BuyVM OvZ has  3.2.0-042stab084.3 and I don't see them there, but that's OvZ so probably doesn't apply.


----------



## tchen (Mar 12, 2014)

https://wiki.edubuntu.org/Kernel/Configs/RaringToSaucy


CONFIG_RCU_NOCB_CPU


Is now y on saucy. Previous was default which was N. I don't know if it was turned on be because someone wanted to debug jitter issues, or that it's a new policy going forward. It can also be used for low powered situations which kinda suggests it being permanent.


----------



## Francisco (Mar 12, 2014)

raindog308 said:


> True enough - 2.6 on everything.
> 
> A BuyVM OvZ has  3.2.0-042stab084.3 and I don't see them there, but that's OvZ so probably doesn't apply.


Remember, on OVZ the kernel version is forged for the sake of GLIBC 

Francisco


----------

