Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit f027faa2 authored by Jeremy Kerr's avatar Jeremy Kerr
Browse files

powerpc/spufs: Don't spu_acquire_saved unnecessarily in regs read



With most file readers (eg cat, dd), reading a context's regs file will
result in two reads: the first to read the data, and the second to
return EOF. Because each read performs a spu_acquire_saved, we end up
descheduling and re-scheduling the context twice.

This change does a simple check to see if we'd return EOF before
calling spu_acquire_saved(), saving the extra schedule operation.

Signed-off-by: default avatarJeremy Kerr <jk@ozlabs.org>
parent 14f693ee
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