Opened 14 years ago
Closed 14 years ago
Last modified 14 years ago
#11250 closed Patch - Feature (fixed)
Reduce ThreadedFileWriter thread wakeup
| Reported by: | Owned by: | danielk | |
|---|---|---|---|
| Priority: | minor | Milestone: | 0.27 |
| Component: | MythTV - General | Version: | 0.26-fixes |
| Severity: | medium | Keywords: | |
| Cc: | Ticket locked: | no |
Description
The writer thread will only write in chunks of 'kMinWriteSize' or larger. Currently ThreadedFileWriter::Write() will wake up the writer thread every time, even if the chunk size condition isn't met.
The patch changes ThreadedFileWriter::Write() to only wake up the writer thread is the chunk size condition is met.
This reduces cpu usage by ~9% on a 700MHz Cortex-A9 when recording DVB HD content.
Attachments (1)
Change History (5)
by , 14 years ago
| Attachment: | mythtv_ThreadedFileWriter_reduce_thread_wakeup.patch added |
|---|
comment:1 by , 14 years ago
| Owner: | set to |
|---|---|
| Status: | new → accepted |
comment:2 by , 14 years ago
| Resolution: | → fixed |
|---|---|
| Status: | accepted → closed |
comment:3 by , 14 years ago
Just my 2 cent:
I personally find "(writeBuffers.size() > 1)" is redundant and causes allot of bufferHasData.wakeAll() calls, but I can see that it is hard to prove it is safe.
overall it is still an improvement, thank you.
comment:4 by , 14 years ago
| Milestone: | unknown → 0.27 |
|---|

In 8c4434a25a0c002bbfa971b90083e515a37d3f9c/mythtv: