[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200420192806.GE5820@bombadil.infradead.org>
Date: Mon, 20 Apr 2020 12:28:06 -0700
From: Matthew Wilcox <willy@...radead.org>
To: Michel Lespinasse <walken@...gle.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
linux-mm <linux-mm@...ck.org>,
LKML <linux-kernel@...r.kernel.org>,
Peter Zijlstra <peterz@...radead.org>,
Laurent Dufour <ldufour@...ux.ibm.com>,
Vlastimil Babka <vbabka@...e.cz>,
Liam Howlett <Liam.Howlett@...cle.com>,
Jerome Glisse <jglisse@...hat.com>,
Davidlohr Bueso <dave@...olabs.net>,
David Rientjes <rientjes@...gle.com>,
Hugh Dickins <hughd@...gle.com>, Ying Han <yinghan@...gle.com>,
Jason Gunthorpe <jgg@...pe.ca>,
Daniel Jordan <daniel.m.jordan@...cle.com>
Subject: Re: [PATCH v4 08/10] mmap locking API: add MMAP_LOCK_INITIALIZER
On Tue, Apr 14, 2020 at 05:43:51PM -0700, Michel Lespinasse wrote:
> @@ -90,7 +90,7 @@ static struct mm_struct tboot_mm = {
^^^^^^^^
> .pgd = swapper_pg_dir,
> .mm_users = ATOMIC_INIT(2),
> .mm_count = ATOMIC_INIT(1),
> - .mmap_sem = __RWSEM_INITIALIZER(init_mm.mmap_sem),
> + .mmap_sem = MMAP_LOCK_INITIALIZER(init_mm.mmap_sem),
^^^^^^^
Shome mishtake, shirley?
I don't see that this particular patch buys us much. The name 'mmap_sem'
is still used, and I appreciate we abstract away the type of the lock,
but wouldn't this be better?
- .mmap_sem = __RWSEM_INITIALIZER(init_mm.mmap_sem),
+ MMAP_LOCK_INITIALIZER(tboot_mm),
Powered by blists - more mailing lists