Message ID | 170863704606.398.1106798877548525205.tip-bot2@tip-bot2 |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-77396-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp218237dyb; Thu, 22 Feb 2024 13:25:06 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCX2U//qrwSP3/fauZ6sRkV3O1JBrVJrDV9V2GFcMpsGKeahs1xbXSpXcGiVFqBLqigi0sF1QF81Q8pdNMImvtgurls78w== X-Google-Smtp-Source: AGHT+IGt+z79wAja4lyunvlzB8kgylPSmTxk5IDSrpzYdZf/Og+E+GmmPqOEwr4rb/iyTbl0VgQK X-Received: by 2002:a05:690c:e0c:b0:608:3767:f093 with SMTP id cp12-20020a05690c0e0c00b006083767f093mr288405ywb.49.1708637106114; Thu, 22 Feb 2024 13:25:06 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708637106; cv=pass; d=google.com; s=arc-20160816; b=oZtfKIV/xGlBArML+Z3Rlidn3WjGp2OK6N5dSvIW79/NZKCiHBJgtCxKvA8qfUyjhx KbBLqt1vX9tkaZ2ZBP7FFeI+ZJTygx5r99WJ6NNpjd6XbRPjozbPJWu6spC4HwrqWcK5 a+7+EDJ3q5HDjcK3U47VxTWsSzh2b2jZNHca6kgbY981Y1o03YiyTC84vEIwPJwBCxS7 PYh3WtELpImCJ+Cv9xkQTH6YJCUcZNktlvXNhW4Ro+175mTyoM8UtVxU3z3UAqIdmaqB iBQ7Yxu3EIzHyWtDHMN+tAXHAlI66gd0tl0BwnBI1ABdWb8r1BGEmxru9KOxSPRvQrS3 C/Bg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:precedence:robot-unsubscribe:robot-id :message-id:mime-version:list-unsubscribe:list-subscribe:list-id :precedence:references:in-reply-to:cc:subject:to:reply-to:sender :from:dkim-signature:dkim-signature:date; bh=bB5ASdAOKRlBSjf6eEIPEh+eRCucZRp3Y42SIxEk/kQ=; fh=L8EPrqVQsK844v9donanObl173uYjwrI5cuLOJIrdBw=; b=cv3pY8RKbCKhL0/bG0Cxc2GzYE3VMaclKsUm2tYzIdXq+jXAYOzmPeetexcTS8u5Iv FeoO99+3RuGICt1KFBW67suDXKKb3rrnsRF3ZzUCkIA4e0ZNXfB/wZoD9l0xmFLAT0G0 e4HjYCRCsA8S8C/sJCz30SQXh2ITlWtL6hLVBKBDAi298y8dntTa+9IILZPXFY/j2OH0 lPvtgao7viHrO6mBsISbWex555izssDi9j5CKlpvNuKRtmzUmEINQYeyzdOaMPENX5vO +R9l/nS5LlG/2tG4DxcpaWdHB9Snx5uqGSIGSeJtKv9d5NBG3fWF0Z3FRDrw+KpUb9s6 h62A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=CbPA8iko; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-77396-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-77396-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id bp39-20020a05622a1ba700b0042dbe89cb1bsi14700415qtb.581.2024.02.22.13.25.05 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Feb 2024 13:25:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-77396-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=CbPA8iko; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-77396-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-77396-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id DB2851C24969 for <ouuuleilei@gmail.com>; Thu, 22 Feb 2024 21:25:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7C7D213793A; Thu, 22 Feb 2024 21:24:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="CbPA8iko"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="9V1oGtxM" Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EFAAB73F33; Thu, 22 Feb 2024 21:24:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708637050; cv=none; b=OZgYG/nf1L8HcRktmfv4IW44K/efOj3wuat8lasri8ET3jaj0uyQKf402wg5qr+xsS12Bon+clKhyQfAKM7IYa8ySQjl3ZdSuPYOCmxe/KtzMVbyURLoYuixNw5nENKC9SBhfev+gTxTCxLeQJB4GQpbps5ZCoylDEgiXmS5K70= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708637050; c=relaxed/simple; bh=P/vAShnlnt4tTjBE+MfxxvVqDIWHSWlCHwALHLpLotU=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=iWIurdqrD8L8RJzn+v0YutPkb2IWft/jsXzteAAb5pw1oVTjDnNyuCMoIFAwlMzihn5RyQhiJ508SFFM1InFemXomAxnb166pqTRKLtqZczrFkcpI768c9cKMMyS4FvsFLUR1fwrQWat42AEBTfEnZNG2ht601ZwevWOgR0OwMs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=CbPA8iko; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=9V1oGtxM; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Date: Thu, 22 Feb 2024 21:24:06 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1708637047; h=from:from:sender:sender:reply-to: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; bh=bB5ASdAOKRlBSjf6eEIPEh+eRCucZRp3Y42SIxEk/kQ=; b=CbPA8ikoths2la+5P6ubxZeLP9GYnkEwpobiJIJj8E6FEf/jAUgHEYyxx/A6yJ5aWm677G pwG7Vs7mLDCOztMq87uj1uUmlJpqN2nh5dd13a7RMopfaqtKqQilnqXrrSDZs23ffnRSYj XZ9TBmtdweATxKmZpehyPXMNGvgOqRC4hPHHX13UYulfVNOScgVGz+n3axVaV4a/cFNCBw Y1iU9mK30MIbMkvzx4TMIf89tXMHrMmSQmTLP29PB2aix6vq9Qp9Yi4pj1AP8s7SmuCT5V FoiJZryJLhC8GoQ7apLlhNFC5kx8txvn8gzGwknxeYzyhdOVOd5rp6dPBfasRg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1708637047; h=from:from:sender:sender:reply-to: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; bh=bB5ASdAOKRlBSjf6eEIPEh+eRCucZRp3Y42SIxEk/kQ=; b=9V1oGtxMvGaDmOwh+O4SkL2zkT0WBZi0eiYuwBcYCSDLlpwOBipMKIV7CTR06GpO7iakyd RwnzxRzMm9o4faDA== From: "tip-bot2 for Costa Shulyupin" <tip-bot2@linutronix.de> Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: timers/core] hrtimer: Select housekeeping CPU during migration Cc: Waiman Long <longman@redhat.com>, Costa Shulyupin <costa.shul@redhat.com>, Thomas Gleixner <tglx@linutronix.de>, x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20240222200856.569036-1-costa.shul@redhat.com> References: <20240222200856.569036-1-costa.shul@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Message-ID: <170863704606.398.1106798877548525205.tip-bot2@tip-bot2> Robot-ID: <tip-bot2@linutronix.de> Robot-Unsubscribe: Contact <mailto:tglx@linutronix.de> to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791635861864105113 X-GMAIL-MSGID: 1791635861864105113 |
Series |
[tip:,timers/core] hrtimer: Select housekeeping CPU during migration
|
|
Commit Message
tip-bot2 for Thomas Gleixner
Feb. 22, 2024, 9:24 p.m. UTC
The following commit has been merged into the timers/core branch of tip: Commit-ID: 56c2cb10120894be40c40a9bf0ce798da14c50f6 Gitweb: https://git.kernel.org/tip/56c2cb10120894be40c40a9bf0ce798da14c50f6 Author: Costa Shulyupin <costa.shul@redhat.com> AuthorDate: Thu, 22 Feb 2024 22:08:56 +02:00 Committer: Thomas Gleixner <tglx@linutronix.de> CommitterDate: Thu, 22 Feb 2024 22:18:21 +01:00 hrtimer: Select housekeeping CPU during migration During CPU-down hotplug, hrtimers may migrate to isolated CPUs, compromising CPU isolation. Address this issue by masking valid CPUs for hrtimers using housekeeping_cpumask(HK_TYPE_TIMER). Suggested-by: Waiman Long <longman@redhat.com> Signed-off-by: Costa Shulyupin <costa.shul@redhat.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Waiman Long <longman@redhat.com> Link: https://lore.kernel.org/r/20240222200856.569036-1-costa.shul@redhat.com --- kernel/time/hrtimer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c index 5a98b35..1fd106a 100644 --- a/kernel/time/hrtimer.c +++ b/kernel/time/hrtimer.c @@ -38,6 +38,7 @@ #include <linux/sched/deadline.h> #include <linux/sched/nohz.h> #include <linux/sched/debug.h> +#include <linux/sched/isolation.h> #include <linux/timer.h> #include <linux/freezer.h> #include <linux/compat.h> @@ -2225,8 +2226,8 @@ static void migrate_hrtimer_list(struct hrtimer_clock_base *old_base, int hrtimers_cpu_dying(unsigned int dying_cpu) { + int i, ncpu = cpumask_any_and(cpu_active_mask, housekeeping_cpumask(HK_TYPE_TIMER)); struct hrtimer_cpu_base *old_base, *new_base; - int i, ncpu = cpumask_first(cpu_active_mask); tick_cancel_sched_timer(dying_cpu);