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=-2.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 12E37C43331 for ; Fri, 8 Nov 2019 02:09:12 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id DAD5E21882 for ; Fri, 8 Nov 2019 02:09:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DAD5E21882 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=stgolabs.net Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 7959D6B0008; Thu, 7 Nov 2019 21:09:11 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 71FAD6B000A; Thu, 7 Nov 2019 21:09:11 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6358D6B000C; Thu, 7 Nov 2019 21:09:11 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0060.hostedemail.com [216.40.44.60]) by kanga.kvack.org (Postfix) with ESMTP id 4A90C6B0008 for ; Thu, 7 Nov 2019 21:09:11 -0500 (EST) Received: from smtpin12.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with SMTP id 0A6788249980 for ; Fri, 8 Nov 2019 02:09:11 +0000 (UTC) X-FDA: 76131477702.12.trees78_8a5993059e323 X-HE-Tag: trees78_8a5993059e323 X-Filterd-Recvd-Size: 2080 Received: from mx1.suse.de (mx2.suse.de [195.135.220.15]) by imf12.hostedemail.com (Postfix) with ESMTP for ; Fri, 8 Nov 2019 02:09:10 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id CFB6EAF35; Fri, 8 Nov 2019 02:09:08 +0000 (UTC) Date: Thu, 7 Nov 2019 18:04:56 -0800 From: Davidlohr Bueso To: Mike Kravetz Cc: Matthew Wilcox , Waiman Long , Andrew Morton , 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: <20191108020456.sulyjskhq3s5zcaa@linux-p48b> Mail-Followup-To: Mike Kravetz , Matthew Wilcox , Waiman Long , Andrew Morton , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Peter Zijlstra , Ingo Molnar , Will Deacon References: <20191107190628.22667-1-longman@redhat.com> <20191107195441.GF11823@bombadil.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180716 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, 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. Thanks, Davidlohr