This is the mail archive of the systemtap@sources.redhat.com mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: recent runtime changes


Martin Hunt wrote:
> 1. relayfs vs netlink tests. I don't see an easy way to detect when
> relayfs thinks it has lost data, so I'll have to transmit some pattern
> and see if data is missing.

Here's the path from relay_write() in 2.6.12-rc4-mm2:
relay_write(include/linux/relayfs_fs.h)
->relay_switch_subbuf(fs/relayfs/relay.c)
->relay_buf_full(fs/relayfs/relay.c)

If indeed the buffers are full, relay_switch_subbuf returns 0.
The only caveat here, is that relay_write() doesn't return
the quantity that was written to the buffer. It used to be
there, but it was dropped following feedback from Andi Kleen
(http://marc.theaimsgroup.com/?l=linux-kernel&m=110755817702170&w=2).
Basically, Andi doubted relayfs users would handle errors.
Obviously if there is need, we can push the change upstream.
For now, adding a simple "return length" in relay_write() and
__relay_write() (both in include/linux/relayfs_fs.h) should
provide you with what you're looking for.

HTH,

Karim
-- 
Author, Speaker, Developer, Consultant
Pushing Embedded and Real-Time Linux Systems Beyond the Limits
http://www.opersys.com || karim@opersys.com || 1-866-677-4546


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]