Received: by 2002:a05:7412:2a91:b0:fc:a2b0:25d7 with SMTP id u17csp139389rdh; Tue, 13 Feb 2024 11:49:19 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCX4mo0sQaqbVG+qREb2R18vXGfZFp6XgIltSLls2qfXoaEQw6LOGjmKB+Na6fTE1e1W1Xoz/NVWB3S2RvQT4l0lUl+4+vr/DzxmmNSMoQ== X-Google-Smtp-Source: AGHT+IGQpEeWPN7lXcAihra30BD98AtIxhNk9Xzy1NVpo4q54pIATv4aT0H+cED+qoJ4eUSOhqYw X-Received: by 2002:a17:903:487:b0:1d9:c876:b840 with SMTP id jj7-20020a170903048700b001d9c876b840mr522239plb.2.1707853758981; Tue, 13 Feb 2024 11:49:18 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707853758; cv=pass; d=google.com; s=arc-20160816; b=ce8nidZeoVqpz4h9feHEDSxSgaGe5b3quH8jkk3oTL8Jy4nNYnRU6+IFWnPl+UOmg1 zuh4KGzfq03viSTHzVMhjeC5x2GS93/HsjQY7wYaxbS1wafJ7hxhUzHzJ+5fiJDXp28z 5Z0Wmx4Rw7aHhlT8nqTsW8pPuaus5Wq3uTR0jSE8TeWT7V8zdSF3Nusqf0JvRZYHFPra jx8kpta+TJEx5R8TfksUYOAdA/wF+TugA91Wxqssrs8F8xsysiYF3w3JnDtorAemjYpH 2iIbVlfo1DRS2ZivQksr5XVRAahgyeoCMlLZtCuvRDyKPTsToNM1VhQgODUhjRmkVMO6 lQng== 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=eHdL9fwqzOFVunQ7aj6eAS3JJUQBeZz3a16vfCQiKHg=; fh=WE4DRtYLmkNFRL54I4PWQKR1/hPn7AmXsQRVAxaRdFQ=; b=pBEcVh+ivbIhNzaa5JJUw/qLC63Eb1Og6FfPDKBpD75mP5YI+1l3Xrjqd36/rf3QO0 DqBibSItnYc+b47qWNhsLUTzxOdjg2QSQJZ4YMFEOyrVIyS7pvD7bB5jMPF2ILC/A8Dd xfxeBICD6VYkV+L6MhaV2BcjgYV9QwgINNeB8JkVSqeRvNZgvOGWVbVSuNROgVAqAujo ERG6zQYrsBjlFrIbe6BysXH/rAVOl5zyjAtSWgqh7nbcDdI4Lin0cYGL284Lu944dSX+ RGGaP6Z09eaJgtTUNXxfgWbWhVVXiKnDQXeGiLlspXRC7McK6YpcidfKHB5phOaHgCcB r4Aw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b="dJOydb6/"; 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-64192-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-64192-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de X-Forwarded-Encrypted: i=2; AJvYcCUE+uw6dNmAQYajpOkxb9X/SRLXtssq8L0+zOza747trA7Xh4J+F9QfNBRXXf+AMH0HFmSdcH0YlZNXt/s1jS40cjuVNsaDX4VG8lZ7kA== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id t4-20020a170902bc4400b001d71c8871e4si2375834plz.165.2024.02.13.11.49.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Feb 2024 11:49:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-64192-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; dkim=pass header.i=@linutronix.de header.s=2020 header.b="dJOydb6/"; 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-64192-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-64192-linux.lists.archive=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 sv.mirrors.kernel.org (Postfix) with ESMTPS id A1CE4288CAD for ; Tue, 13 Feb 2024 19:49:18 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0D06C60899; Tue, 13 Feb 2024 19:49:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="dJOydb6/"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="iJMFGqFs" 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 B1F146088D; Tue, 13 Feb 2024 19:49:06 +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=1707853748; cv=none; b=nahslyB9SSaHMBXvNjFoeqyHBxW5QLUg57NO6Mv0REIQbSIMNXyvkQ5hWVJGT/LqI6zPrCdaRfNCzqztACOPXqNmHzMQfs8pyHJkuxADSJ/lsq1Espq4IG78OyFYS3QmE8V7rDVLnNrQm+/4pBRKTKjG5ZSjTgyL3RPgVZUx67U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707853748; c=relaxed/simple; bh=pjKA3Ua1RKW2HGaRujVR/MwN9dtP60k5B2a26aztdr0=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=WZB3IpByvwcTDQAvuWOA2cJ39wDcIZawuHqQEz7INi1PkQAX/KFWY12IQcY4oy5qaS0Sxe54ThCedZvx7Eh4u54tYdWBFC2Qh1Esrj2RCiMzbZcaGLMyIcO+n2zseU2JqeFp0IQbqSUTUVCH7c/2BDYwp1r9VS2Xr5QKnLNlZ+Q= 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=dJOydb6/; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=iJMFGqFs; 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: Tue, 13 Feb 2024 19:49:03 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1707853744; 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=eHdL9fwqzOFVunQ7aj6eAS3JJUQBeZz3a16vfCQiKHg=; b=dJOydb6/I8/1s9cl/MJu9k8XnaqWmXcrkwuWc3YU7l7m+lvFhdhkEq856HyjvYsVQV/j57 k2tSZUFaBkmWNXaLceQV59m+NhGMM3DZ/ZECGX6woFXFLvavAZ4oShrcN2kWgfMZkO4Bof 5aAK3cpTXIrBbje2eTxjMkqQhpJ/k4m6s9QqqfIebHXdP48g6f5vPg2kFDgBAS75uGMOQy 7yIRrHDlreIL53o01ZkqP2HYLWu8tXdSeS0zXe3c4ezJSWgeQhqE5Dyjzb3VqUdy+T33Mk 7KnjNhOFaZQvxI5rnJ6g9gaIaDIZIAA+SN5bggOuzrLjgwKHibNMk05gYnv3JQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1707853744; 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=eHdL9fwqzOFVunQ7aj6eAS3JJUQBeZz3a16vfCQiKHg=; b=iJMFGqFs1Q7mvG/X4gizrWDePP9YZQ/w69vEGUpvCEJuDLVw/FVQ1yIjaHgtakSp9ytf4Z 2DuEoW3dbnrIF7Aw== From: "tip-bot2 for Costa Shulyupin" 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 , Costa Shulyupin , Thomas Gleixner , Frederic Weisbecker , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20240213164650.2935909-3-costa.shul@redhat.com> References: <20240213164650.2935909-3-costa.shul@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <170785374329.398.3918391631110866746.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit The following commit has been merged into the timers/core branch of tip: Commit-ID: 86342554e102b0d18d50abec43d40f4fc92f1993 Gitweb: https://git.kernel.org/tip/86342554e102b0d18d50abec43d40f4fc92f1993 Author: Costa Shulyupin AuthorDate: Tue, 13 Feb 2024 18:46:51 +02:00 Committer: Thomas Gleixner CommitterDate: Tue, 13 Feb 2024 20:44:14 +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 Signed-off-by: Costa Shulyupin Signed-off-by: Thomas Gleixner Reviewed-by: Waiman Long Reviewed-by: Frederic Weisbecker Link: https://lore.kernel.org/r/20240213164650.2935909-3-costa.shul@redhat.com --- kernel/time/hrtimer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c index 7607939..438208a 100644 --- a/kernel/time/hrtimer.c +++ b/kernel/time/hrtimer.c @@ -2221,8 +2221,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(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);