lkml.org 
[lkml]   [2008]   [Jul]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/3] relay: Fix 4 off-by-one errors occuring when writing to a CPU buffer.
On Thu, Jul 24, 2008 at 12:09:36AM -0500, Tom Zanussi wrote:
>
> On Sat, 2008-06-21 at 05:06 +0300, Eduard - Gabriel Munteanu wrote:
> > On Mon, 16 Jun 2008 00:22:27 -0500
> > Tom Zanussi <tzanussi@gmail.com> wrote:
> >
> > > So apparently what you're seeing is zeroes being read when there's a
> > > buffer-full condition? If so, we need to figure out exactly why
> > > that's happening to see whether your fix is really what's needed; I
> > > haven't seen problems in the buffer-full case before and I think your
> > > fix would break it even if it fixed your read problem. So it would
> > > be good to be able to reproduce it first.
> > >
> > > Tom
> >
> > Hi,
> >
> > Sorry for being so late, there were some exams I had to cope with.
> >
> > Although I couldn't reproduce zeros, I've come up with something I'd
> > say is equally good. This has been done on a vanilla 2.6.26-rc6.
> >
> > Please look at the testcase below and tell me what you think.
> >
>
> Hi,
>
> Yes, this is a bug - thanks for sending the nice test case. This patch
> should fix it. BTW, if the output still looks a little different from
> what you were expecting, it might make more sense after adding a
> relay_test printk for each dropped event, something like this:

The all-zeros problem happened when poll() with infinite timeout is not
used before reading. I fixed the user app I was writing, but the docs should
really reflect this. Relay has a kinda strange interface.


Cheers,
Eduard



\
 
 \ /
  Last update: 2008-07-30 19:53    [W:0.369 / U:0.488 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site