[CRIU] [criu]how to keep cpuset affinity of process on restore?

Cyrill Gorcunov gorcunov at gmail.com
Thu Jun 30 06:55:12 PDT 2016


On Thu, Jun 30, 2016 at 04:51:41PM +0300, Pavel Emelyanov wrote:
> On 06/30/2016 04:43 PM, Cyrill Gorcunov wrote:
> > On Thu, Jun 30, 2016 at 05:11:22PM +0800, Dengguangxing wrote:
> >> Hi all,
> >> 	
> >> 	I was wondering if I start a process and set cpu affinity to it.
> >> 		taskset -pc 2 $pid
> >> 	and then do criu dump and restore to this process.
> >> 	can I keep this cpu affinity on restore? what arg do I need to keep this.
> > 
> > iirc we don't save affinity. While it's fine to keep affinity
> > on local process, it's unclean how to handle process migration
> > into the machine with different cpu number. Should we start
> > failing if affinity doesn't match?
> 
> But we do support cpuset cgroup :)

Yes, and we keep cpuset value in image and restore it (or at least
we should). Does both mechanism represent the same thing? I mean
if someone call for sched_setaffinity it replicates changes into
cgroup immediately?

> 
> BTW, maintaining the affinity would be nice. When migrating to nodes
> with different amount of CPUs would indeed require extra ... option :( 
> to be passed to criu.


More information about the CRIU mailing list