[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH V5 12/12] xen/vm_event: Add RESUME option to vm_event_op domctl



>>> On 17.02.15 at 19:32, <tamas.lengyel@xxxxxxxxxxxx> wrote:
> On Tue, Feb 17, 2015 at 3:31 PM, Jan Beulich <JBeulich@xxxxxxxx> wrote:
>>>>> On 13.02.15 at 17:33, <tamas.lengyel@xxxxxxxxxxxx> wrote:
>>> @@ -611,13 +611,22 @@ int vm_event_domctl(struct domain *d, 
> xen_domctl_vm_event_op_t *vec,
>>>          }
>>>          break;
>>>
>>> -        case XEN_VM_EVENT_PAGING_DISABLE:
>>> +        case XEN_VM_EVENT_DISABLE:
>>>          {
>>>              if ( ved->ring_page )
>>>                  rc = vm_event_disable(d, ved);
>>>          }
>>>          break;
>>>
>>> +        case XEN_VM_EVENT_RESUME:
>>> +        {
>>> +            if ( ved->ring_page )
>>> +                vm_event_resume(d, ved);
>>> +            else
>>> +                rc = -ENODEV;
>>> +        }
>>> +        break;
>>
>> Stray braces again.
> 
> Ack.
> 
>>
>> I also find it confusing that the same set of changes repeats three
>> times here - is that an indication of a problem with an earlier patch?
> 
> No it's not. There are three rings vm_event can use, thus three rings
> that can be resumed.

But if the code ends up being almost identical, this loudly calls for
consolidation into e.g. a helper function.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.