Message ID | 20250109023025.2242447-9-surenb@google.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7C2D0E77199 for <linux-mm@archiver.kernel.org>; Thu, 9 Jan 2025 02:30:53 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id EB0476B009F; Wed, 8 Jan 2025 21:30:49 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id E0FBF6B00A0; Wed, 8 Jan 2025 21:30:49 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C3FEA6B00A1; Wed, 8 Jan 2025 21:30:49 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 9CD976B009F for <linux-mm@kvack.org>; Wed, 8 Jan 2025 21:30:49 -0500 (EST) Received: from smtpin18.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 5C9B7C0C61 for <linux-mm@kvack.org>; Thu, 9 Jan 2025 02:30:49 +0000 (UTC) X-FDA: 82986335418.18.F84337A Received: from mail-pj1-f73.google.com (mail-pj1-f73.google.com [209.85.216.73]) by imf24.hostedemail.com (Postfix) with ESMTP id 8B82818000E for <linux-mm@kvack.org>; Thu, 9 Jan 2025 02:30:47 +0000 (UTC) Authentication-Results: imf24.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=c+6yhexW; spf=pass (imf24.hostedemail.com: domain of 31jR_ZwYKCH8vxuhqejrrjoh.frpolqx0-ppnydfn.ruj@flex--surenb.bounces.google.com designates 209.85.216.73 as permitted sender) smtp.mailfrom=31jR_ZwYKCH8vxuhqejrrjoh.frpolqx0-ppnydfn.ruj@flex--surenb.bounces.google.com; dmarc=pass (policy=reject) header.from=google.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1736389847; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=mjOxH5E6F+PRJReyBLOWVSfVgJNT1AsQeggvw/y9xao=; b=TbTDyuyS7MltoYSFULyOdThy1CiCpP7yqhFdVtutuj/RHYt7Xw+IUh4K4uFYZJ7X3b8zB+ 2dOBloaCo/hDwxujVXmXulhFbqw+6+roi9HBbbrikGJeocgNtCBXX933SqnypTftHMgQxQ yTLzpZ8jmk9X9QmtRWf7svwJv9CllOk= ARC-Authentication-Results: i=1; imf24.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=c+6yhexW; spf=pass (imf24.hostedemail.com: domain of 31jR_ZwYKCH8vxuhqejrrjoh.frpolqx0-ppnydfn.ruj@flex--surenb.bounces.google.com designates 209.85.216.73 as permitted sender) smtp.mailfrom=31jR_ZwYKCH8vxuhqejrrjoh.frpolqx0-ppnydfn.ruj@flex--surenb.bounces.google.com; dmarc=pass (policy=reject) header.from=google.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1736389847; a=rsa-sha256; cv=none; b=7NaRQUkS0Cs1UYHANrtPx1lcpQfkPGYAhe+rzb4zJI0yfZLktmmF7PIa1EbzjOWVTfguXu 5VBMSRlHoj+84JHvuCQZvZ9sne24osfxD784D8ZCSztGO8zppL9IJmhYQ1l1wrXeX41MRZ J9rhXLaDRKaj42FRJFTgDPOBkA9UFB8= Received: by mail-pj1-f73.google.com with SMTP id 98e67ed59e1d1-2ef9dbeb848so812663a91.0 for <linux-mm@kvack.org>; Wed, 08 Jan 2025 18:30:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1736389846; x=1736994646; darn=kvack.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=mjOxH5E6F+PRJReyBLOWVSfVgJNT1AsQeggvw/y9xao=; b=c+6yhexWeX4YokW6+YuwIqhTpGPZcqYXXpRra4O0vIRhBeLsEWKDWRo7sCWhU7p7KU P/f7RcZ7GS22p4pIfGDyHid06yC1KLlDaw4biJKqs2vjilK2dXIwG4/jND1VrEwvAqHn uRtILaAI3RhLDU+c79qg8UE9/U660wu4T748XQj8HF/3XYYiXUroeGhuIXicPMuc/aEX 0a1olcV1pOOqTs9IqCy2YN3R0FnQ35eINjfHTwQ/LYRRyTnfLN+Ck0dk4epnFAdGFP5F wlKPQ9VLAF75/QYi9yMh+Vi8u8MoULgFA3cUYmtwD3k+TMJaqOvUCRaQ2BzNeemleCVt bAtg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736389846; x=1736994646; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=mjOxH5E6F+PRJReyBLOWVSfVgJNT1AsQeggvw/y9xao=; b=l4IsRWnkNFQFlP0uOTHezKREYEd1aNW6DKRFaMhiAz9X0zdI8iylz9vrd26oXsN0FP HPW4/1Ha4c4d+nt13IP829uYoFX7thCLzZc/IkHAwFGLdIYWsPX59qTQkQlOZsjqiZH3 0qiU5ekmBHgc3VcLmh2KDbcP3fWT8Ib40yOltA+U1Rp+bkFjznomy7sIcC6RlysWRSAw cit6GapU4QC9Hm73xkHIjLDlmmjZwdYA90Q2OMguTH7/d1JiIw7VZGr+1Lz5sJqVMJyv 48J8twPV4Iuk205dVfbjkdc5FJi7mqO8q+0NEeNciRNTpS021n8TKPY1tuiU9BlJMYr2 TBHQ== X-Forwarded-Encrypted: i=1; AJvYcCUJD2T4k9QmoGACWpgTz3GMvkNKPQeuhkMTgdT4u0xYKHC3ii9HVDqJTjfL98RFVNLQv4Hh+kaMqw==@kvack.org X-Gm-Message-State: AOJu0YwInQiBRF74cJVGIuxjMgEB3kwMpHyWkS97LdTbuN1XpSbi5U9P yn7gQ/5GemH5n1dYGShlPZIbldA96rRmsRe69Qf8F/YBvyVf110QI8M0bL3zlrGjc4YZGlYOUty zmQ== X-Google-Smtp-Source: AGHT+IHADv1eWMN6DWgWw8q0R38itFS4KVDDVQ6L3paem0ou1tKWUJt5aWqFRQtQ6rnHlKZNXiGFJ2Bl2n0= X-Received: from pfxa8.prod.google.com ([2002:a05:6a00:1d08:b0:725:e46a:4fdd]) (user=surenb job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6a00:ac2:b0:725:e1de:c0bf with SMTP id d2e1a72fcca58-72d21f2dcbcmr6756667b3a.9.1736389846286; Wed, 08 Jan 2025 18:30:46 -0800 (PST) Date: Wed, 8 Jan 2025 18:30:17 -0800 In-Reply-To: <20250109023025.2242447-1-surenb@google.com> Mime-Version: 1.0 References: <20250109023025.2242447-1-surenb@google.com> X-Mailer: git-send-email 2.47.1.613.gc27f4b7a9f-goog Message-ID: <20250109023025.2242447-9-surenb@google.com> Subject: [PATCH v8 08/16] mm: move mmap_init_lock() out of the header file From: Suren Baghdasaryan <surenb@google.com> To: akpm@linux-foundation.org Cc: peterz@infradead.org, willy@infradead.org, liam.howlett@oracle.com, lorenzo.stoakes@oracle.com, mhocko@suse.com, vbabka@suse.cz, hannes@cmpxchg.org, mjguzik@gmail.com, oliver.sang@intel.com, mgorman@techsingularity.net, david@redhat.com, peterx@redhat.com, oleg@redhat.com, dave@stgolabs.net, paulmck@kernel.org, brauner@kernel.org, dhowells@redhat.com, hdanton@sina.com, hughd@google.com, lokeshgidra@google.com, minchan@google.com, jannh@google.com, shakeel.butt@linux.dev, souravpanda@google.com, pasha.tatashin@soleen.com, klarasmodin@gmail.com, richard.weiyang@gmail.com, corbet@lwn.net, linux-doc@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, kernel-team@android.com, surenb@google.com Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 8B82818000E X-Rspamd-Server: rspam12 X-Stat-Signature: wba9fcdzjyamz3kc9tipxza7p6o7wkmc X-Rspam-User: X-HE-Tag: 1736389847-647359 X-HE-Meta: U2FsdGVkX19VQwbdZITExbJZP4DS1PLKfSNYUZauLRi+PuHJHiAaGcieq96YSz1Lah2zQNe9mdCide4+IwMIxXuuXSQiGIC0jR8nG/tPipaDTzU0sGacmwzdKaaDMPHVIXBVgMs/mzQVup7BddC8O4+Q+ZLZZTH5ofUz96SgWHh/JPYMqVlYo3+8ZpPC/sH8plP7hK3LtzshzTc8Zg7oP8hrVCF0tSDBvzqx0V6e8i1Jf/yPsZ6uPASNKork7fQRgka3Dej3Xy87nLrYZp4yVMmxJtzCXHd+24pe0BdLTliv3c8CGEQuLf3n/F08WmY9Ue+YJcncx61sEvcOyiAWWQdbv8Pb8xYxkbPD6d3S7eUsWMavZWTCzePP/Bc/QjeUjtYwbMs/Kjz1saOHcmQsy4iocihFTeIoULl0Gk3HUAJLvpKgykj2S9pog9+rRFgB/cUp3IlewoD0c2ZA08lDNGlStmtyPO8dXKhdUQQMfL+dj75JZ8tfs8bbzZPZk8vaqvc56i4pKazMIkr1xouZEMKvQTTeoNEtBk5EKCLkF00HH6G11resPvvwZoRsuxiwhvu1VSED6REmNPoT9LGowj18D3wkpL5XjXVKZEkP/IhbJzWr9Z2/Tbv/GbVdX8SBoT3PgeE0DPC6FIXYXy70WhsR9q1Wg+MXUZlojFMmADRXD7KzGmtdfPyKDuuQKJEya1+O+FjLJlI3T4B43k+nWuwozdmpNS78srq0oY9sAgMw9lhAWWjtmt9w7QFPSpGrfZDKgtwYjyP3saZb+KBM76gVGJh78g5Il/PB+x3DEYG44pHhxGazO7PiPooP9GuMjBh7xLIU2717qfESkujjefzKknpFIbSDyRMQ5Vxfa+eOlizjmuPYE3sdBkw4jWMUGCMm0dmkWJrCAi93SltyipTcJ8nuZefuSGPG7NCWFY5Kq1BVkzi1Nmqbs3q4rD57bpw2xTgw0FtfXhi8tUP 3LWTh+YP XuS253SbJ9rZG5MLZJbeSoDvpJSpsQARk85k5rwxIZzeEayrfZti4R7mZoCsKbiT17KCvYbqI6PxNn3mOBH4KyFxH9Ft0Cj8GxCNJIBkdg5eUC05Rc0tzy5vdkE1svon/9DJ6VGKYdhJJwhJu8+Wmu3TFu81T70o0e8B48KEndJh97Yayy9Rd2ZxeL+r0p6Zk/3u8APoJ4avcE1WgKnpmRo5rpWaesOlUDR2C88a6ua1oitqzf/gSo38RSxMnv+CQ+4UHFoFQ65x77z3sDcJckM6PMEVHYWAd0tw9uMt6jQ1i8/R3X6tKwCS6aTayySHd1JWHsaWenDbpfO9WU5IIL5ZwhCiMwJrZAWNTHNO9rv0iNf/4rs358hjESB26ZqtrnXDh6y4p5UCkslvPuQwhglJajjC4g5PRg1XYnlMr6J8pzGlujhptZ0EP575dpoMZGWvUpxCiVL0GTFI7eHxhXxQp5FZA6iy3i2S+vY90AxLNhH8zLJG7HnQh2Z3frUtU5CzpM9P7jAVYqr4TTxdlH6bSU5cCNVkmXNg7Ae6egMvD6BrPpYNnhlLbf5kfvHjFYaHP0jcmdaQpkmENfibHZVTZldqfOPT/+OHuygk9SvUDI2rpaBfcDxWUbj4ctHbwF0U8lpKl/fC64VFY7FdJP1QG4phUWbEr3h6g 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: <linux-mm.kvack.org> List-Subscribe: <mailto:majordomo@kvack.org> List-Unsubscribe: <mailto:majordomo@kvack.org> |
Series |
move per-vma lock into vm_area_struct
|
expand
|
diff --git a/include/linux/mmap_lock.h b/include/linux/mmap_lock.h index 45a21faa3ff6..4706c6769902 100644 --- a/include/linux/mmap_lock.h +++ b/include/linux/mmap_lock.h @@ -122,12 +122,6 @@ static inline bool mmap_lock_speculate_retry(struct mm_struct *mm, unsigned int #endif /* CONFIG_PER_VMA_LOCK */ -static inline void mmap_init_lock(struct mm_struct *mm) -{ - init_rwsem(&mm->mmap_lock); - mm_lock_seqcount_init(mm); -} - static inline void mmap_write_lock(struct mm_struct *mm) { __mmap_lock_trace_start_locking(mm, true); diff --git a/kernel/fork.c b/kernel/fork.c index f2f9e7b427ad..d4c75428ccaf 100644 --- a/kernel/fork.c +++ b/kernel/fork.c @@ -1219,6 +1219,12 @@ static void mm_init_uprobes_state(struct mm_struct *mm) #endif } +static inline void mmap_init_lock(struct mm_struct *mm) +{ + init_rwsem(&mm->mmap_lock); + mm_lock_seqcount_init(mm); +} + static struct mm_struct *mm_init(struct mm_struct *mm, struct task_struct *p, struct user_namespace *user_ns) {