Skip to content
Commit baff465f authored by Ganesh Mahendran's avatar Ganesh Mahendran
Browse files

continue read file when returned count > 0

In android, we met a lot of watchdog timeout which
caused by read file "/d/wakeup_sources".

The root cause is that in kernel side wakeup.c, it uses single_open()
interface to show the stats. But single_open() interface
requires that the whole output must fit into a single
buffer(physical continuous). This will lead to timeout when system
memory is not in a good situation.

Problem in kenrel side has been merged in [1]. Then kernel will return
max a page bytes to user space. So in KernelWakelockReader, we
need to read again when returned count > 0.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?h=v5.0-rc4&id=00ee22c28915d111ba415750a3311d7678fd1206



Change-Id: If7886514c609c8d6338532c67c1cee79f2754ab1
Signed-off-by: default avatarGanesh Mahendran <opensource.ganesh@gmail.com>
parent fad9571d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment