Skip to contentSkip to conversation

staging/android: use multiple futex wait queues

PATCH In review Hugo Lefeuvre 2 participants 2 messages Feb 15, 2019 – Mar 27, 2019 Staging

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 staging/android: use multiple futex wait queues

Use multiple per-offset wait queues instead of one big wait queue per region.

---
Changes in v2:
- dereference the it pointer instead of wait_queue (which is not set yet) in handle_vsoc_cond_wait()

---
 drivers/staging/android/TODO   |  4 ---
 drivers/staging/android/vsoc.c | 56 ++++++++++++++++++++++++++--------
 2 files changed, 44 insertions(+), 16 deletions(-)
drivers/staging/android/TODO +0 -4
index fbf015cc6d62..cd2af06341dc 100644
@@ -12,10 +12,6 @@ ion/
  - Better test framework (integration with VGEM was suggested)
 
 vsoc.c, uapi/vsoc_shm.h
- - The current driver uses the same wait queue for all of the futexes in a
-   region. This will cause false wakeups in regions with a large number of
-   waiting threads. We should eventually use multiple queues and select the
-   queue based on the region.
  - Add debugfs support for examining the permissions of regions.
  - Remove VSOC_WAIT_FOR_INCOMING_INTERRUPT ioctl. This functionality has been
    superseded by the futex and is there for legacy reasons.
drivers/staging/android/vsoc.c +44 -12

110 lines not on this page · raw message

Signature · 1 line
2.20.1
#1 lore raw
Quoted 8 lines · Hugo Lefeuvre

Use multiple per-offset wait queues instead of one big wait queue per region.

---
Changes in v2:
- dereference the it pointer instead of wait_queue (which is not set yet) in handle_vsoc_cond_wait()

How did you test this change? This code needs a lot of testing by someone before I can take it.

thanks,

greg k-h