From patchwork Tue Aug 29 06:06:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Raghavendra K T X-Patchwork-Id: 13368615 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9FE06C71153 for ; Tue, 29 Aug 2023 06:07:40 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 1FE7C280033; Tue, 29 Aug 2023 02:07:40 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 1AE918E001E; Tue, 29 Aug 2023 02:07:40 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0771F280033; Tue, 29 Aug 2023 02:07:40 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id EA6DE8E001E for ; Tue, 29 Aug 2023 02:07:39 -0400 (EDT) Received: from smtpin09.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id C236F403C1 for ; Tue, 29 Aug 2023 06:07:39 +0000 (UTC) X-FDA: 81176110638.09.EA44415 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2051.outbound.protection.outlook.com [40.107.94.51]) by imf26.hostedemail.com (Postfix) with ESMTP id C6DF514000A for ; Tue, 29 Aug 2023 06:07:36 +0000 (UTC) Authentication-Results: imf26.hostedemail.com; dkim=pass header.d=amd.com header.s=selector1 header.b=tkW9dUVT; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=quarantine) header.from=amd.com; spf=pass (imf26.hostedemail.com: domain of Raghavendra.KodsaraThimmappa@amd.com designates 40.107.94.51 as permitted sender) smtp.mailfrom=Raghavendra.KodsaraThimmappa@amd.com ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1693289256; a=rsa-sha256; cv=pass; b=Tzgw6mz8vdVK2ebwXvKzCwILBQzUbL9qf/qg5ps1X1ChpFxbITmzKPClrNE+GksYaPs0W/ wNpC6nhmF1Ao/uTItSoTvErjSi3nQdIathEol4WF3f+Q0iDJZcMGeIMRWfe6rufWPO/yZB ol968faxu1nN4pmsjZNpPZH6eg72Jwk= ARC-Authentication-Results: i=2; imf26.hostedemail.com; dkim=pass header.d=amd.com header.s=selector1 header.b=tkW9dUVT; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=quarantine) header.from=amd.com; spf=pass (imf26.hostedemail.com: domain of Raghavendra.KodsaraThimmappa@amd.com designates 40.107.94.51 as permitted sender) smtp.mailfrom=Raghavendra.KodsaraThimmappa@amd.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1693289256; h=from:from:sender: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:dkim-signature; bh=IEz2+qnb2lnDS8E0XPihouWAu39teWcxGama3d/HlJE=; b=FU6T04/QHvhxNBpeFcOiEriJEOJa7w1QC0qUDzDylsOXxWSIbGgoS+XhzMHytjs1s3FFba bevwrTB5OMrV/Rzsp/FUTPNsKvofiZPVXjjfxJL+m6+lC4VDoxhcz7qLqr9AnoJnNMQauU L7Ne6ofL+fJePZ4gi0d3lowYGh3C3KM= ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RwHuH8lyZfIOX6uy7ysdaOXTGDbzRyqIB83ajCb7KXIXNrneL0OLaxKhQujkp/51EDkqgddCScSbSWBfK7IFprIiVaZBwP8PdmfhvoMJhevlCfFKOYaRi3AolzZNXsMnjvxL+pCwDDL5C1wnpm9qJinxYOmzC1X7JoYwYExSSXKWFxvYEGofkBJOe7YIHTDdkV17wA/Eym5pmdMYNtLRdq+pApHLT4TmdDQWL0NaKliTfD8G07EnRCrvRrf5FHMeWOMEyaDAs4+ttLFxD4C57V3/+3A7Z6Ui+Y1lBP2KiCNTKQKHh50B/nQu2FTOgYnv+24mDYHOBKcbjFM2EIM/pQ== 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=IEz2+qnb2lnDS8E0XPihouWAu39teWcxGama3d/HlJE=; b=kPXzkXkjO002wBOXnTc7YcXZCBjDfuRKJhig9cOREZyAufaKO5EtSd0HaoJx6xUjxYCXOsGjcGfUcGXCv5GB2yphJF4AhW8cOulCh6e8+mBqNbXScqeHl40bcb+nKb0hQjiY6w3kpIdHnwn2RcftXOJON56uvew5fXOMAPxzPoXPfHsHBzqpjskWBujcX7HWC4ggoHSzxpjCEfX30jzEgNb2mM0BTiJkRkIRSITCQoPa3825U8feRAucQloW2Vwbx22wSNcDDzBlaeDLtitjMbyj9MccU9b9BCNW4VRL9rhWzqivtsDolrqaDH5GQsbpIoIAOUIxH8hzFzjeQCheeA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); 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=IEz2+qnb2lnDS8E0XPihouWAu39teWcxGama3d/HlJE=; b=tkW9dUVTnH0my/7jP+6xVW4V+kb+Hm4cgN0uCZ/8VsuUzrQevXbAJjbvI/GvpzHL2TJjIE1relN0rj3xCxpVkhzxvvme/kTqzWh/S9oNh/OIMLPUGOzFFMa1u0H7vo0fMe3dpjzPDi8XSJLu6X5yz5pzVxNqsQCEyVZIAM+Oh7A= Received: from SA9PR13CA0068.namprd13.prod.outlook.com (2603:10b6:806:23::13) by CH3PR12MB9218.namprd12.prod.outlook.com (2603:10b6:610:19f::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6699.35; Tue, 29 Aug 2023 06:07:32 +0000 Received: from SN1PEPF0002636C.namprd02.prod.outlook.com (2603:10b6:806:23:cafe::dc) by SA9PR13CA0068.outlook.office365.com (2603:10b6:806:23::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6745.18 via Frontend Transport; Tue, 29 Aug 2023 06:07:31 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by SN1PEPF0002636C.mail.protection.outlook.com (10.167.241.137) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6745.17 via Frontend Transport; Tue, 29 Aug 2023 06:07:31 +0000 Received: from BLR-L-RKODSARA.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Tue, 29 Aug 2023 01:07:25 -0500 From: Raghavendra K T To: , CC: Ingo Molnar , Peter Zijlstra , "Mel Gorman" , Andrew Morton , "David Hildenbrand" , , Juri Lelli , Vincent Guittot , Bharata B Rao , Aithal Srikanth , "kernel test robot" , Raghavendra K T , Sapkal Swapnil , K Prateek Nayak Subject: [RFC PATCH V1 3/6] sched/numa: Remove unconditional scan logic using mm numa_scan_seq Date: Tue, 29 Aug 2023 11:36:11 +0530 Message-ID: X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN1PEPF0002636C:EE_|CH3PR12MB9218:EE_ X-MS-Office365-Filtering-Correlation-Id: c9faf779-1997-45ca-7613-08dba8563b05 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: k5biHmpdEDFVYJgo4N2fAack4i0ZOMS63ZDUR1Oz7VOZCfNH+6Ovd6rHzwxtuWEJRttFftScKA5O1e5wTjSmxqifBpST70AAii05B+Cp5KgSDLMu9xWuEYzTTwpn8vaSoUDQIGBKa7axdMTmo1Q4OoocJFVBSzKnCxhZ2ukRpOi4FlB5sOobvKoGhO/mzPCGBSMyTUy9ttX1PG1rFywNBTnP4JW5o53Yew7VGiQX/9wR8Rrx95ArDLPiegy2hpBDOpt9qsjKTL0hawrvleGe715yFiKbDu7T4ZXt9sEsIzuCa11RCjI+YWd80kzfIxBu4mYUKxS2FOM1LcKvFJx1Sf38YsQS7J8izYsGEEaVlgMS5ddAZjnkvNsY4yoBnBq+Jtctbhsv/di/WysEE4OHwDXv760rmVAL2MUe5NIr4usHPK9NplOF6wo8p3tn2JyLGdgxCTo6lDQl6Q0J4J3ePrhY2agwOjCZdF0M/YuV5c+1WVsQC+JpTiFVI9n54EVXWXTM6MjxIMKuV+C2a6FGtxpCRP7hdJZU8e7MOnq6l9HefgnaU96ZjzLRNloIBx+eRjTt6MyVK4VT9/0+iyuGm1xDaiaCUmPNzQoeb/xu8uKTfI9M6/KkTIU6KDDCv/ajvnFW744WO3c1sh6UIycj66k1armCNf48jDdEKgXMqtgsj87+2BfGxSKMzo1CBUGm1fg83ZUhb0nTrWoCWlwlbKX8bo+rebX/sB6FiikcgrGLN5lRkteo9c850Zvlj12Z4GNA/aTtmyY0Vb9RovpMsTPuP+EqXlO7uKlDBFbmzHE= X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230031)(4636009)(39860400002)(136003)(376002)(396003)(346002)(82310400011)(186009)(451199024)(1800799009)(40470700004)(36840700001)(46966006)(6666004)(7696005)(478600001)(83380400001)(426003)(336012)(16526019)(26005)(2906002)(7416002)(54906003)(2616005)(316002)(70206006)(110136005)(41300700001)(70586007)(8936002)(5660300002)(8676002)(4326008)(40460700003)(36756003)(40480700001)(47076005)(36860700001)(81166007)(356005)(82740400003)(36900700001)(2101003);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Aug 2023 06:07:31.3455 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c9faf779-1997-45ca-7613-08dba8563b05 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: SN1PEPF0002636C.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR12MB9218 X-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xuR47EaUlWZbsOn TDsE3V8Q Y43iMxqStJ/yEJqzOBYmjIU/gG954U0W/kLFq/II74+9eg+sUW8IGtuA5JbqwXlXQwym8EAeZjuY00q4KNOH7trgoQUTzeHGJiKGd7A80OiJZrC7Za0V/gq4ptzYqJ//34f0wgJLVB7k8ulbpVqtCmUgyYaYeKNDniD2/gc1HtxyjsaSwNyQO8Q5YvmmnEvgPqJuA1eLMF2mn5azTKzZEWt876Vn+jzBrGBvigLGaNsyKwxCMJ9QpBqNC7cBI+lAnbm8R1uBVCDQPv/B/T094s9WLb+5/d6a6U27lOqENVVD5JfdcSTOa1OdssDH/IlHwqECN680VSsJeFm4h8zmksr6hYEwqat4Cx9gP0SByr/Y+wIkownmkxI9VWO+1RajeytKgUwKufvoMfa7GKvUQhJFmezkcIvaorjjOzsa0XcfjoEo6v0N3Uabk1D55EIGSMwmOmu5Hvbx9Z3F7YRVnaxzjcd1FVL5YFOlotT8CcRcpVmYZeiLureGItGnvIOVMzTfS5vNborWyW1vEibMCgYR1bWG+DcEO8yKTislV2GgVdoY= 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: It is now redundant after unconditional scans introduced for tasks' disjoint VMAs. Also this approach was not considering a rare case where a VMA gets created after mm numa_scan_seq is greater than two. Signed-off-by: Raghavendra K T --- kernel/sched/fair.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 23375c10f36e..e26e847a8e26 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -2961,14 +2961,6 @@ static bool task_disjoint_vma_select(struct vm_area_struct *vma) static bool vma_is_accessed(struct vm_area_struct *vma) { unsigned long pids; - /* - * Allow unconditional access first two times, so that all the (pages) - * of VMAs get prot_none fault introduced irrespective of accesses. - * This is also done to avoid any side effect of task scanning - * amplifying the unfairness of disjoint set of VMAs' access. - */ - if (READ_ONCE(current->mm->numa_scan_seq) < 2) - return true; pids = vma->numab_state->access_pids[0] | vma->numab_state->access_pids[1]; return test_bit(hash_32(current->pid, ilog2(BITS_PER_LONG)), &pids);