On Thu, Jul 9, 2015 at 12:19 PM, George Dunlap <george.dun...@eu.citrix.com> wrote: > On Thu, Jul 9, 2015 at 4:09 AM, Wu, Feng <feng...@intel.com> wrote: >>> That does not necessarily means "we need to do something" in >>> vcpu_runstate_change(). Actually, that's exactly what I'm asking: can >>> you check whether this thing that you need doing can be done somewhere >>> else than in vcpu_runstaete_change() ? >> >> Why do you think vcpu_runstaete_change() is not the right place to do this? > > Because what the vcpu_runstate_change() function does at the moment is > *update the vcpu runstate variable*. It doesn't actually change the > runstate -- the runstate is changed in the various bits of code that > call it; and it's not designed to be a generic place to put hooks on > the runstate changing.
At first glance vcpu_urgent_count_update() might be seen as such a hook; but the key here is that vcpu_urgent_count_update() is mainly updating the is_urgent flag *of the vcpu* based on the various scheduler-related flags. In that sense it's doing exactly what vcpu_runstate_change() is doing. -George _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel