Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp493161rdb; Sat, 30 Sep 2023 12:49:07 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFkrvxpssty1uHfshyHLXEUgXYmDFdW462iQW8AhsdwCWhO6Bytp6XFVh61iAvHtXx2kKAM X-Received: by 2002:a05:6808:10d5:b0:3a9:9bcb:8760 with SMTP id s21-20020a05680810d500b003a99bcb8760mr10101520ois.39.1696103346967; Sat, 30 Sep 2023 12:49:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696103346; cv=none; d=google.com; s=arc-20160816; b=0pCps0eMIWaHnOmK4IXB0XKsAeHStDplzYm4f0hi8PS/vMf3shs7uOhZdgSGmdEEQO FS4/hqXih8BQrBnogalFKURVLRHSEb144jtgJIo0H1lRz4f/RrehMjy0EjgUrZkFeyr4 tMs9BCYxfCHO1ROyyzaF5z2nxwdAKF3HMucGAgVTVAJEnnWveyabNwiuXdfoypNl9PDR dx+u3QC9Gc7DMP80G7m5cnM6cAOXzRBYby72aLIcfT5qyOzccDGqA2eYt3mgdkMEkh3s CkVhaa6/DS3j0HJO9mKubpmWLXP2N4CYO37AtGSNXUXkOeblKlq7KKrDlO0LG+/l7m0D 6YJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id; bh=RchEQaktrxgDxLOAeuu+4G1hucjxljtUbDwn07Gu+Sg=; fh=hOaN1/HlXWrx/vHluPQdqKKg6VbIVLaMJV2uvguRs3c=; b=eKkY2h3G828OfqPcZL/OzoW4GCRjElpYnFFrn+ILyg8HrOxZAp9151HpsbT3nEPvC/ a69eAAHM1/iidsq2EoD+gdxpvngLVwmaZS4ixEk6GUHcOZ7EVCL1rBuR2wJTcN9Mxitm XToiTAK611Ol4HqaMyqClA53fOvUHOVtJFbTl1o8fzb6ibXIFlFmwn35m2jM1yYtX18Y 6RHiTMu0IFPFL7E1/XKdU/A+aKF3vxqlCOjQlPddXrb7GD5JhgST2svKcM+C7E8aYBnD DiOBdEXZqLxiPTpzQLOuHvgoD6dZGCNDoych/H7S7lOLAkbDC2EIKhjzOrtWs0X2zRY0 WqTw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id l191-20020a6388c8000000b00578f1ab2287si24526611pgd.354.2023.09.30.12.49.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 30 Sep 2023 12:49:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id BAF2181ABAC0; Sat, 30 Sep 2023 12:49:03 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229535AbjI3Tsy convert rfc822-to-8bit (ORCPT + 99 others); Sat, 30 Sep 2023 15:48:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33852 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229447AbjI3Tsx (ORCPT ); Sat, 30 Sep 2023 15:48:53 -0400 Received: from shelob.surriel.com (shelob.surriel.com [96.67.55.147]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C908094 for ; Sat, 30 Sep 2023 12:48:51 -0700 (PDT) Received: from imladris.home.surriel.com ([10.0.13.28] helo=imladris.surriel.com) by shelob.surriel.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1qmfwq-0005GD-2p; Sat, 30 Sep 2023 15:48:20 -0400 Message-ID: Subject: Re: [PATCH 1/3] hugetlbfs: extend hugetlb_vma_lock to private VMAs From: Rik van Riel To: Mike Kravetz Cc: linux-kernel@vger.kernel.org, kernel-team@meta.com, linux-mm@kvack.org, akpm@linux-foundation.org, muchun.song@linux.dev, leit@meta.com, willy@infradead.org Date: Sat, 30 Sep 2023 15:48:20 -0400 In-Reply-To: <20230930022842.GA82828@monkey> References: <20230926031245.795759-1-riel@surriel.com> <20230926031245.795759-2-riel@surriel.com> <20230930022842.GA82828@monkey> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT User-Agent: Evolution 3.46.4 (3.46.4-1.fc37) MIME-Version: 1.0 Sender: riel@surriel.com X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Sat, 30 Sep 2023 12:49:03 -0700 (PDT) On Fri, 2023-09-29 at 19:28 -0700, Mike Kravetz wrote: > On 09/25/23 23:10, riel@surriel.com wrote: > > > In reply to patch 1, I suggested the changes: > > > diff --git a/mm/hugetlb.c b/mm/hugetlb.c > > index f906c5fa4d09..8f3d5895fffc 100644 > > --- a/mm/hugetlb.c > > +++ b/mm/hugetlb.c > > @@ -372,6 +372,11 @@ static void > > __hugetlb_vma_unlock_write_free(struct vm_area_struct *vma) > >                 struct hugetlb_vma_lock *vma_lock = vma- > > >vm_private_data; > >   > >                 __hugetlb_vma_unlock_write_put(vma_lock); > > +       } else if (__vma_private_lock(vma)) { > > +               struct resv_map *resv_map = vma_resv_map(vma); > > + > > +               /* no free for anon vmas, but still need to unlock > > */ > > +               up_write(&resv_map->rw_sema); > >         } > >  } > > However, the check for 'if (__vma_private_lock(vma))' was dropped. Oh ugh. I definitely added that in somewhere, but must have committed that to the wrong git branch :( Let me send out a new version with that change. Sorry about that. -- All Rights Reversed.