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

Re: [MirageOS-devel] wireshark capture of failed download from mirage-www on ARM



On 26 July 2014 10:27, David Scott <scott.dj@xxxxxxxxx> wrote:
>
>
> On Saturday, July 26, 2014, Anil Madhavapeddy <anil@xxxxxxxxxx> wrote:
>>
>> On 25 Jul 2014, at 04:54, Thomas Leonard <talex5@xxxxxxxxx> wrote:
>> >
>> > Here's a slightly better work-around:
>> >
>> >
>> > https://github.com/talex5/mirage-tcpip/commit/9f7e0a628ebd1cece7d0fb979273a96be78233ad
>> >
>> > It changes the TCP packet splitting code so that the second part of
>> > the page is copied to a new IO page. This avoids sending the same
>> > physical page to Linux twice (which is what doesn't work).
>> >
>> > With this, the previous hack can be reverted.
>> >
>> > In my testing, this increased the streaming TCP download speed from 56
>> > KB/s to 3.9 MB/s on the CubieTruck.
>>
>> This is certainly a fix that works, but I'm loath to insert an unnecessary
>> copy in the TCP stack just because of a limitation in Xen/ARM (that will
>> go
>> away in Xen 4.5, I expect).
>>
>> Could we keep track of the active grants in the Gnttab libary, and force a
>> page duplication at that point instead?  That would fix it for any other
>> Cstruct consumers as well, and be a more logical place to insert Xen
>> version detection in the future to remove the extra copy if not needed.
>
>
> If the problem is granting the same page twice, would it be enough to
> maintain a map of page address to (grant index * refount), and then
> "grant_access" could return the existing grant id and bump the refcount? I
> think we just need to share the grant, rather than duplicate the page. (Is
> that right?)

How would that fit in with the current API? It looks like you first
allocate a gntref (an int) and then use that to share the page:

  val get : unit -> gntref Lwt.t

  val grant_access : domid:int -> writable:bool -> gntref -> Io_page.t -> unit


-- 
Dr Thomas Leonard        http://0install.net/
GPG: 9242 9807 C985 3C07 44A6  8B9A AE07 8280 59A5 3CC1
GPG: DA98 25AE CAD0 8975 7CDA  BD8E 0713 3F96 CA74 D8BA

_______________________________________________
MirageOS-devel mailing list
MirageOS-devel@xxxxxxxxxxxxxxxxxxxx
http://lists.xenproject.org/cgi-bin/mailman/listinfo/mirageos-devel


 


Rackspace

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