Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp2163540pxb; Fri, 25 Mar 2022 12:13:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxvK3dBIaJJ8PO8N9vZctMzKblc3KfYD4fDN0kymUvcbFlr34usH32AsiYPu58+tLwIGQJp X-Received: by 2002:a05:6a00:2d0:b0:4f4:1f34:e39d with SMTP id b16-20020a056a0002d000b004f41f34e39dmr11607064pft.14.1648235596023; Fri, 25 Mar 2022 12:13:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648235596; cv=none; d=google.com; s=arc-20160816; b=wBY4JguJUNeLtVOS3EWeIAKnj0z0JMsBqlO0U3f4HhR4Ekh9SnDyA2QPpP3rK/FJC5 x5Mx3/FPnMeMiaJhR3+a4vbmfVhIAPPQJGc79pU/lXJvLMfQx7a1e9gEFOjqGWCSToCt ZwydhVyEskKJOYtrjbCEtQuvXMDqeOIUUTVzitQsMCN4BfzhrmhPV1JzCy2AAvcGKMLL bbxzOZi8R5eQOqjciDR9Iwz/iMN0XIfM+EQ1an79n9qmPOMCiHFCZycsQf5z/1S7LRRD MQdWM1p72ueVjKcrgUatMByV/3orHA/Wi6kInciXYaybVBDNmIrCu5ey6hnid1/vlH5v D7hQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-id:content-language:accept-language:in-reply-to:references :message-id:date:thread-index:thread-topic:subject:cc:to:from; bh=wI/TfNx7Qu+PsFj37b9+3zNlyCRMxvRCtMqCpOWq/g0=; b=mlyiYfQAtm4trBzNZBMQR72PAsfPrMztX0vzABKUZ3HKv2TPa5SMci4O3qitnq0RMY gDmAdp8VpwVft/zNZYr/fj8K2G3nZSJmnVe2f3LlFi4JjS79LCSKSJ7f+e0s/1+n1FxK onbmFh5Hrb8zEa/hvxKosh1C9Z3dAZ7asUr0/dnQMuygecc6sLdD0M4xfDzS3DyIvL0g XA94HX7KxSpPPPPfadJwLTa5Q54GvSthbwP4I2Ipaj5/PelPJmRCNV8W3lTVxUh5pE84 nHBZNDQEC8tBUJZg1osxEgFWGgWxqHKk4vRcNz6UwByt+ZAsiPYVvKY39QuOiDhJpHTC aOQw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intersystems.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id g15-20020a056a000b8f00b004fa8e91f1efsi4084838pfj.213.2022.03.25.12.13.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Mar 2022 12:13:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intersystems.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 242E4213524; Fri, 25 Mar 2022 11:17:59 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1354948AbiCYNep convert rfc822-to-8bit (ORCPT + 99 others); Fri, 25 Mar 2022 09:34:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51070 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232070AbiCYNen (ORCPT ); Fri, 25 Mar 2022 09:34:43 -0400 Received: from mail2.intersystems.com (mail2.intersystems.com [38.105.105.84]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 605A35FE7 for ; Fri, 25 Mar 2022 06:33:07 -0700 (PDT) X-InterSystems: Sent from InterSystems X-InterSystems: Sent from InterSystems X-InterSystems: Sent from InterSystems X-InterSystems: Sent from InterSystems From: Ray Fucillo To: Mike Kravetz CC: Ray Fucillo , "linux-kernel@vger.kernel.org" , linux-mm Subject: Re: scalability regressions related to hugetlb_fault() changes Thread-Topic: scalability regressions related to hugetlb_fault() changes Thread-Index: AQHYP7uAlCiDRvHUGUacjbJUOtVkhKzPVz2AgAANE4CAABZqAIAATaiAgACU6YA= Date: Fri, 25 Mar 2022 13:33:03 +0000 Message-ID: References: <43faf292-245b-5db5-cce9-369d8fb6bd21@infradead.org> <8E9438A4-56BF-4DBF-9424-2161A488352B@intersystems.com> <1883d31a-639e-8717-39b1-426628cb0d56@oracle.com> In-Reply-To: <1883d31a-639e-8717-39b1-426628cb0d56@oracle.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.17.254.204] x-c2processedorg: 5d7e5ca7-6395-445f-80da-8568a4fc58e5 Content-Type: text/plain; charset="us-ascii" Content-ID: Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On Mar 25, 2022, at 12:40 AM, Mike Kravetz wrote: > > I will continue to look at this. A quick check of the fork code shows the > semaphore held in read mode for the duration of the page table copy. Thank you for looking into it. As a side note about fork() for context, and not to distract from the regression at hand... There's some history here where we ran into problems circa 2005 where fork time went linear with the size of shared memory, and that was resolved by letting the pages fault in the child. This was when hugetlb was pretty new (and not used by us) and I see now that the fix explicitly excluded hugetlb. Anyway, we now mostly use vfork(), only fork() in some special cases, and improving just fork wouldn't fix the scalability regression for us. But, it does sound like fork() time might be getting large again now that everyone is using very large shared segments with hugetlb, but generally haven't switched to 1GB pages. That old thread is: https://lkml.org/lkml/2005/8/24/190