Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp1060483ybe; Wed, 11 Sep 2019 08:46:46 -0700 (PDT) X-Google-Smtp-Source: APXvYqyyFi7+YZwPlV5uvgDYXZPdE/3DOJIqe4JxY0XD2vXhEyWJHgPbMWvVtlAZ+QiVelmtTT6T X-Received: by 2002:aa7:c1c5:: with SMTP id d5mr36984674edp.46.1568216806719; Wed, 11 Sep 2019 08:46:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568216806; cv=none; d=google.com; s=arc-20160816; b=F58WrXy+IizoN3iVdTgLGXEIK8NroRNmL0rIo/zIwnmTGd4R+0wgjtyDKE6SHvkhIx 2lm05sFMnvGnB2sYhMeuqdQRMpX/gWMNqGr30XDNR5Bv//6LlOXNcgqVn6Q9CgQW7/za eZrJ36f79AOW7+Q1Cts46BA42kzTVZWSsKTM0i81YTxiLWzTyRkGoTx8NfqrmMwJXewk hw3kENhYsKibG0okh+5m+cZBjOkT0Ldw9+pFCdT8XGCPE9uomYyOY5Z06RRMbmtBFraD TJ0AH1lu1BfyWCVAxbfvf3xec9s1Qoi7FQ9mSKP9PSQz9UfzOatfMd8PGMy6u4sl1GI4 J9Hg== 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=TnzIvgdwxnnwtI+MpnYweiaRzA+VPXIh4xKMV7Tyg7o=; b=OD+auy7xfzYUDjcSBR1huq9dvezkpmb5ygtlvNxS6huqWQRIzn/vqqWimxBmdEWR7K B88ZD8JIWFypUTvxRny1+Xdn9+kA2F8xwLLlO6xo8lQw2uAtJNxCNm43XkLdNke5WEYO iBwDWtqnYjlQSau8qowuAgLoFZTgKUGGk/2BXDKU71vllne6rmbmHHwMEm+gLXGIjWaf 7wd91zKf3O1SyQNHzzhzoDhjdgQm5kDKhrmVBQ5hCh8t4N5jkQYLPO5JNsDRmrhXkZPL eGn4tWwGakhk0NLl4dWUfkzE9asKxoXHz40OSUJi88Oy6QJmOcPHTwIUTGmgPauiRELh SpaQ== 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 z2si12921754edq.361.2019.09.11.08.46.23; Wed, 11 Sep 2019 08:46:46 -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 S1728534AbfIKPoh (ORCPT + 99 others); Wed, 11 Sep 2019 11:44:37 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50096 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728266AbfIKPog (ORCPT ); Wed, 11 Sep 2019 11:44:36 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4C03F2DA980; Wed, 11 Sep 2019 15:44:36 +0000 (UTC) Received: from llong.remote.csb (ovpn-124-131.rdu2.redhat.com [10.10.124.131]) by smtp.corp.redhat.com (Postfix) with ESMTP id DED2D19C78; Wed, 11 Sep 2019 15:44:33 +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> <20190911151451.GH29434@bombadil.infradead.org> From: Waiman Long Organization: Red Hat Message-ID: <19d9ea18-bd20-e02f-c1de-70e7322f5f22@redhat.com> Date: Wed, 11 Sep 2019 16:44:32 +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: <20190911151451.GH29434@bombadil.infradead.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-US X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Wed, 11 Sep 2019 15:44:36 +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 4:14 PM, Matthew Wilcox wrote: > On Wed, Sep 11, 2019 at 04:05:37PM +0100, Waiman Long wrote: >> When allocating a large amount of static hugepages (~500-1500GB) on a >> system with large number of CPUs (4, 8 or even 16 sockets), performance >> degradation (random multi-second delays) was observed when thousands >> of processes are trying to fault in the data into the huge pages. The >> likelihood of the delay increases with the number of sockets and hence >> the CPUs a system has. This only happens in the initial setup phase >> and will be gone after all the necessary data are faulted in. > Can;t the application just specify MAP_POPULATE? Originally, I thought that this happened in the startup phase when the pages were faulted in. The problem persists after steady state had been reached though. Every time you have a new user process created, it will have its own page table. It is the sharing of the of huge page shared memory that is causing problem. Of course, it depends on how the application is written. Anyway, MAP_POPULATE will not be useful in this case. Thanks, Longman