Message ID | 20220829212531.3184856-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 2627EECAAD2 for <linux-mm@archiver.kernel.org>; Mon, 29 Aug 2022 21:25:52 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 94B1094000C; Mon, 29 Aug 2022 17:25:51 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 8AD7F940008; Mon, 29 Aug 2022 17:25:51 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6633594000C; Mon, 29 Aug 2022 17:25:51 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 4E294940008 for <linux-mm@kvack.org>; Mon, 29 Aug 2022 17:25:51 -0400 (EDT) Received: from smtpin27.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 220F61C64E3 for <linux-mm@kvack.org>; Mon, 29 Aug 2022 21:25:51 +0000 (UTC) X-FDA: 79853912502.27.2EA2A85 Received: from mail-pf1-f201.google.com (mail-pf1-f201.google.com [209.85.210.201]) by imf01.hostedemail.com (Postfix) with ESMTP id BB5FC40048 for <linux-mm@kvack.org>; Mon, 29 Aug 2022 21:25:50 +0000 (UTC) Received: by mail-pf1-f201.google.com with SMTP id dc10-20020a056a0035ca00b0053870674be9so756750pfb.12 for <linux-mm@kvack.org>; Mon, 29 Aug 2022 14:25:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc; bh=ooNZAin4dExMhxnzVFEqRWXW+87JR2sLE0fevcXKZcM=; b=I4AROHhc91xv1qcH3nCi9ZpRLfIZ0YYOknUuCx0UCVegrJDEOhp2xXx6sXe9aCLn1C FzO21jqONtvqpljlp8Pb4Y+CdSx9zRBCbsYcOU1CMA6tT/zAnvmRorbY0bmK2T02uMkI Atv+IFZLAVnvs+tVzbF09RqlClFEsd0HUKtTSkQ+YRbpf3d4jB4ZfuXvxVp5TLyaLLyx AxdLnxV0cUJcHwzUd+Lxky4P92oXj4Xhl4or9fJrlsG5GoIvzarsCtdrQ2b29IJKR80y NIBWQdZUPTZNVXZAtYrsTzYsNpAhtyZg3hqM9pNuOBs9nY5UdbnMfXBZJ7yLdA5TAp1d MxBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc; bh=ooNZAin4dExMhxnzVFEqRWXW+87JR2sLE0fevcXKZcM=; b=eOE+m1Ag9k4hA6RPiVoiq64a10DPLakK9sa/DvvVwAX6H96+kq70YhPL18gGgvYtQQ QzisQko2ZYht1LSominrNuROdeAFNiiyWWtKVaDotqSxz9io/5X8s9exZ+B8CFobIfP+ J3YDsT22/T5zuQhXrydU6oL2CAx11BlBezopFsCyEiELcOGdoDZ95Kl179mUvBpPaezN dEl93Pj67VY66FDdSn9L5NmOtrSo9so7s0YMnvPxHyfpFFeuYGgYE1OEaUKthcLF8DG1 y4ZTiMGV55IlSrBWs5MP/QvrCKyGnUzdqTR4Oi7M3wGU6X31AWaqEC2A46nvGLCPmQiU Viwg== X-Gm-Message-State: ACgBeo1b/rd8RD5Yo8c8c8TcAtCoSaPCdmrdiRrRTE8TtPNpkJg2JYJl d2PDyZAgVjZjjzOGdtDQCdjC71AMxQ0= X-Google-Smtp-Source: AA6agR6Ch+8H2P4ZiI/nyVX9BprKXIg4wSUP+mENwsodRVHrGORNiLr4bLOGgyZYxzbEnnQphTeE0ezRPcY= X-Received: from surenb-spec.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:3e30]) (user=surenb job=sendgmr) by 2002:a17:90a:4607:b0:1fa:f794:2c0d with SMTP id w7-20020a17090a460700b001faf7942c0dmr20939608pjg.24.1661808349897; Mon, 29 Aug 2022 14:25:49 -0700 (PDT) Date: Mon, 29 Aug 2022 21:25:11 +0000 In-Reply-To: <20220829212531.3184856-1-surenb@google.com> Mime-Version: 1.0 References: <20220829212531.3184856-1-surenb@google.com> X-Mailer: git-send-email 2.37.2.672.g94769d06f0-goog Message-ID: <20220829212531.3184856-9-surenb@google.com> Subject: [RFC PATCH 08/28] mm/khugepaged: mark VMA as locked while collapsing a hugepage From: Suren Baghdasaryan <surenb@google.com> To: akpm@linux-foundation.org Cc: michel@lespinasse.org, jglisse@google.com, mhocko@suse.com, vbabka@suse.cz, hannes@cmpxchg.org, mgorman@techsingularity.net, dave@stgolabs.net, willy@infradead.org, liam.howlett@oracle.com, peterz@infradead.org, ldufour@linux.ibm.com, laurent.dufour@fr.ibm.com, paulmck@kernel.org, riel@surriel.com, luto@kernel.org, songliubraving@fb.com, peterx@redhat.com, david@redhat.com, dhowells@redhat.com, hughd@google.com, bigeasy@linutronix.de, kent.overstreet@linux.dev, rientjes@google.com, axelrasmussen@google.com, joelaf@google.com, minchan@google.com, surenb@google.com, kernel-team@android.com, linux-mm@kvack.org, linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, x86@kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1661808350; a=rsa-sha256; cv=none; b=fnYe/FTb0AdFzQpTEN7O6L51g4Pwi/YDM/jILiIBr+JCQ8VODJudwrrSPYUJNVErSMYUk8 q/Cyk41HPiLqra49QlRmUqFs+atktzHOZimq+hdx8sdSdlym6dzUdIXLTmTR8F6oY5h2cz NK54nrnROo51UFer8zR6ez8sRjlx8HI= ARC-Authentication-Results: i=1; imf01.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=I4AROHhc; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf01.hostedemail.com: domain of 33S4NYwYKCI4AC9w5ty66y3w.u64305CF-442Dsu2.69y@flex--surenb.bounces.google.com designates 209.85.210.201 as permitted sender) smtp.mailfrom=33S4NYwYKCI4AC9w5ty66y3w.u64305CF-442Dsu2.69y@flex--surenb.bounces.google.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1661808350; 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=ooNZAin4dExMhxnzVFEqRWXW+87JR2sLE0fevcXKZcM=; b=cTeZNgNuK6+bD64hK7qFeZ8CwHPyxn+OfQDHlSwJv6HrrlG2hLZnl8161jMdtPmIK8DAth 76xRykJMu9Rsk1VXUM+Qku4+tDs1S13DrIX5ojXgLckA8YmR/wsQGAR98inShBTHpzfBtJ t2KWEBAu163cKMjYoMHVJGMUTNnc5HY= Authentication-Results: imf01.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=I4AROHhc; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf01.hostedemail.com: domain of 33S4NYwYKCI4AC9w5ty66y3w.u64305CF-442Dsu2.69y@flex--surenb.bounces.google.com designates 209.85.210.201 as permitted sender) smtp.mailfrom=33S4NYwYKCI4AC9w5ty66y3w.u64305CF-442Dsu2.69y@flex--surenb.bounces.google.com X-Rspam-User: X-Rspamd-Server: rspam10 X-Stat-Signature: pqyzyinbz4ssnw5etqssk4mim59h59k1 X-Rspamd-Queue-Id: BB5FC40048 X-HE-Tag: 1661808350-684803 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000189, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> |
Series |
per-VMA locks proposal
|
expand
|
diff --git a/mm/khugepaged.c b/mm/khugepaged.c index 01f71786d530..030680633989 100644 --- a/mm/khugepaged.c +++ b/mm/khugepaged.c @@ -1072,6 +1072,7 @@ static void collapse_huge_page(struct mm_struct *mm, if (mm_find_pmd(mm, address) != pmd) goto out_up_write; + vma_mark_locked(vma); anon_vma_lock_write(vma->anon_vma); mmu_notifier_range_init(&range, MMU_NOTIFY_CLEAR, 0, NULL, mm,
Protect VMA from concurrent page fault handler while modifying it in collapse_huge_page. Signed-off-by: Suren Baghdasaryan <surenb@google.com> --- mm/khugepaged.c | 1 + 1 file changed, 1 insertion(+)