From: Markus Elfring <Markus.Elfring@web.de>
To: Michel Lespinasse <walken@google.com>, linux-mm@kvack.org
Cc: Andrew Morton <akpm@linux-foundation.org>,
David Rientjes <rientjes@google.com>,
Davidlohr Bueso <dave@stgolabs.net>,
Hugh Dickins <hughd@google.com>,
Jerome Glisse <jglisse@redhat.com>,
Laurent Dufour <ldufour@linux.ibm.com>,
Liam Howlett <Liam.Howlett@oracle.com>,
Matthew Wilcox <willy@infradead.org>,
Peter Zijlstra <peterz@infradead.org>,
Vlastimil Babka <vbabka@suse.cz>, Ying Han <yinghan@google.com>,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH 3/8] mmap locking API: use coccinelle to convert mmap_sem rwsem call sites
Date: Thu, 26 Mar 2020 14:30:07 +0100 [thread overview]
Message-ID: <b1c878c0-878a-6684-7cac-d1f4409295f6@web.de> (raw)
> 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
next reply other threads:[~2020-03-26 13:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-26 13:30 Markus Elfring [this message]
2020-03-26 22:17 ` [PATCH 3/8] mmap locking API: use coccinelle to convert mmap_sem rwsem call sites Michel Lespinasse
-- strict thread matches above, loose matches on Subject: below --
2020-03-26 7:02 [PATCH 0/8] Add a new mmap locking API wrapping mmap_sem calls Michel Lespinasse
2020-03-26 7:02 ` [PATCH 3/8] mmap locking API: use coccinelle to convert mmap_sem rwsem call sites Michel Lespinasse
2020-03-27 0:01 ` kbuild test robot
2020-03-27 0:40 ` kbuild test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b1c878c0-878a-6684-7cac-d1f4409295f6@web.de \
--to=markus.elfring@web.de \
--cc=Liam.Howlett@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=dave@stgolabs.net \
--cc=hughd@google.com \
--cc=jglisse@redhat.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=ldufour@linux.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=peterz@infradead.org \
--cc=rientjes@google.com \
--cc=vbabka@suse.cz \
--cc=walken@google.com \
--cc=willy@infradead.org \
--cc=yinghan@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).