Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp1831990ybx; Thu, 7 Nov 2019 18:11:12 -0800 (PST) X-Google-Smtp-Source: APXvYqxuM0tmC4/vsfUnf5TKec3+pXOnmPXYfUUp3B0I7MrieLZ7tJakxTHpcdv29Olb/UlAs+P8 X-Received: by 2002:a17:906:7094:: with SMTP id b20mr6408586ejk.134.1573179072297; Thu, 07 Nov 2019 18:11:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573179072; cv=none; d=google.com; s=arc-20160816; b=eZgNWqmLfpw2edJLkutO+V1IIYt1+25RLd7AUNXxz91SMHidtbz+6GfthIcm/AACRW HOC85blKPEsz5slVH5yZqGQflAsXeUOmZcq3+ecTJkEcxvH4lazmqe5xa5HH3lUeAI6H WUWWQvYXE96wTrLA2XPegwN7F3xhMyKMtiZwVylHA3DU8K2ko/tAkLUubtS8QittZJEj 0zPSvWTpCaFcW3eTXHBswHkM/x6imU2bhuw0k7qB2rnOod+39F3aHjj2GQHkHv8170xX BN8a/LNhvkhREAeW48TJ+lMhYpq3YYUwbAmjnyw+RJXls4YSdppA3Ti5Im4Jxv4vN+aK w26A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:mail-followup-to :message-id:subject:cc:to:from:date; bh=y1ypcgLqky++qBG45NERl1uz2fDTmTCNxyk3XQXqG2Y=; b=SLW5uFN21/lDMdKbTrMW2N5HN+uE3pvF+adFktf8Qjj6aMCVWQDdVGROf7UJPtBkyG Hhg5EZyqD6QCzOjPH464B65pCmSb6T2ID6pVCL+Tk5OVpErg/gRPE/2lH49SWetW4m4G QDSoMeDo4Wh0pcKfmhGMgNR2exjL+0NxU4NZH27ipwkVWrAB6t4PqsYD1mzsCxZNt1HA 9MZt2eQQ2FBYwzX0hGuX1lS1YRhs9BQsinMR6/+2dkOIJNS48yr48I9iiChQIn5TXqbj 70OC+prf0JW12p2W/hI+At3p9tPGWeWoKFjdTCGXZpWxndz37WGyXBuc2+Q5ejsfqlgP hBXw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c12si3182911eda.402.2019.11.07.18.10.48; Thu, 07 Nov 2019 18:11:12 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728889AbfKHCJK (ORCPT + 99 others); Thu, 7 Nov 2019 21:09:10 -0500 Received: from mx2.suse.de ([195.135.220.15]:41066 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726094AbfKHCJK (ORCPT ); Thu, 7 Nov 2019 21:09:10 -0500 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 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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