From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C3BF8C5DF60 for ; Fri, 8 Nov 2019 03:22:08 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 6464C2087E for ; Fri, 8 Nov 2019 03:22:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="goM3px9y" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6464C2087E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id D2A776B0005; Thu, 7 Nov 2019 22:22:07 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id CDB976B0006; Thu, 7 Nov 2019 22:22:07 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BF1756B0007; Thu, 7 Nov 2019 22:22:07 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0047.hostedemail.com [216.40.44.47]) by kanga.kvack.org (Postfix) with ESMTP id A9ABF6B0005 for ; Thu, 7 Nov 2019 22:22:07 -0500 (EST) Received: from smtpin19.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with SMTP id 5BF22181AEF1A for ; Fri, 8 Nov 2019 03:22:07 +0000 (UTC) X-FDA: 76131661494.19.ghost02_2f95bc071a052 X-HE-Tag: ghost02_2f95bc071a052 X-Filterd-Recvd-Size: 2397 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf16.hostedemail.com (Postfix) with ESMTP for ; Fri, 8 Nov 2019 03:22:06 +0000 (UTC) Received: from localhost.localdomain (c-73-231-172-41.hsd1.ca.comcast.net [73.231.172.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 5786D2084D; Fri, 8 Nov 2019 03:22:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1573183325; bh=TtcIWVFvH8sO1mq2610KXVS5GHlyLmK8WHMed4U9AGE=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=goM3px9yVWQf4lLKGGqGOlhfcK257j/88y22lMvV/faxJTGgCRbxIR8rGfQ5CGTIi TIA7RiicdBJaz8LkMEIljlJGPwo9VhlEl2Wt45XF5wMI7vFupjlApXz/vFhXW1ujnA 7tioyhL0YMkILin71mygpOcnIGD90V0T2nbXh7zs= Date: Thu, 7 Nov 2019 19:22:02 -0800 From: Andrew Morton To: Davidlohr Bueso Cc: Mike Kravetz , Matthew Wilcox , Waiman Long , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Peter Zijlstra , Ingo Molnar , Will Deacon Subject: Re: [PATCH] hugetlbfs: Take read_lock on i_mmap for PMD sharing Message-Id: <20191107192202.8869589f225132480d77a33b@linux-foundation.org> In-Reply-To: <20191108020456.sulyjskhq3s5zcaa@linux-p48b> References: <20191107190628.22667-1-longman@redhat.com> <20191107195441.GF11823@bombadil.infradead.org> <20191108020456.sulyjskhq3s5zcaa@linux-p48b> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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: On Thu, 7 Nov 2019 18:04:56 -0800 Davidlohr Bueso wrote: > On Thu, 07 Nov 2019, Mike Kravetz wrote: > > >Note that huge_pmd_share now increments the page count with the semaphore > >held just in read mode. It is OK to do increments in parallel without > >synchronization. However, we don't want anyone else changing the count > >while that check in huge_pmd_unshare is happening. Hence, the need for > >taking the semaphore in write mode. > > This would be a nice addition to the changelog methinks. Done.