1 Subject: Don't block until the read buffer is full
2 From: Jeremy Kerr <jk@ozlabs.org>
3 References: 447133 - LTC50070
5 Currently, read() on the sputrace buffer will only return data when
6 the user buffer is exhausted. This may mean that we never see the
7 end of the event log, unless we read() with exactly the right-sized
10 This change makes sputrace_read not block if we have data ready to
13 Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
14 Signed-off-by: Olaf Hering <olh@suse.de>
16 arch/powerpc/platforms/cell/spufs/sputrace.c | 5 +++++
17 1 file changed, 5 insertions(+)
19 --- a/arch/powerpc/platforms/cell/spufs/sputrace.c
20 +++ b/arch/powerpc/platforms/cell/spufs/sputrace.c
21 @@ -80,6 +80,11 @@ static ssize_t sputrace_read(struct file
25 + /* If we have data ready to return, don't block waiting
27 + if (cnt > 0 && sputrace_used() == 0)
30 error = wait_event_interruptible(sputrace_wait,