Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp1458672ybe; Wed, 11 Sep 2019 15:30:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqyeT0K9b04KK4Hfoxcw6qicxBSqUAhq4u7ZvCkrMFMgaMSwFBAREOBCcksjA19HghSL7n2U X-Received: by 2002:a50:baab:: with SMTP id x40mr13425513ede.60.1568241032013; Wed, 11 Sep 2019 15:30:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568241032; cv=none; d=google.com; s=arc-20160816; b=c26TM/gRqVoOEuWTYIZA4qB6jKoBpzpTC8Nmip8VDhhtoG50GXehbHFvoucBoD/gxS q26cBRTgehTQrIgRrSj6KhpXGtTX6jiHIGuirfbbXeaSfDKBt/1ZMgyG/ZEwLTmlpGQU VUETlx41mUMyKLAfuV7f+BwNPVGnRVmtKPguNMbBTH++fCVsiKvLBS5scDEl87UWsE7m Y1PpBIpdYmvciiAPyxAhz5F8JilB+nCUShINl82dBbD+gKu5wM3uagwvVY4RKJP+EuqV 9TrUF6or/03zGz9kL0dui/UUulxdhWT3E9HWWMv/eAcrJXcBPg3pLkm9wBWEFs+XqZF/ KeRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:organization:from:references:cc:to:subject; bh=OUNrJkVir90X4EoJN50WXkpRZIeMTg6aSQWCBgLWJ4g=; b=LIT81K65QArgM0aTpFIyLMObaOzwNmeRv3kd9ID59fompp4kHmCdfvwlemcH+vEzrd Q+u8bTEJYzO46WqEcJag6tZWE4ztskzTj9MgBoOBi3BGxyUX6SPRsNB2sF1pB8eYXuT0 2p+lkNrAtsWIA2eQ3s3p4X9a27u1LdBxvbYQeSlBctsa0Gmb5AjAvrf+Ehgi6nO7P1Ga 3myOEhlek0m9uUR41l+9UY819o8+6pclxOi4plKCIF47mZhzvZHT5GY4yNOKpIQy9F99 P95TC1sUEvyn17h3iDHFpRpn9r+4WL/q5/8sWq+nnDSOL66o4QpJMQYFINkutByoXgG4 J9dQ== 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; dmarc=fail (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 re7si11884824ejb.349.2019.09.11.15.30.08; Wed, 11 Sep 2019 15:30:32 -0700 (PDT) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729585AbfIKUvF (ORCPT + 99 others); Wed, 11 Sep 2019 16:51:05 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49166 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729327AbfIKUvE (ORCPT ); Wed, 11 Sep 2019 16:51:04 -0400 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 mx1.redhat.com (Postfix) with ESMTPS id 6274930821BF; Wed, 11 Sep 2019 20:51:04 +0000 (UTC) Received: from llong.remote.csb (ovpn-121-77.rdu2.redhat.com [10.10.121.77]) by smtp.corp.redhat.com (Postfix) with ESMTP id D11845D6A5; Wed, 11 Sep 2019 20:51:01 +0000 (UTC) Subject: Re: [PATCH 5/5] hugetlbfs: Limit wait time when trying to share huge PMD To: Matthew Wilcox Cc: Peter Zijlstra , Ingo Molnar , Will Deacon , Alexander Viro , Mike Kravetz , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, Davidlohr Bueso References: <20190911150537.19527-1-longman@redhat.com> <20190911150537.19527-6-longman@redhat.com> <20190911195745.GI29434@bombadil.infradead.org> From: Waiman Long Organization: Red Hat Message-ID: <11361434-ca3d-78ae-e825-8521ee3bfbe6@redhat.com> Date: Wed, 11 Sep 2019 21:51:00 +0100 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: <20190911195745.GI29434@bombadil.infradead.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-US X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Wed, 11 Sep 2019 20:51:04 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 9/11/19 8:57 PM, Matthew Wilcox wrote: > On Wed, Sep 11, 2019 at 04:05:37PM +0100, Waiman Long wrote: >> To remove the unacceptable delays, we have to limit the amount of wait >> time on the mmap_sem. So the new down_write_timedlock() function is >> used to acquire the write lock on the mmap_sem with a timeout value of >> 10ms which should not cause a perceivable delay. If timeout happens, >> the task will abandon its effort to share the PMD and allocate its own >> copy instead. > If you do a v2, this is *NOT* the mmap_sem. It's the i_mmap_rwsem > which protects a very different data structure from the mmap_sem. > Thanks for reminder. I should have read the code more carefully. Cheers, Longman