All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jennifer Herbert <Jennifer.Herbert@citrix.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
	PaulDurrant <paul.durrant@citrix.com>,
	Wei Liu <wei.liu2@citrix.com>,
	Ian Jackson <ian.jackson@eu.citrix.com>,
	Xen-devel <xen-devel@lists.xen.org>
Subject: Re: [PATCH v3] dm_op: Add xendevicemodel_modified_memory_bulk.
Date: Wed, 29 Mar 2017 15:35:32 +0100	[thread overview]
Message-ID: <58DBC634.3070406@citrix.com> (raw)
In-Reply-To: <58DBAABA0200007800149EB6@prv-mh.provo.novell.com>



On 29/03/17 11:38, Jan Beulich wrote:
>>>> On 28.03.17 at 15:18, <jennifer.herbert@citrix.com> wrote:
>> Perhaps drop "already"? Personally I also wouldn't mind you dropping 
>> the variable altogether and using header->opaque directly, but I 
>> guess that's too "opaque" for your taste? 

It would make the code too opaque for my taste, so I'll just drop the 
'already' bit.

>> @@ -441,13 +481,8 @@ static int dm_op(domid_t domid,
>>           struct xen_dm_op_modified_memory *data =
>>               &op.u.modified_memory;
>>   
>> -        const_op = false;
>> -
>> -        rc = -EINVAL;
>> -        if ( data->pad )
>> -            break;
>> -
>> -        rc = modified_memory(d, data);
>> +        rc = modified_memory(d, data, &bufs[1]);
>> +        const_op = (rc != 0);
> Isn't this wrong now, i.e. don't you need to copy back the
> header now in all cases?

I only define what I'll set nr_extents to in case of error, and of 
course opaque
is opaque.
If I where to write back, I'd be writing back 0 to nr_extents - which 
wouldn’t really
mean anything since I’m not defining the order for which I’m processing 
them.
In fact the only thing it tells you is that extent 0 is the last one 
processed, which
I don't think its all that useful.

Ideally I'd prefer to leave it untouched on success, but the original 
value is lost on
continuation, this would be more involved.

By only writing back on error, I hoped to improve efficiency for the 
common case,
(especially for existing use with calls of one extent).  (I know its 
only a small difference)
If you want me to write back - what do you want me to write back for 
success?


Cheers,

-jenny


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

  reply	other threads:[~2017-03-29 14:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-28 13:18 [PATCH v3] dm_op: Add xendevicemodel_modified_memory_bulk Jennifer Herbert
2017-03-29 10:38 ` Jan Beulich
2017-03-29 14:35   ` Jennifer Herbert [this message]
2017-03-29 14:54     ` Jan Beulich
2017-03-29 15:38       ` Jennifer Herbert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=58DBC634.3070406@citrix.com \
    --to=jennifer.herbert@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=paul.durrant@citrix.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.