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

Re: [Xen-devel] Zero-sized reads from XenBus block



El 2/3/16 a les 17:13, Wei Liu ha escrit:
> CC Linux kernel and FreeBSD maintainers.
> 
> On Wed, Mar 02, 2016 at 12:29:26AM +0300, Sergei Lebedev wrote:
>> Hi list,
>>
>> I’m not sure if this is the expected behaviour, but it seems zero-sized 
>> reads from /dev/xen/xenbus block. Here’s sample code in Python
>>
>>     import os
>>     
>>     fd = os.open("/dev/xen/xenbus", os.O_RDWR)
>>     os.read(fd, 0)  # Blocks.
>>
>> The issue is not language-specific, similar code in C blocks as well.

I've tested your code on FreeBSD (after replacing /dev/xen/xenbus with
/dev/xen/xenstore), and it doesn't block there. AFAICT this is because
0-size reads never get to the device "read" routine on FreeBSD, or else
it would block.

Roger.


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