Received: by 2002:a05:7412:2a91:b0:fc:a2b0:25d7 with SMTP id u17csp131287rdh; Tue, 13 Feb 2024 11:31:26 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUFXXtOzjQjSJ2dnbsoP5OOjK9NWhDu3I07UIFbLPZ/OkeIaqHCoyMFfLAcGLXTiupdlt6f9nw/HLEeBnLptUI3VNrEOZUEmOPzNLonpw== X-Google-Smtp-Source: AGHT+IF6D/pN+3ZRp98qvXCNEm12IPtmcKCE8qlHCAJY6uMx9PNbQYIPhjaNG1O6fvra2CAHTGwm X-Received: by 2002:a05:6a20:9d90:b0:19b:e91c:1a42 with SMTP id mu16-20020a056a209d9000b0019be91c1a42mr666083pzb.55.1707852686053; Tue, 13 Feb 2024 11:31:26 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707852686; cv=pass; d=google.com; s=arc-20160816; b=WArgk0Hzq/hneHf6qsCPphPC0B+sbU1SnMfewB/TawXPodKFpzakSHonEoBOXPWl1/ cYuiXIhibR62j/YSj0bVRfANdvf4z9pIERXORTyykkJfDMtTdyr8wOSmuz9zjXqXVPK8 Sf0c94vGiE+vBnW5A1zASx3ZVInBHoQjZgc2Z9McX093hkKPv86nviTsxG9GMQg+ama+ Iiu+yP0dpUXlu/NTd8DUCt+YzsYCr+cZK9tGtJrIBH7ny7ZjcYZBgcfiTqFsZSyRfeSW Qob0vfJqz2Wu3LijGyqSXJCT/CoWpVMvvFZvEA9dvlM20PEjv8e8F+0JRnbuZlmUINUH PnNw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=Tw2rowHIbPAqoJMrxrzUcDB4F9+J8tItAzgiEGHiSEg=; fh=fE+15VVW85PtXmU5Vto4KSjlk7lDzP69zz/wXGLemk0=; b=cu1RjVRgjjhQJ8QjIcrQpRSuWCranMzgquJtb4LgDQmQJMU1WPqAp+Laxn+huoWA3G MJwTuQzrTMfcuFivD420mPek88ryImuhD57fZaWHot72z0Z9G6K6f8X+jLDRfKZBVqrX NKAitY7Ack44WAZRO6/Cw/EYW5P1kSHAPermtp230+ZMorH68gEC+2c2UCr4GxlgJ98W Wh/X4/T9zJ8HyqHQbyqqDEuPbDdGJ/oT5YwFQIgHhMcBZz0CHDJRVG3P4FXFnHoDNUZm cK0VVbWHyuGsWwrsMokNjHI5pMepGKJSoFisiviaOJyEoY5OXOu2dHZaeAcdYBAfTIOc qkJg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=4hdv3Tw7; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-64165-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-64165-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com X-Forwarded-Encrypted: i=2; AJvYcCX2HFG0Nk0dzzIrTkHctgM6KtfUv7U2rHDXatDbMGMdlLmiWbUV3uyPONZz6pPxSMlb9/FjxTsckzMjCYpfpD34EGzxjUlNXo1yaI7pZw== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id ko4-20020a056a00460400b006dbb1f82e81si7309820pfb.170.2024.02.13.11.31.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Feb 2024 11:31:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-64165-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=4hdv3Tw7; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-64165-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-64165-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id B4F7F2877C2 for ; Tue, 13 Feb 2024 19:31:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1FC676087D; Tue, 13 Feb 2024 19:31:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="4hdv3Tw7" Received: from mail-yb1-f180.google.com (mail-yb1-f180.google.com [209.85.219.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A4DF65FF0A for ; Tue, 13 Feb 2024 19:31:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.180 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707852675; cv=none; b=KoZDFkoMcEBh8Glg9qDuOdMObAJy+78vVJrpTXohhlO8Fm6JcAzLhIAVd6jAWG+cHQxLjFd06LzT+qbEY2hJ4EU5jMKaCG3o6BkuUKFLBN606XNuJ33dd5bQoODlNGOQS0lU3abh7nElOiG5SaRUmA6AZfuyttSK4HcoB9YF9vM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707852675; c=relaxed/simple; bh=Tw2rowHIbPAqoJMrxrzUcDB4F9+J8tItAzgiEGHiSEg=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Content-Type; b=uTLPi7aRAzmmOkLPtNQx7WAFOOcGvkRiENu5qAwC2bWAzC+vmWLrhRYc+OTj12YFoMqEMw25TIv0ZK9LyzXCpPBnM0tkXQG6mj/uiWPWFe3JaxDThjLTQqpHx1FdknfB1F5fsI97woA8pwKAR/wsL/ZW+OdGmalleuBThgxhkiE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=4hdv3Tw7; arc=none smtp.client-ip=209.85.219.180 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=google.com Received: by mail-yb1-f180.google.com with SMTP id 3f1490d57ef6-dcc86086c9fso1040790276.3 for ; Tue, 13 Feb 2024 11:31:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1707852672; x=1708457472; darn=vger.kernel.org; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=Tw2rowHIbPAqoJMrxrzUcDB4F9+J8tItAzgiEGHiSEg=; b=4hdv3Tw7ANl3xmVEx9SQnA459F3eifEgZzb4mM2FupeQpsfXCjqB9YOptXjOZOmnbp X7jLn7zitH2x21NE16NqBGqQ3DN9EeRDQECG/eybSAn8rTni/Uoaw+qZNsrCIgLrr6xy pzQIkK3F2lkjCcbEDztysysZHS01cvgkvSKth7pEdf2uKeugeUoamvvmCQ1cxMjW0LbS EzjuI6KclEAzhLRWyjdOojSGHn5sIIEJcM60L3hsDFiLEEqii1+6frFf53UF/jECJo8S sN50aT2bQbSE+wFlo87AZsqKL7p5Lw6YqanIkXJ9f3JbHB0lbFUd8jxTbJKvB+afhG9i i2Kg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707852672; x=1708457472; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Tw2rowHIbPAqoJMrxrzUcDB4F9+J8tItAzgiEGHiSEg=; b=w8gFL59f462TE7PrnuxVKPHGjQ+hQpWMbP/1P+kdkR8aAa1QiZIJtEtLMZekecQ5kf s+QAwRxvCeLWnFdeiAuV/P8VagpnQ0GtwUC1l7pQqkEX1GJ0AbKYIF9wTHeUzVdxxPFZ 0Yixn2rFC5F/ugH38Ye9/v7pjAQjXdU2sldXbV5c05SX8SjH9T225c4fugcckpiq4vQ7 FbZgchQEDwGSrAxACJkXE/ykVRw7oWxSv5nWpcszc5tgkINrLgBKL6e78NVwMu2UuvU0 e1NvdFEg8J6aFl8h1UbrxCPTxmY4Wd0nTC3JNCsLnqLoML7ioZv1S8cGU6hiMgpL/HSt +D/A== X-Forwarded-Encrypted: i=1; AJvYcCWQAnhpokV9as3nXbMiQk4y2zP7GsU3ObSWfF0QDcpMe88QN9XTpppZTc7BQoxiHG6OZNEB5eqrjr9mEeOHsC2IZetQyEhdJxNUywxc X-Gm-Message-State: AOJu0YyA6WUnSO/9KtaJ12hZt8Wr5xGzoHl+Ujy9HNQFI2FkopB9wzwO Y+Onz2wDb5AwIJQTFK/nOZAD23kkXB55TBsz34VCVd5xddePg50JrMXjJycUPV8CHQe2A3i47BK 9jwyNL7cvdF3CRJV4PNhEUzXvzVrD4QaC89tK X-Received: by 2002:a5b:b92:0:b0:dc7:4bc5:72cf with SMTP id l18-20020a5b0b92000000b00dc74bc572cfmr277658ybq.14.1707852672365; Tue, 13 Feb 2024 11:31:12 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240213001920.3551772-1-lokeshgidra@google.com> <20240213001920.3551772-4-lokeshgidra@google.com> <20240213033307.zbhrpjigco7vl56z@revolver> <20240213170609.s3queephdyxzrz7j@revolver> <20240213184905.tp4i2ifbglfzlwi6@revolver> <20240213192744.5fqwrlqz5bbvqtf5@revolver> In-Reply-To: <20240213192744.5fqwrlqz5bbvqtf5@revolver> From: Suren Baghdasaryan Date: Tue, 13 Feb 2024 11:30:59 -0800 Message-ID: Subject: Re: [PATCH v5 3/3] userfaultfd: use per-vma locks in userfaultfd operations To: "Liam R. Howlett" , Lokesh Gidra , Suren Baghdasaryan , akpm@linux-foundation.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, selinux@vger.kernel.org, kernel-team@android.com, aarcange@redhat.com, peterx@redhat.com, david@redhat.com, axelrasmussen@google.com, bgeffon@google.com, willy@infradead.org, jannh@google.com, kaleshsingh@google.com, ngeoffray@google.com, timmurray@google.com, rppt@kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Feb 13, 2024 at 11:27=E2=80=AFAM Liam R. Howlett wrote: > > * Lokesh Gidra [240213 14:18]: > ... > > > > > We could use something like uffd_prepare(), uffd_complete() but I > > > > thought of those names rather late in the cycle, but I've already c= aused > > > > many iterations of this patch set and that clean up didn't seem as = vital > > > > as simplicity and clarity of the locking code. > > > > I anyway have to send another version to fix the error handling that > > you reported earlier. I can take care of this in that version. > > > > mfill_atomic...() functions (annoyingly) have to sometimes unlock and > > relock. Using prepare/complete in that context seems incompatible. > > > > > > > > Maybe lock_vma_for_uffd()/unlock_vma_for_uffd()? Whatever name is > > > better I'm fine with it but all these #ifdef's sprinkled around don't > > > contribute to the readability. > > > > I'll wait for an agreement on this because I too don't like using so > > many ifdef's either. > > > > Since these functions are supposed to have prototype depending on > > mfill/move, how about the following names: > > > > uffd_lock_mfill_vma()/uffd_unlock_mfill_vma() > > uffd_lock_move_vmas()/uffd_unlock_move_vmas() > > > > Of course, I'm open to other suggestions as well. > > > > I'm happy with those if you remove the vma/vmas from the name. Sounds good to me. > > -- > To unsubscribe from this group and stop receiving emails from it, send an= email to kernel-team+unsubscribe@android.com. >