From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Ian Campbell <ian.campbell@citrix.com>
Cc: Wei Liu <wei.liu2@citrix.com>,
Ian Jackson <Ian.Jackson@eu.citrix.com>,
Xen-devel <xen-devel@lists.xen.org>
Subject: Re: [PATCH v4] tools/libxc: Implement writev_exact() in the same style as write_exact()
Date: Thu, 19 Feb 2015 10:23:09 +0000 [thread overview]
Message-ID: <54E5B98D.8050804@citrix.com> (raw)
In-Reply-To: <1424341106.30924.44.camel@citrix.com>
On 19/02/15 10:18, Ian Campbell wrote:
> On Thu, 2015-02-19 at 10:04 +0000, Andrew Cooper wrote:
>> On 19/02/15 09:49, Ian Campbell wrote:
>>> On Wed, 2015-02-18 at 18:31 +0000, Andrew Cooper wrote:
>>>> This implementation of writev_exact() will cope with an iovcnt greater than
>>>> IOV_MAX because glibc will actually let this work anyway, and it is very
>>>> useful not to have to work about this in the caller of writev_exact(). The
>>> s/work/worry?
>> Oops yes.
>>
>>> Will this still work with non-glibc libcs which do not cope with iovcnt
>> Yes - observe the min() in the call to writev(). This code never
>> actually breaks the writev() requirements, but allows the caller of
>> writev_exact() to be more flexible.
>>
>>>> IOV_MAX?
>>> In fact looking at the code it's not clear what glibc is letting work
>>> anyway, do you pass a count > IOV_MAX to writev? Doesn't look like it.
>> The page data algorithm in migration v2 submits 1024+7 IOV's at once for
>> 1024 page frames and the associated metadata. It is specifically useful
>> not to complicate that function with IOV_MAX adjustments in the case
>> that IOV_MAX is 1024.
> I see that, but where does "because glibc will actually let this work
> anyway" come into it? This function will never actually pass
> iovcnt>IOV_MAX to glibc, so I'm not sure what you are trying to say with
> that statement in the commit log, since glibc is not being expected to
> cope or "let this work" AFAICT.
>
> If what you are trying to say is that this function is more flexible
> than the underlying writev implementation is required to be by POSIX or
> something then you should just say that. Conflate it with the underlying
> writev implementation coping with such things is just adding confusion
> to the commit message IMHO.
>
> Ian.
Now that you point this out, that part is stale, and more obviously
applied to an older iteration of the patch. I will have a go at
rewriting the message from scratch and see if I can come to something
more appropriate.
~Andrew
prev parent reply other threads:[~2015-02-19 10:23 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-18 18:31 [PATCH v4] tools/libxc: Implement writev_exact() in the same style as write_exact() Andrew Cooper
2015-02-19 9:49 ` Ian Campbell
2015-02-19 10:04 ` Andrew Cooper
2015-02-19 10:18 ` Ian Campbell
2015-02-19 10:23 ` Andrew Cooper [this message]
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=54E5B98D.8050804@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=ian.campbell@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.