Messages in this thread |  | | Date | Thu, 26 Mar 2020 21:46:47 -0700 | From | Davidlohr Bueso <> | Subject | Re: [PATCH v2 07/10] mmap locking API: add mmap_read_release() and mmap_read_unlock_non_owner() |
| |
On Thu, 26 Mar 2020, Michel Lespinasse wrote:
>Add a couple APIs to allow splitting mmap_read_unlock() into two calls: >- mmap_read_release(), called by the task that had taken the mmap lock; >- mmap_read_unlock_non_owner(), called from a work queue. > >These apis are used by kernel/bpf/stackmap.c only.
I'm not crazy about the idea generalizing such calls into an mm api. We try to stay away from non-owner semantics in locking - granted the IS_ENABLED(CONFIG_PREEMPT_RT) warning, but still.
Could this give future users the wrong impression? What about just using rwsem calls directly in bpf?
Thanks, Davidlohr
|  |