Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2715384rwd; Fri, 9 Jun 2023 16:03:20 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4VsKiWl8OUB/LMSscF4yt56Qfq7w6bEpN95eicH10c3EZPwn9McmoVml+8xSlrXahJsieA X-Received: by 2002:a17:903:22c9:b0:1ad:fcdc:2a9f with SMTP id y9-20020a17090322c900b001adfcdc2a9fmr130199plg.51.1686351799934; Fri, 09 Jun 2023 16:03:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686351799; cv=none; d=google.com; s=arc-20160816; b=zuOUIb2bf3wDlRCk6ko8hrgyLk4wt40WG4LFVBZ2mxKuQAlZvU8lULZL6AMGZKP+hw 8g6/+HCEMspDSxLAwU7g8ut0qEI52hyxiEuxmS40ttDkoaRXXjAUNgsW5m9S7NDIc7K1 N+QCzLMx3K2HrafBOKG+2BXC8p55T/2ujjjzfTH2Fp9V409n6vBnx8qMP+BL7G3mHSoC SKfSLUsebihS88MCSsdnXREmpDLKy0wRLA6TBRQvCwrdQEVU8nXdwal5SWstrfSSYHxK +BLIniDvyIPVfdDtluStZqqe7fi52snRP6LtfdPDQ+iT+N8LFE/xaeRjvo1el1gtPlV0 rlQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=I7LcE7DmhrKMXXWImGgQOysWtlJyoq2oM0rOKEdtOQ4=; b=IwqFL5hKKN7+Q9vqlZO0SmvPWb/ETsQGcosbdx3dmvRcDd+1TJy/xACYlALDw2Ftyg uBbpYukjnMHS1GcUpgO6yzCbYtvmbDmGwLD+1IOWPHzThAAvmVZDTcFMtI7BI+l3H2rj hp9Z90VouSWIMeBBr5n7QUal6etXl0ssGoCxtnT0G4TV40PwCnMpSMR9DA4lZbU527e2 5yEmk5bCbP2qJBGbj3K11RRSEsDWmO575TmwF6Fxp4lQEB75zSBMa2Ch9eU1TOiXfbxA TGeJZeMjFJNrCER4NoeG6AGpy4+vjgr5Spgn44r0/5Pbc9ZKk8c0vW12fkdlLGvVQoyP Uijw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=xQzU3Qbe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id me12-20020a17090b17cc00b0023a177c4951si3538697pjb.39.2023.06.09.16.03.03; Fri, 09 Jun 2023 16:03:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=xQzU3Qbe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230526AbjFIWt6 (ORCPT + 99 others); Fri, 9 Jun 2023 18:49:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50318 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232321AbjFIWtz (ORCPT ); Fri, 9 Jun 2023 18:49:55 -0400 Received: from mail-yb1-xb29.google.com (mail-yb1-xb29.google.com [IPv6:2607:f8b0:4864:20::b29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6A9EB1BD for ; Fri, 9 Jun 2023 15:49:54 -0700 (PDT) Received: by mail-yb1-xb29.google.com with SMTP id 3f1490d57ef6-bacf685150cso2092266276.3 for ; Fri, 09 Jun 2023 15:49:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1686350993; x=1688942993; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=I7LcE7DmhrKMXXWImGgQOysWtlJyoq2oM0rOKEdtOQ4=; b=xQzU3QbeUFY9kXkPMqupSx1mbwmp8HY7Gjsko+d4ljRkOYSFYYoBCKiqBD+K0e64x7 OQKiO89c4ipJHDAp6BE5z5tRd0+y1i6PoWloWqG5zLtk156WXfNOmAeGSS16gnVeaXZi HCUJc1bb7RwdbySv7XPzUiRwmBl0GNX4R25V/qa+CwwsZDp8JYozPrPjRgs090O+QfgS 3LiL3RU5gg97idhpJl7UGwKAl5oyho2VWzaM+Vi5v69BH8bMNabbhTlVxvQzI00rtFZ0 WWzkcOrOZlDH3SqDLxNRZWOGAMdxjG4yJv4eG0r9HwINBwc+4KFunp/Q9sH5ufhdsY2y 6S1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686350993; x=1688942993; h=content-transfer-encoding:cc: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=I7LcE7DmhrKMXXWImGgQOysWtlJyoq2oM0rOKEdtOQ4=; b=X+BSXHJOllZONbiu6lPOBPvv22ia0V6B6uQSa8Gj+dnz/HCTnoe+ZcFFa+MSTUQfea lv8B7WyS3r8hxrQ/Cz7y6slEpywAsQGeYAxfziTfkkYqRPXBQ61ANYkTy/bDy7j3fgdG sZmyvizKZKon5TDaLxMiQuv9RCzaMhpCJ1/9odkhT69WA33ytFoamMvLlxZ4vXe0rgJa ChocS0UX72Xlg/y1LEpAtvms6RC6l2YqJ9C/vqKYxnKDb9qa4lOMbP3wkum+c/CW160D SgyQ1rRwLJDnaPp5LW9L4pRWoH0E0ffvPggHVdj8/mTjQdvIOFY+LXCMAuly41iH0LQY xa+A== X-Gm-Message-State: AC+VfDwUpGrtwdZUtHWBRJ2JesHXniivqaMy24TUYQfRlaH9iYlfoL6m C5U95noex84Qp51p/h+g1GG2y23NUg+kK5YZ73xh2Q== X-Received: by 2002:a25:df10:0:b0:bac:b478:d215 with SMTP id w16-20020a25df10000000b00bacb478d215mr2433487ybg.9.1686350993473; Fri, 09 Jun 2023 15:49:53 -0700 (PDT) MIME-Version: 1.0 References: <20230609005158.2421285-1-surenb@google.com> <20230609005158.2421285-6-surenb@google.com> In-Reply-To: From: Suren Baghdasaryan Date: Fri, 9 Jun 2023 15:49:42 -0700 Message-ID: Subject: Re: [PATCH v2 5/6] mm: implement folio wait under VMA lock To: Matthew Wilcox Cc: akpm@linux-foundation.org, hannes@cmpxchg.org, mhocko@suse.com, josef@toxicpanda.com, jack@suse.cz, ldufour@linux.ibm.com, laurent.dufour@fr.ibm.com, michel@lespinasse.org, liam.howlett@oracle.com, jglisse@google.com, vbabka@suse.cz, minchan@google.com, dave@stgolabs.net, punit.agrawal@bytedance.com, lstoakes@gmail.com, hdanton@sina.com, apopple@nvidia.com, peterx@redhat.com, ying.huang@intel.com, david@redhat.com, yuzhao@google.com, dhowells@redhat.com, hughd@google.com, viro@zeniv.linux.org.uk, brauner@kernel.org, pasha.tatashin@soleen.com, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-team@android.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 9, 2023 at 12:37=E2=80=AFPM Matthew Wilcox wrote: > > On Fri, Jun 09, 2023 at 11:55:29AM -0700, Suren Baghdasaryan wrote: > > Oh, after rereading I think you are suggesting to replace > > folio_lock_or_retry()/__folio_lock_or_retry() with > > folio_lock_fault()/__folio_lock_fault(), not to add them. Is that > > right? > > Right. It only has two callers. And I'd do that before adding the > FAULT_VMA_LOCK handling to it. Got it. Will make the changes. Thanks folks for the review!