From patchwork Sat Aug 19 14:12:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yury Norov X-Patchwork-Id: 13358633 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 78F8AEE49A8 for ; Sat, 19 Aug 2023 14:12:46 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 4AB3490000A; Sat, 19 Aug 2023 10:12:45 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 433C4900007; Sat, 19 Aug 2023 10:12:45 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2AD3590000A; Sat, 19 Aug 2023 10:12:45 -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 16C4B900007 for ; Sat, 19 Aug 2023 10:12:45 -0400 (EDT) Received: from smtpin09.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id D791DC0A5F for ; Sat, 19 Aug 2023 14:12:44 +0000 (UTC) X-FDA: 81141045048.09.6FA984D Received: from mail-qk1-f181.google.com (mail-qk1-f181.google.com [209.85.222.181]) by imf16.hostedemail.com (Postfix) with ESMTP id 2F70B180013 for ; Sat, 19 Aug 2023 14:12:42 +0000 (UTC) Authentication-Results: imf16.hostedemail.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=rGcvNDop; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf16.hostedemail.com: domain of yury.norov@gmail.com designates 209.85.222.181 as permitted sender) smtp.mailfrom=yury.norov@gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1692454363; 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-transfer-encoding:content-transfer-encoding: in-reply-to:references:dkim-signature; bh=mPWQ2vK2kX3O9yTdZhAmhC3dcu3HKICeyyzpQ4tve9E=; b=Z7FSqxGVGYbF9h/lFvErjCZx2LUqLNqQbRcn0SWRRKL8N4+VlMrJkYDjJIcm8lW/5KTCly vHhPUfn3xoshhRGHFZn8U+vAwPyaWc2zxng57V4uAgxiLG3H4LR/SnXowwTQ/SL6y2USbv Z5/WM7YcM3EI94jWnl5V6mMe5tzarGc= ARC-Authentication-Results: i=1; imf16.hostedemail.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=rGcvNDop; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf16.hostedemail.com: domain of yury.norov@gmail.com designates 209.85.222.181 as permitted sender) smtp.mailfrom=yury.norov@gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1692454363; a=rsa-sha256; cv=none; b=0+ZE7fRYZCvgg/2jq3/P9iM7AiUUEPbP7nwO07N5oEqJ3WFKM/+WWbaXdxXknDlSxJGQfD 9yxTEVZKlaM9HL9y49wFqBd2VLQOvNoIApY/lALmOgryZYwwXpG4KYdbok4VM/sGYlKGNN HhUMMdZNf9QWFgVkvSf6lweGNa/H+n4= Received: by mail-qk1-f181.google.com with SMTP id af79cd13be357-76da0ed3b7aso2399385a.1 for ; Sat, 19 Aug 2023 07:12:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1692454362; x=1693059162; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=mPWQ2vK2kX3O9yTdZhAmhC3dcu3HKICeyyzpQ4tve9E=; b=rGcvNDopABgqPZqzeB5UOOz1sJPaZCNTiHfrhi2hwICq2ybn9eyfwJZ2+e7JV2RniR FaHluQWFGFF+qkWWA/vq5AVV/Z/ccWhz1iADgKBTNVMhMwIHmBXt+jiZ6yuQd8pIpG9I fX94ANcpMt3v3nrffMSEZoxpWhQPEj88vSQNzeygksYnY8OQJOjxTYwMg1H60wRpGwXz 1JcpeQKO9EhnMQ7QhUMNyCruX2mwK4oMyCX5WGfS0HTbIsTZhIK0E5Bn83NKyAL39aGr hAbeewy0hnhp2Cslhp7ebtyuiJNC/E364c5IwFfp1uZgZKukCyuralnsj1M/L8OjiNEC z1eQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692454362; x=1693059162; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=mPWQ2vK2kX3O9yTdZhAmhC3dcu3HKICeyyzpQ4tve9E=; b=OSKDOcso9ZTYtcP5Kc7QHKq6gKC9imSBYkbQZz2g/HIQjnK/D69NMCOOy3qq84bWFL GhSPQRZQfPifAWfUFi4SdrYd4+SALiQ5HShQQ1lYjs6VtnKKaDDIjT0AvglIO7WAp1pe lbJkFqs6/hvRpa9XRqwp7UZjttuWsxHyBpW0fEB7m3WxoAtjB2VhAjvHDNOlSNHSCjo+ ke/5ZYhBiPWzT6P1IeO7cUZ1PbJZlbn5lsqAXs6u/OSWx6QEybvW36gLWv0LGHY9mm/V 4W1lNYwIiG0hJP0HCUWEIOjP0Vp1j00pqpW9aybXymwyN+JPldWGhIk8MucR31cQ/C8Q FGeQ== X-Gm-Message-State: AOJu0YyW5IXGl9Pl9YXSCSYJRn0fc6RACJUrRF6JUzkIWJNxXxsBEw0v dy80MEMRqxpXG2p2lbfybBg= X-Google-Smtp-Source: AGHT+IH2tWAivh4wKIlaP0hQ4fQ+ByGgdqB8HmuIiGxaZp0EvuT2z1rF/Ga9MIo2J+Rpp7cMeYVqWQ== X-Received: by 2002:a05:620a:e90:b0:76d:9c84:9ea7 with SMTP id w16-20020a05620a0e9000b0076d9c849ea7mr1247630qkm.22.1692454362173; Sat, 19 Aug 2023 07:12:42 -0700 (PDT) Received: from localhost ([32.218.242.113]) by smtp.gmail.com with ESMTPSA id oo23-20020a05620a531700b0076c98dad91dsm1201945qkn.120.2023.08.19.07.12.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 19 Aug 2023 07:12:41 -0700 (PDT) From: Yury Norov To: linux-kernel@vger.kernel.org, linux-mm@kvack.org Cc: Yury Norov , Ingo Molnar , Peter Zijlstra , Andrew Morton , Ben Segall , Daniel Bristot de Oliveira , Dietmar Eggemann , Jacob Keller , Jakub Kicinski , Juri Lelli , Mel Gorman , Steven Rostedt , Tariq Toukan , Valentin Schneider , Vincent Guittot , shiju.jose@huawei.com, jonathan.cameron@huawei.com, prime.zeng@huawei.com, linuxarm@huawei.com, yangyicong@hisilicon.com, Andy Shevchenko , Rasmus Villemoes Subject: [PATCH v2 0/6] sched fixes Date: Sat, 19 Aug 2023 07:12:32 -0700 Message-Id: <20230819141239.287290-1-yury.norov@gmail.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-Rspam-User: X-Stat-Signature: u1cuht614fp3edazzx98t1okda5rky9g X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 2F70B180013 X-HE-Tag: 1692454362-596965 X-HE-Meta: U2FsdGVkX18Lqz2iw+aXZEf/EZdnzTevxqRXhuVCbPwBnXbzdwW7fzIZs0PDhmDEnt6Hij7HfYbpIJBldpLLWvpx8NqpdnC9LqCbGLSSQHnwM0gbj5S3+xU1/n0CsurhBm99OjgQ9RbO9NgGRJQV/CKwrQKI8RS9Yf2/Nx0szuUKlUn7LlY7pACF7EcjlonXLKhBBY8rKQY26i+NNeHaVc7/dWcQIHNk/vn7pFAmbF1egyoUZ1lMpy9pfPxSNw8RwiyfIuGNY5bBo78jbZEBUKnw2/H6vTAFuLuNVAoqNdmJyvNPCVAAAWsFf6pHLIeIkDZmyPEYAcoAWOSboDKA8/xoR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XVckIbAELaR50/PC3Tfz6eBMcTUhSDXRJpYzGQolSNAyobEcDrPcfmPfQ8vEg5yOyjGEXIfzbbxTfBBfS9bQFlrKOkzkh7mMcJJF3XEUCfioqBG4mLEyCMWkMgbPt9P1wKpc9QdEGZpp/aCzjFJ9t8yVSRX4eD7qGmQlcUCf5M8234bOxaVRfg3I2Krqlv57u8xJwFajYg/5A5FngjY8ScBonZ8rgx8CUYTH9re3jzj49kOZuk/VbQ== 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: Fixes for recently introduced sched_numa_find_nth_cpu(), and minor improvements in sched/fair. v1: https://lore.kernel.org/lkml/20230810162442.9863-1-yury.norov@gmail.com/T/ v2: - fix wording in commit messages; - move nearest node search inside rcu lock section in sched_numa_find_nth_cpu(); - move NUMA_NO_NODE handling inside sched_numa_find_nth_cpu(); - rewrite comment for sched_numa_find_nth_cpu(). - add review tag from Yicong Yang. Yury Norov (6): numa: generalize numa_map_to_online_node() sched/fair: fix opencoded numa_nearest_node() sched: fix sched_numa_find_nth_cpu() in CPU-less case sched: fix sched_numa_find_nth_cpu() in non-NUMA case sched: handle NUMA_NO_NODE in sched_numa_find_nth_cpu() sched: fix sched_numa_find_nth_cpu() comment include/linux/numa.h | 7 +++++-- include/linux/topology.h | 2 +- kernel/sched/fair.c | 14 +------------- kernel/sched/topology.c | 25 +++++++++++++++++-------- lib/cpumask.c | 4 +--- mm/mempolicy.c | 18 +++++++++++------- 6 files changed, 36 insertions(+), 34 deletions(-)