ANDROID: rwsem: Add vendor hook to the rw-semaphore

- Add the hook to apply vendor's performance tune for owner
    of rwsem.

  - Add the hook for the waiter list of rwsem to allow
    vendor perform waiting queue enhancement

  - ANDROID_VENDOR_DATA added to rw_semaphore

Bug: 161400830

Signed-off-by: JianMin Liu <jian-min.liu@mediatek.com>
Change-Id: I007a5e26f3db2adaeaf4e5ccea414ce7abfa83b8
This commit is contained in:
JianMin Liu
2020-07-21 13:36:22 +08:00
committed by Todd Kjos
parent 3fc5e94255
commit df18d99dab
4 changed files with 63 additions and 2 deletions

View File

@@ -19,6 +19,7 @@
#ifdef CONFIG_RWSEM_SPIN_ON_OWNER
#include <linux/osq_lock.h>
#endif
#include <linux/android_vendor.h>
/*
* For an uncontended rwsem, count and owner are the only fields a task
@@ -51,6 +52,7 @@ struct rw_semaphore {
#ifdef CONFIG_DEBUG_LOCK_ALLOC
struct lockdep_map dep_map;
#endif
ANDROID_VENDOR_DATA(1);
};
/* In all implementations count != 0 means locked */