[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <b1c878c0-878a-6684-7cac-d1f4409295f6@web.de>
Date: Thu, 26 Mar 2020 14:30:07 +0100
From: Markus Elfring <Markus.Elfring@....de>
To: Michel Lespinasse <walken@...gle.com>, linux-mm@...ck.org
Cc: Andrew Morton <akpm@...ux-foundation.org>,
David Rientjes <rientjes@...gle.com>,
Davidlohr Bueso <dave@...olabs.net>,
Hugh Dickins <hughd@...gle.com>,
Jerome Glisse <jglisse@...hat.com>,
Laurent Dufour <ldufour@...ux.ibm.com>,
Liam Howlett <Liam.Howlett@...cle.com>,
Matthew Wilcox <willy@...radead.org>,
Peter Zijlstra <peterz@...radead.org>,
Vlastimil Babka <vbabka@...e.cz>,
Ying Han <yinghan@...gle.com>, linux-kernel@...r.kernel.org,
kernel-janitors@...r.kernel.org
Subject: Re: [PATCH 3/8] mmap locking API: use coccinelle to convert mmap_sem
rwsem call sites
> This change converts the existing mmap_sem rwsem calls to use the new
> mmap locking API instead.
>
> The change is generated using coccinelle with the following rules:
Do you find the following script variant more succinct together
with the usage of a disjunction in a single SmPL rule?
@replacement@
expression x;
@@
(
-init_rwsem
+mmap_init_lock
|
-down_write
+mmap_write_lock
|
-down_write_killable
+mmap_write_lock_killable
|
-down_write_trylock
+mmap_write_trylock
|
-up_write
+mmap_write_unlock
|
-downgrade_write
+mmap_downgrade_write_lock
|
-down_read
+mmap_read_lock
|
-down_read_killable
+mmap_read_lock_killable
|
-down_read_trylock
+mmap_read_trylock
|
-up_read
+mmap_read_unlock
|
-rwsem_is_locked
+mmap_is_locked
)
(
- &
x
- ->mmap_sem
)
Regards,
Markus
Powered by blists - more mailing lists