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.4 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,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 ABD93C43331 for ; Thu, 7 Nov 2019 21:06:56 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 6985C206C3 for ; Thu, 7 Nov 2019 21:06:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="iTEIqAix" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6985C206C3 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 126A86B0003; Thu, 7 Nov 2019 16:06:56 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 0D72E6B0006; Thu, 7 Nov 2019 16:06:56 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id F077C6B0007; Thu, 7 Nov 2019 16:06:55 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0129.hostedemail.com [216.40.44.129]) by kanga.kvack.org (Postfix) with ESMTP id D958F6B0003 for ; Thu, 7 Nov 2019 16:06:55 -0500 (EST) Received: from smtpin25.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with SMTP id 8C2CC49960B for ; Thu, 7 Nov 2019 21:06:55 +0000 (UTC) X-FDA: 76130715990.25.club41_76a156f3b8928 X-HE-Tag: club41_76a156f3b8928 X-Filterd-Recvd-Size: 3156 Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) by imf48.hostedemail.com (Postfix) with ESMTP for ; Thu, 7 Nov 2019 21:06:55 +0000 (UTC) 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 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 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