Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp68057rdg; Tue, 10 Oct 2023 04:40:36 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH/7N5butoWiwHAggtkjxrjvTDDZWm81aq8KR2BoC39Jlqbe42/b/jQyMh+sWsLF44LohZZ X-Received: by 2002:a17:903:1c6:b0:1c5:9d00:be84 with SMTP id e6-20020a17090301c600b001c59d00be84mr22519009plh.33.1696938035715; Tue, 10 Oct 2023 04:40:35 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1696938035; cv=pass; d=google.com; s=arc-20160816; b=HaxOOBTSyg66c1oD8bSjtn9VAetSd1J1ymwPlG3FJYhrze0c4pBiUFbc+0B0Cyf/Fi nOKc9PHl6+16uE1RS23wbZbPhL+jo2z2uLb2ZoLJIvWHSDxMwJx+I78FAgE+9/bD4U0V 9y579PmIJsX5fFwGUo7JzMlqQ985RV/m80oZWREtFGmAoJm59E9blSR7c+7m355bj5Bq oFIId+6SqyxqVtMGoOnW1s2Ryp+W3uE7cU0IqSieqbQiol6MSdqrulA4rDRiAvBtNBGq qYccKXr+FBncaoar2eLyBzEq8FwFveH64qGrFHNEt+XsekFZbycLp7cXtUKZMgWRpWO8 1kNA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:from:references:cc:to:content-language:subject :user-agent:date:message-id:dkim-signature; bh=fW5U7IziRp3theiEBjEhD+JWtF/kEywxmtnKRgjpVdY=; fh=Fx9sCJ5jZq16ITjsT1CYvea/7HqaXIjErju/1wb3Ju0=; b=OQPK0P7jW8EaYcrCPcy/NzoAVVqSFfLqYTZroHxJiZDs0Ix/pjCRe65OXcnhhZkWOk 3ihdzdN00F2BaGdT/qiuSo80x1mQp6aemPyAJuz1nB/NdYNBeHBRXcYYlFBQmJ5KIKOD KCY3bcVW0Wk9ovbo6KWJffvvp6L2awUtv3IDFMKdz4lSXh3nxQfkuJbHTMMIatY3R0jn LhQpEKJgtQrDYkV9nHB9YPb8sR4rG/4O7+qtAkiDrP9DgHB9cQDgpeCLgeUiZHTkz+QM U/YbHUevGIWQRypU9VA8dVmI1Igaks6G1u7VVNpd2nwFxyjoD3fwcLH7zC4/K7vk015T +K0w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=DCcghTME; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id h2-20020a635302000000b005898699b2b8si3576913pgb.317.2023.10.10.04.40.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Oct 2023 04:40:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=DCcghTME; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 0E4078022C23; Tue, 10 Oct 2023 04:40:33 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231401AbjJJLkX (ORCPT + 99 others); Tue, 10 Oct 2023 07:40:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46426 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229921AbjJJLkV (ORCPT ); Tue, 10 Oct 2023 07:40:21 -0400 Received: from NAM02-BN1-obe.outbound.protection.outlook.com (mail-bn1nam02on2052.outbound.protection.outlook.com [40.107.212.52]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3375899 for ; Tue, 10 Oct 2023 04:40:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WNQ1F70h2G1RwZFFwlb+eB3gEnAPnIkm+MgD0rhXRDZ4KUU1vTurZCd2C6Kg/2nuZND2iFPcSOabLBohnhcWMJil+EbpRuKAa7zOx3/HkzdDDSpsY9tuGsjbCufO6p7LHD3NrsHaHN5E9eFagB+agSAFKoOopzCtIrsBylc5al6RRX9cYTsFrPhbaBKt8+35+5PBjkWRyroL3EFcy8mW+ZfV0f8TcH9TriOXVp7JIOqaiwGoV24CCX85JdBdJIHlhPClzs3qZrLWT0ru03h/PgyqGN93HWhXnuxQzEAHOGpDt5Nx/Q+o5nfsbPJ2gZZwEp/jJpEWkpxoQa3BBtRVqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=fW5U7IziRp3theiEBjEhD+JWtF/kEywxmtnKRgjpVdY=; b=hUd4vf93BYyh/mYgHNtf3CsfEY+y2Y3aW34zsjvxyS0FOEITPaUC4uNEUYMyvAUZnRfJStyPWZstwdFTeFIoZfXGDEHD9vEabwvIHmxlkVikTKzmokALxDPpnpXjRreR2C/rhnii3Q+GRbDvQpsy7e76dnBRlJR+3HVMEI6hI4I+m90MXpJJ48R3Dg5UkJBsU5ynwQwypVWT2dbguyj42IK6KEF+82pXJvvzgMws123eQVVfr06w9Ih1eulbiGLM8J3C43iq2etNTG1VYCrue9iUDTiB99sqO/K1VIInrgt0K9oPhnA8nzYHllLvLMsjfzCgW57XnPGB01/MCnxXQA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=fW5U7IziRp3theiEBjEhD+JWtF/kEywxmtnKRgjpVdY=; b=DCcghTMESZYj/nP0ZJ2+RSQexVxmwggvJfvmHTEROnUAQn+2rlTrgNvXMnTznfwdO7GyZNZkS9f/HhZXSzMRofMX19c4gk/G0BIH6tUPi3qM23XmizR96g/5tkjl/dI4vtdU+adYBuYFqntkndVn4Hgf2onT+7OKRHxJlxOO16o= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from MN2PR12MB3008.namprd12.prod.outlook.com (2603:10b6:208:c8::17) by LV3PR12MB9095.namprd12.prod.outlook.com (2603:10b6:408:1a6::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6863.36; Tue, 10 Oct 2023 11:40:17 +0000 Received: from MN2PR12MB3008.namprd12.prod.outlook.com ([fe80::74d4:ad6f:f00:8187]) by MN2PR12MB3008.namprd12.prod.outlook.com ([fe80::74d4:ad6f:f00:8187%3]) with mapi id 15.20.6863.041; Tue, 10 Oct 2023 11:40:16 +0000 Message-ID: <15c17bd5-744b-9ae4-93ae-19150bfb85a5@amd.com> Date: Tue, 10 Oct 2023 17:10:06 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.13.1 Subject: Re: [PATCH 6/6] sched/numa: Complete scanning of inactive VMAs when there is no alternative Content-Language: en-US To: Ingo Molnar , Mel Gorman Cc: Peter Zijlstra , K Prateek Nayak , Bharata B Rao , Ingo Molnar , LKML , Linux-MM References: <20231010083143.19593-1-mgorman@techsingularity.net> <20231010083143.19593-7-mgorman@techsingularity.net> From: Raghavendra K T In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: PN3PR01CA0037.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c01:98::16) To MN2PR12MB3008.namprd12.prod.outlook.com (2603:10b6:208:c8::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MN2PR12MB3008:EE_|LV3PR12MB9095:EE_ X-MS-Office365-Filtering-Correlation-Id: 8b698af0-a28c-489d-5d8e-08dbc985ac91 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: AFwxy1ODAA5YqTWJFY12DGiNIc3//3p2gD3Xg7+2sBtVUj0tN0PLsztg32EF2hwpRJ7KcAV/O0N/mKUjCnxld6V4PFBZK5EpiNzmUx9gg7jAQ2h28zSunOIa8JE0J/2pTeSFabjZYOCCNMQc64d9cirgrgXXGlH8DBI/HRDE9UcxwU4kDnvwBGLcyAK9VV8pvJzCpivP8t/omEdvXusEjnuwEFdGRSbB6pCyg+7OC5pRAHPxTCe9po+qwAxWUntcCfBT3zR6OR1bsdidcPtvO7K+aSWua60USFLKTGOzenBPSTq1BlrcTO8yayGOmJ7e9oDtt5hjIfwcYe7epLRe38Qf7Efak1efUb9sHeMhqnIp0Pwuu4/wSLdw9XAM+jV7NDT+L40e9tRm8jifDyMNt/NMmmzIwzBrj3jl53f0aeNGLEo+WWTjE/WglMci3hZQe/HIrwDZyVT2nlMMlqHswiMv/DPa1DXCx9TfBiY23qE1daWZ3CCMj+1yB1XlFYt73tqfjJ448MOeXbEoiTtU91O9KQsAzaj8/lfZ60rL5/Rb7YC0tS14yAFitD6jBbU2fZdalpJldSyxxPE7/bE5hHFoJp3vHqEZ1wslXggvkqDXJPQ3IjR+HqMzOQuSQcobY+kQmQfrAABHJSFfG3Fzvw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MN2PR12MB3008.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(376002)(396003)(136003)(39860400002)(346002)(366004)(230922051799003)(186009)(64100799003)(451199024)(1800799009)(31686004)(83380400001)(26005)(2616005)(53546011)(31696002)(38100700002)(36756003)(478600001)(4326008)(6506007)(2906002)(8676002)(6666004)(6512007)(110136005)(5660300002)(8936002)(966005)(6486002)(316002)(41300700001)(54906003)(66556008)(66946007)(66476007)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?YTVnc2cwVUQ4QWh4NkVmZWZ3cnM0VlBBeVkweDhZU1JESjZmdVJ2My9ZZ3Q5?= =?utf-8?B?V2ZQOHNFcG9FZHhPTW16UXBYRDRUeUlBNzBVSFN2UVpvZExNQXRrWnFuQzN5?= =?utf-8?B?ZmVMLzA1d3F3eHFxdnZEMFF6SGRjc015dk1EVmd0YnA4NjZtTmRYMXYzSUFR?= =?utf-8?B?VjFmSU5DMk1OL1VvR2tYdGdBN25pT1ZJVDR2UG1NYTRVSk5sSEpBSkhJeHpQ?= =?utf-8?B?WnJrMnJxY1h1U0ZsTklEQk9MWVZpUzFaV2VCc21BYVZRREFWNm9jaGhZT0hI?= =?utf-8?B?US9VMDQzVEVCSnVYdWZYSXdMWGF2RVYvTnVRM0lsZlE0RmdkK3JxOS9HQ2VW?= =?utf-8?B?W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atorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8b698af0-a28c-489d-5d8e-08dbc985ac91 X-MS-Exchange-CrossTenant-AuthSource: MN2PR12MB3008.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Oct 2023 11:40:16.8801 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: eiXgo4qiA5piDqVnkx6Mg5Bqy9znrkEtoRc9iV0/eL52VTA3kBLZPobCxHyYn/jJupeu4Bza/QDFi50Fo62KFQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV3PR12MB9095 X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Tue, 10 Oct 2023 04:40:33 -0700 (PDT) On 10/10/2023 2:53 PM, Ingo Molnar wrote: > > * Mel Gorman wrote: > [...] >> Both the number of PTE updates and hint faults is dramatically >> increased. While this is superficially unfortunate, it represents >> ranges that were simply skipped without the patch. As a result >> of the scanning and hinting faults, many more pages were also >> migrated but as the time to completion is reduced, the overhead >> is offset by the gain. > > Nice! I've applied your series to tip:sched/core with a few non-functional > edits to comment/changelog formatting/clarity. > > Btw., was any previous analysis done on the size of the pids_active[] hash > and the hash collision rate? > Hello Ingo, I did test to understand the behaviour threaded workloads relation to pids_active[], and that there is more spread of bits set etc, but not actually from hash_collision point of view since it would work better for workloads that does not create multiple threads quickly (thus we have sparse PIDs) as well as normal case where we have almost continuous PIDS. But I also did not try to increase size of individual pids_active more than 64 for the same reasoning of Mel that at the most we endup doing cross PTE updates. Perhaps I can experiment when I come across workloads that have 512/1000s of threads to refine these cross PTE updates further. However, I have tried increasing history (PeterZ's patch) (i.e., increasing array size of pids_active[]) to get a better VMA candidate for PTE update in https://lore.kernel.org/all/cover.1693287931.git.raghavendra.kt@amd.com/T/ to handle what Mel suggested in other email. viz., 1. Task-active 2. Multiple tasks active 3. Any task active 4. Inactive Thanks and Regards - Raghu