[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 21 Jul 2014, at 13:31, Dave Scott <Dave.Scott@xxxxxxxxxx> wrote:

> 
> On 21 Jul 2014, at 21:14, Thomas Leonard <talex5@xxxxxxxxx> wrote:
> 
>> ...So I guess there's some problem sending the second page to the ring.
>> Suggestions from people who know this code would be great! Could just
>> be a missing barrier or something.
> 
> I think the flow is:
> 
> https://github.com/mirage/mirage-net-xen/blob/master/lib/netif.ml#L408
> https://github.com/mirage/shared-memory-ring/blob/master/lwt/lwt_ring.ml#L75
> https://github.com/mirage/shared-memory-ring/blob/master/lib/ring.ml#L154
> https://github.com/mirage/shared-memory-ring/blob/master/lib/ring.ml#L102
> https://github.com/mirage/shared-memory-ring/blob/master/lib/barrier_stubs.c#L28
> — calling “xen_mb”
> 
> Perhaps to see whether “xen_mb” is working you could add a delay (via busy 
> loop?) in the ‘memory_barrier’ function (or thereabouts) in 
> shared-memory-ring. Assuming the writes are committed eventually (is that a 
> valid assumption?) then the busy loop would “fix it”. That would be fairly 
> good evidence that barriers are broken.

code inspection of 
https://github.com/mirage/shared-memory-ring/blob/master/lib/barrier.h#L20 
suggests:

...
#elif defined(__arm__)
# ifndef _M_ARM
#define xen_mb()   {}
#define xen_rmb()  {}
#define xen_wmb()  {}
# elif _M_ARM > 6
#define xen_mb()   asm volatile ("dmb" : : : "memory")
#define xen_rmb()  asm volatile ("dmb" : : : "memory")
#define xen_wmb()  asm volatile ("dmb" : : : "memory")
# else
#error This ARM variant needs testing
# endif /* ifdef _M_ARM */

...so i guess one question is what's _M_ARM defined to?

also, looking at 
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0489c/CIHGHHIE.html
 i wonder whether changing "dmb" for "dsb" would be worth trying to see if that 
"fixes" things?

(caveat: i'm not an asm or arm hacker so that might be an inane suggestion :)

-- 
Cheers,

R.




Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail

_______________________________________________
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®.