Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp499654lqo; Thu, 16 May 2024 12:16:36 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVrOxS6ULPRy1FE/0G2ZC8vDTTDSRyMMHkptUMmFh7JHyp+fcUIj7C8Pk6Yzu+m6xu3W4xWD0mizfwl9X298L+ndPYK8FaGIctPwFsqfA== X-Google-Smtp-Source: AGHT+IFcC8uYRkWTSiE/NatcYY+qXza/NDpjh80hmi3cso5KF51cnAKbRwdG6xRdSxN76SGx7D2n X-Received: by 2002:a17:90a:778c:b0:2bb:b23e:14d7 with SMTP id 98e67ed59e1d1-2bbb23e30c5mr2647002a91.26.1715886995922; Thu, 16 May 2024 12:16:35 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715886995; cv=pass; d=google.com; s=arc-20160816; b=hFfb4LF7lrm41C6Ixv9iptTyGDaE6tkcpNyoq/E+oIO6fWfBRq431k7cwW9Dd+PZRA VV6P0i+JzOeRRMOgbvkriKJ4T0B2DUCsbKNC6thqH2ijGejtw5c/3DCAa4dO4IQd3sYq rH7BDBzpSEGqV5PvYx5eZGXOtW0bfICRF5a5QLkgo0hITjC9j8iW/CNE92s52TZoh+l2 FoZpSj9qBHR/eyzYTGPU9mq1gVcwsSJNpFV7ggM2Ep8sgq0hcaVcRzZnUS2qhg/CFt1Z ofCLloVZyLVlYbO1pfF1tbTAw3jxa7l6YYdnsDIvh/VYvHBipZObEORzLO4U0W+H8+eT J9DA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:to:from; bh=TGl25VI/bdS9cA0cwaeR3veGamr8DGMylL6oozmJjQ8=; fh=ix/QNQDlB0gRrj5ntluphSe+dCrwoYhUvqnxIXX/INc=; b=fOnDyFtbxZFj6THIRHHVaYAeGOpWhGqxuu0vrKmHJrc9JWu+U3UBzNWn69q6+Cdm+6 6LodmMS/WCbBMMpEvciFexO6wgas9K/QTnEPK//p4DDhAtjaSlHw8ES15yiEquGUH23o h4p4tGWuIQLz6pz6TR1I4W6wZ53uuKCN0Nwt8CNkVRRwuh2xoB7pmiDbdMzMZTc/KF20 1Aq264oS7mMUmmbBvtORFPG4JBkNDn2RSzryC2FEc5pphjd0eyLpiITcS9MOVAZ5e5M2 OnbwgS+5nJvvkpixlToAwwrky5jxi+/rR6k5L26uFavX3S9NakB/YRpW7rL9xPPJNxPv Y35A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-181515-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-181515-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 98e67ed59e1d1-2b6c51b362bsi15041967a91.14.2024.05.16.12.16.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 May 2024 12:16:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-181515-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-181515-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-181515-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 30828287759 for ; Thu, 16 May 2024 19:11:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 01948157E9E; Thu, 16 May 2024 19:07:21 +0000 (UTC) Received: from mail-wm1-f41.google.com (mail-wm1-f41.google.com [209.85.128.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C2232157A53; Thu, 16 May 2024 19:07:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.41 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715886440; cv=none; b=pHd2T977uXCkLabNamcHuSp+XmGlmmHcBy5mJ/Gi/TKHE3yodt1gkggfSqwCxDuGQerR5p+1NgzxwafRzJQostBMTdfBcgzOPAyd0soO8GP8G+/NzwIY0h2wM4pIhCOU/iKwNt/dilz6ypTWV7smblzyem6cUz3Ij7+N+8y1NlA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715886440; c=relaxed/simple; bh=MHoT4Jo3RAzz8eEtqv+1iklBPBBHf3L8xhNTgPY77mk=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=b5LGj4UH74bPdvMDZ58/raUYdUo/fuDZgl74dhALsDgCBtQNA9fLy0EEItwKmHzRpHqZOEBRBWR4JZSVhZa8yRLM4PuyV6YT6V8YIrEEPgPG50fSqbcocZr1xxWk//7zV05crclIc1CknynM0vZXw+8VNPxWfDyq/z9XZILFWB8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=gmail.com; arc=none smtp.client-ip=209.85.128.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wm1-f41.google.com with SMTP id 5b1f17b1804b1-4202cea9a2fso6606215e9.3; Thu, 16 May 2024 12:07:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715886437; x=1716491237; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=TGl25VI/bdS9cA0cwaeR3veGamr8DGMylL6oozmJjQ8=; b=Q3EfbISFKyD1A/FwAF8KVvvIJ6CxUPtTUfX/dayyD/Hmn9JkBUL3E+9krxTt12rHkr Yy2CNf7o8XjBekzZ6X7rTwNc6MINBP8nIYy85GMijoTZ22vdmkzOjuzwzj75WKa3o5UH D3Ilru+TG6N5a5IXgct1FDtGy0mwOys2fRnLp7VBy6Gqvmgsc2u1IoP1Xez7RRHjSXbB Qk1tBKlONVnvKEUZYnNVySSUXnsh368G4SsYeixi/I9/tG5v4UoGysDnEDhZZyU97Xgf kL87o30pH7FUQYAoterl5/HlGkrsZxOEFm/HNKmgiyNOZq8qqcv1rYbLgEIi/Y9mAWiE cE8g== X-Forwarded-Encrypted: i=1; AJvYcCVDPeNhvNFzTcUJnUajeOzqPuAmcz53AA1jzVo1Nd3GdnltCX1O0WMJGnQFpIriDHGumxJHg01KKWL6XRpzgMwd702CKGim93IYPO6Aen1PCkEkHHrQCCNdlB8cAj4dKjsqaPQxYA== X-Gm-Message-State: AOJu0Yx64P/eAkWtEVEomprRprqW1l9i7R0NDixlDaMJ9Ai5zb2nz/EV g1zq89ZERPdOUnjFaanD0jiUolU441NbNaEwRk2iAk6VQmWMPwrL X-Received: by 2002:a05:600c:5008:b0:41b:dca6:a3fa with SMTP id 5b1f17b1804b1-41fead6dc7amr143740775e9.39.1715886436833; Thu, 16 May 2024 12:07:16 -0700 (PDT) Received: from costa-tp.redhat.com ([2a00:a040:1a3:c059:8b18:f13e:da9b:5a8e]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-41fccee9335sm275834155e9.29.2024.05.16.12.07.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 May 2024 12:07:16 -0700 (PDT) From: Costa Shulyupin To: longman@redhat.com, pauld@redhat.com, juri.lelli@redhat.com, prarit@redhat.com, vschneid@redhat.com, Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , Zefan Li , Tejun Heo , Johannes Weiner , Ingo Molnar , Peter Zijlstra , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , Petr Mladek , Andrew Morton , Masahiro Yamada , Randy Dunlap , Yoann Congal , "Gustavo A. R. Silva" , Nhat Pham , Costa Shulyupin , linux-kernel@vger.kernel.org, cgroups@vger.kernel.org Subject: [PATCH v1 0/7] sched: Adjust affinity according to change of housekeeping cpumask Date: Thu, 16 May 2024 22:04:30 +0300 Message-ID: <20240516190437.3545310-1-costa.shul@redhat.com> X-Mailer: git-send-email 2.45.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit The housekeeping CPU masks, set up by the "isolcpus" and "nohz_full" boot command line options, are used at boot time to exclude selected CPUs from running some kernel housekeeping facilities to minimize disturbance to latency sensitive userspace applications such as DPDK. However, these options can have negative consequences for "normal" workloads. Both nohz_full and rcu_nocbs can be applied to a subset of the CPUs on a server (so as to not impact the "normal" workloads), but they can only be changed with a reboot. This is a problem for containerized workloads running on OpenShift (i.e. kubernetes) where a mix of low latency and "normal" workloads can be created/destroyed dynamically and the number of CPUs allocated to each workload is often not known at boot time. This series of patches is based on series "isolation: Exclude dynamically isolated CPUs from housekeeping masks" https://lore.kernel.org/lkml/20240229021414.508972-1-longman@redhat.com/ Its purpose is to exclude dynamically isolated CPUs from some housekeeping masks so that subsystems that check the housekeeping masks at run time will not use those isolated CPUs. However, some of subsystems can use obsolete housekeeping CPU masks. Therefore, to prevent the use of these isolated CPUs, it is necessary to explicitly propagate changes of the housekeeping masks to all subsystems depending on the mask. Costa Shulyupin (7): sched/isolation: Add infrastructure to adjust affinity for dynamic CPU isolation sched/isolation: Adjust affinity of timers according to change of housekeeping cpumask sched/isolation: Adjust affinity of hrtimers according to change of housekeeping cpumask sched/isolation: Adjust affinity of managed irqs according to change of housekeeping cpumask [NOT-FOR-MERGE] test timers affinity adjustment [NOT-FOR-MERGE] test timers and hrtimers affinity adjustment [NOT-FOR-MERGE] test managed irqs affinity adjustment include/linux/hrtimer.h | 2 + include/linux/timer.h | 2 + init/Kconfig | 1 + kernel/cgroup/cpuset.c | 3 +- kernel/sched/isolation.c | 119 +++++++++++++++++++++++++++++++++++++-- kernel/time/hrtimer.c | 81 ++++++++++++++++++++++++++ kernel/time/timer.c | 64 +++++++++++++++++++++ tests/managed_irq.c | 71 +++++++++++++++++++++++ tests/timers.c | 58 +++++++++++++++++++ 9 files changed, 395 insertions(+), 6 deletions(-) create mode 100644 tests/managed_irq.c create mode 100644 tests/timers.c -- 2.45.0