From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 083B9C43331 for ; Wed, 1 Apr 2020 13:49:02 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id AB38A206F5 for ; Wed, 1 Apr 2020 13:49:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="1N0sD7iE" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AB38A206F5 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 563518E0005; Wed, 1 Apr 2020 09:49:01 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 53BAA8E0001; Wed, 1 Apr 2020 09:49:01 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4507E8E0005; Wed, 1 Apr 2020 09:49:01 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0025.hostedemail.com [216.40.44.25]) by kanga.kvack.org (Postfix) with ESMTP id 2BA708E0001 for ; Wed, 1 Apr 2020 09:49:01 -0400 (EDT) Received: from smtpin16.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id ECBDD180AD80F for ; Wed, 1 Apr 2020 13:49:00 +0000 (UTC) X-FDA: 76659417240.16.grip07_88e2abf2a3047 X-HE-Tag: grip07_88e2abf2a3047 X-Filterd-Recvd-Size: 3477 Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by imf46.hostedemail.com (Postfix) with ESMTP for ; Wed, 1 Apr 2020 13:49:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=uBXzKkGsey9fK+eyH/zRzT6xXFGMrAtpFvULnjVXSbE=; b=1N0sD7iE9IrmP+bzXAevpPUmAY xzrLFIVkFsLnZ29dexYaSSUhX8YcW3ErPW1/+KQrcFwMoDo0B/69bYairKgL2Do0s9feDncpme+/l IjgPdAZ2PAv29g2towvp4rB7Wxrws4NHLEjPUD0674dVAKrN72UU+DeN8QPNfyxOwwVMBEbbd/eBB f3aGCBvTLzG1UPWqGP2tfoLqwlVTSdwqOMU3HYLvPAMC2lEATWqSvqkC6OnKouj1mviHyYpBa7coI 9YHZSqOQD9S8mQeH5UAvO9cWmwABjYcUc2DXRIAgNWlMq6mR8tHjZ2Vq6vqLW03RY73XdgMYVmZAk GX9n8Y4A==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1jJdji-00062j-OV; Wed, 01 Apr 2020 13:48:54 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 8915A3025C3; Wed, 1 Apr 2020 15:48:53 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 7905A29D86172; Wed, 1 Apr 2020 15:48:53 +0200 (CEST) Date: Wed, 1 Apr 2020 15:48:53 +0200 From: Peter Zijlstra To: Michel Lespinasse Cc: Andrew Morton , linux-mm , LKML , Laurent Dufour , Vlastimil Babka , Matthew Wilcox , Liam Howlett , Jerome Glisse , Davidlohr Bueso , David Rientjes , Hugh Dickins , Ying Han , Jason Gunthorpe , Markus Elfring Subject: Re: [PATCH v3 10/10] mmap locking API: rename mmap_sem to mmap_lock Message-ID: <20200401134853.GT20696@hirez.programming.kicks-ass.net> References: <20200327225102.25061-1-walken@google.com> <20200327225102.25061-11-walken@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200327225102.25061-11-walken@google.com> X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Fri, Mar 27, 2020 at 03:51:02PM -0700, Michel Lespinasse wrote: > Rename the mmap_sem field to mmap_lock. Any new uses of this lock > should now go through the new mmap locking api. The mmap_lock is > still implemented as a rwsem, though this could change in the future. > diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h > index c28911c3afa8..a168d13b5c44 100644 > --- a/include/linux/mm_types.h > +++ b/include/linux/mm_types.h > @@ -431,7 +431,7 @@ struct mm_struct { > spinlock_t page_table_lock; /* Protects page tables and some > * counters > */ > - struct rw_semaphore mmap_sem; > + struct rw_semaphore mmap_lock; It would be best if you change the type too. > > struct list_head mmlist; /* List of maybe swapped mm's. These > * are globally strung together off