Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp1527265ybx; Thu, 7 Nov 2019 13:10:33 -0800 (PST) X-Google-Smtp-Source: APXvYqzp+qJKo3aswAHRWeecQ9a9F4EhS7vx/cOPpL6knwwobCulQcDKthm4tWGllXoklzu/+wEO X-Received: by 2002:a17:906:1be9:: with SMTP id t9mr5289100ejg.10.1573161033342; Thu, 07 Nov 2019 13:10:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573161033; cv=none; d=google.com; s=arc-20160816; b=wzrca89RjLAio6wgHyM5w1t0tVihSi5R9mx/iNhadbA9UDoQQraEz4FLvzpJ3YMXqM ZZaaN5xv9bW/gFy+kL4lOvL4RR8RmF1Wv36W//wqSAU6M7TIpu/93JD7MRK/emodikxR 9qG2OoDqDGtDFR6MUayEX5dP8sUx+7ID4WR/1Ce9Mk5LO8aXzTM4gUgkAX4nFMe0LhT9 ql5XTYGSM3OofsZdDZEvtS5qbt5MPTM3ThneQ/hViIZ7C3FFtdkxVPTPl5WfEWPB2V0L 9X+3+vxf4+GfPuxpNr6oBqM03DkdXMT2v1T7bsRinm8OSYMWRZ7FBPNRmoFlVgXavOk7 hylA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:organization:from:references:cc:to:subject :dkim-signature; bh=h877o6Ni/SlJBBVQj+VUyT0bhIicQJLBgZDWVWapS4I=; b=mlcHN5SP08QnGH3JixD29yE/9z+DMs4Gb+XC7mmFHmaGh0IK8x4L9STecZw4plkOFb Bi4DLlMHo+qbhCbQu7qQ+YA4I7j+a2T/E5M74+AJ5nuHc+F8KSc8ihFZlcBfdR+We8yh 6WIW2sIyD9D7+T8/rXc6qmhLkkIggxz1nkQhB5aalxd1to+nvHHEgCt8/aU9aTFbx78B trzSbkJeHftGOlwes2ZfHi8mfLjDyWi/teVxoDE0ALwxwXCeXlhI1fpbo0tQ6FEqrZ5i CzYPJzDn7gTe/RaGHrTwQ1kBbBFlTTCIBsoGvlYsEEbmnHyUqjLlYemPg0MgVbilAJ0F pkKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=iTEIqAix; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d6si2806736ede.119.2019.11.07.13.10.08; Thu, 07 Nov 2019 13:10:33 -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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=iTEIqAix; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726971AbfKGVG4 (ORCPT + 99 others); Thu, 7 Nov 2019 16:06:56 -0500 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:39594 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725870AbfKGVGz (ORCPT ); Thu, 7 Nov 2019 16:06:55 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1573160814; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=h877o6Ni/SlJBBVQj+VUyT0bhIicQJLBgZDWVWapS4I=; b=iTEIqAixIw4sIj3h/NeSoyy8Ve2yktdK+StzzVUGyroDS1PdmEAL31KHK85M5MbxoE/ml4 8cCf+8geGzLhJSxIViWEVDbFFZqw4Im4DzyJggI2VtYKLe56hm3895mD6AG4c27RKnCQY2 24TLaa3FcGrgTo9bG8DaB/0i5JlO3fM= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-32-wt8G7STeMIyXmDYd7WgxKA-1; Thu, 07 Nov 2019 16:06:50 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E2ED21005500; Thu, 7 Nov 2019 21:06:48 +0000 (UTC) Received: from llong.remote.csb (dhcp-17-59.bos.redhat.com [10.18.17.59]) by smtp.corp.redhat.com (Postfix) with ESMTP id F14125D6B7; Thu, 7 Nov 2019 21:06:47 +0000 (UTC) Subject: Re: [PATCH] hugetlbfs: Take read_lock on i_mmap for PMD sharing To: Matthew Wilcox Cc: Mike Kravetz , Andrew Morton , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Davidlohr Bueso , Peter Zijlstra , Ingo Molnar , Will Deacon References: <20191107190628.22667-1-longman@redhat.com> <20191107194225.GE11823@bombadil.infradead.org> From: Waiman Long Organization: Red Hat Message-ID: <2d4b12a7-ea30-fe33-f59d-342346dfdec9@redhat.com> Date: Thu, 7 Nov 2019 16:06:47 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: <20191107194225.GE11823@bombadil.infradead.org> Content-Language: en-US X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-MC-Unique: wt8G7STeMIyXmDYd7WgxKA-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/7/19 2:42 PM, Matthew Wilcox wrote: > On Thu, Nov 07, 2019 at 02:06:28PM -0500, Waiman Long wrote: >> -=09i_mmap_lock_write(mapping); >> +=09/* >> +=09 * PMD sharing does not require changes to i_mmap. So a read lock >> +=09 * is enuogh. >> +=09 */ >> +=09i_mmap_lock_read(mapping); > We don't have comments before any of the other calls to i_mmap_lock_read(= ) > justifying why we don't need the write lock. I don't understand why this > situation is different. Just delete the comment and make this a two-line > patch. > I am fine with that. I will send a v2 patch. Cheers, Longman